CLI
Gety includes a command-line tool for searching files, retrieving document content, and managing connectors directly from your terminal.
Set up
- Open Gety → Settings → AI Integrations and click CLI Commands under More Options
Gety → Settings → AI Integrations: click CLI Commands under More Options
- Gety installs the
getycommand to your PATH and shows the CLI documentation. You can browse the commands or click Copy All to copy the full documentation.
Your CLI documentation — click Copy All to copy everything
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.
Search
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
| Flag | Description |
|---|---|
-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-search | Disable semantic search |
--json | Output 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 searchfor 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
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
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Invalid arguments |
69 | Gety is not running |
77 | Quota exceeded |
If you get exit code 69, make sure the Gety desktop app is running.