> ## Documentation Index
> Fetch the complete documentation index at: https://gitquarry.micr.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> See the full gitquarry command surface, global options, root commands, and completion support in one place.

# CLI Overview

Gitquarry has a deliberately small root command surface.

## Root Commands

```bash theme={null}
gitquarry search [OPTIONS] [QUERY]
gitquarry inspect [OPTIONS] <OWNER/REPO>
gitquarry tree [OPTIONS] <OWNER/REPO>
gitquarry code [OPTIONS] <OWNER/REPO> <PATTERN>
gitquarry compare [OPTIONS] <OWNER/REPO>...
gitquarry source path [OPTIONS] <SPEC>
gitquarry recipe run <FILE>
gitquarry mcp
gitquarry agent
gitquarry skills [list]
gitquarry skills get <NAME> [--full]
gitquarry skills path [NAME]
gitquarry auth login|status|logout
gitquarry config path|show
gitquarry version
```

## Global Options

```bash theme={null}
--host <HOST>
--generate-completion <bash|zsh|fish|powershell>
--help
--version
```

### `--host`

Targets GitHub.com or a custom host.

Accepted inputs:

* bare hostname
* full URL
* explicit `/api/v3` base

See [GitHub Enterprise Hosts](/guides/github-enterprise-hosts).

### `--generate-completion`

Prints shell completion to `stdout`.

Supported values:

* `bash`
* `zsh`
* `fish`
* `powershell`

## Subcommand Roles

| Command   | Role                                           |
| --------- | ---------------------------------------------- |
| `search`  | repository discovery and ranking               |
| `inspect` | explicit `owner/repo` inspection               |
| `tree`    | no-clone repository tree inspection            |
| `code`    | no-clone repository file content search        |
| `compare` | side-by-side explicit repository comparison    |
| `source`  | explicit opensrc-backed source retrieval       |
| `recipe`  | checked-in TOML search recipe execution        |
| `mcp`     | stdio Model Context Protocol server for agents |
| `agent`   | embedded guide for AI agents using the CLI     |
| `skills`  | embedded, version-matched CLI usage skills     |
| `auth`    | host-scoped PAT management                     |
| `config`  | inspect effective config path and payload      |
| `version` | print the current version                      |

## Product Contract

The most important root-level rule is:

* plain `search` stays close to native GitHub repository search
* enhanced discovery stays explicit
* remote tree and code inspection do not clone repositories
* side-by-side comparison only runs for explicit repository inputs
* checked-in recipes map to visible search flags rather than hidden defaults
* MCP mode exposes the same CLI workflows to agents over stdio JSON-RPC
* source fetching stays explicit through `source path`

That contract is defined in [Search Behavior](/reference/search-behavior) and the repo spec.
