Skip to main content

CLI

Gety includes a command-line tool for searching files, retrieving document content, and managing connectors directly from your terminal.

Set up

  1. Open Gety → Settings → AI Integrations and click CLI Commands under More Options

Gety AI Integrations page showing CLI Commands under More Options Gety → Settings → AI Integrations: click CLI Commands under More Options

  1. Gety installs the gety command to your PATH and shows the CLI documentation. You can browse the commands or click Copy All to copy the full documentation.

Gety CLI Documentation dialog showing commands and options Your CLI documentation — click Copy All to copy everything

Restart your terminal

After enabling CLI Commands, you must close and reopen your terminal (or start a new terminal session) for the PATH change to take effect. The gety command will not be recognized until you do this.

gety search "contract renewal terms"

Results show the document title, matched snippet, and file path.

Options

gety search "budget report" --limit 5              # Limit results
gety search "meeting notes" --ext pdf --ext docx # Filter by type
gety search "Q1 revenue" --json # JSON output
gety search "design specs" --no-semantic-search # Keywords only
gety search "合同" --match-scope content # Search content only
FlagDescription
-n, --limit <n>Max results (default: 10)
--offset <n>Result offset for pagination (default: 0)
-c, --connector <name>Filter by connector (repeatable)
-e, --ext <ext>Filter by file extension (repeatable)
--match-scope <scope>title, content, or semantic
--sort-by <field>default or update_time
--sort-order <order>ascending or descending
--update-time-from <iso8601>Filter by modification time
--update-time-to <iso8601>Filter by modification time
--no-semantic-searchDisable semantic search
--jsonOutput as JSON

Fetch a document

gety doc <connector_id> <doc_id>

Retrieves the full content of a document. The connector_id and doc_id are returned in search results.

Manage connectors

gety connector list                        # List all indexed folders
gety connector add ~/Documents # Add a folder to index
gety connector add ~/Projects --name work # Add with custom name
gety connector remove <connector_id> # Remove a folder

Use with AI agents

The CLI is useful for AI agents that can run shell commands (e.g. Claude Code, Codex). The agent can call gety search to find relevant files during a task.

Example prompt for an agent:

"Search my local files using gety search for any documents related to the client proposal, then summarize the key points."

For JSON output that's easier for agents to parse:

gety search "client proposal" --json
Give it to an AI agent

Just like with the API, you can copy the full CLI documentation and paste it into your agent's conversation. The agent will know how to call gety commands on your behalf.

Exit codes

CodeMeaning
0Success
1General error
2Invalid arguments
69Gety is not running
77Quota exceeded

If you get exit code 69, make sure the Gety desktop app is running.