Zvec Logo

CLI Reference

Find the main zg commands and the installed reference for searching, indexing, configuration, and connecting AI agents.

zg is the terminal and scripting interface to the same local search layer used by AI agents. Start with the command overview, then open the topic guide when you need retrieval or indexing details.

Use installed help as the command reference

Options can evolve between releases. Run zg help, zg help <command>, or zg <command> --help for the exact surface supported by your installed version.

Command Map

CommandUse it toGo deeper
zg querySearch an index or run built-in ripgrepSearch Guide
zg index / zg statusBuild, update, or inspect a workspace indexManage an Index
zg install / zg uninstallConnect or disconnect AI agentsConnect AI Agents
zg serverStart, stop, or inspect the local serviceLocal Server
zg config / zg authConfigure models, providers, and remote accessEmbedding Models
zg help / zg versionInspect the installed command surfaceUse the installed help

Before building a large index, also review Supported Content to understand extraction and file-type boundaries.

Common Starting Points

# Search with the default hybrid route
zg query --human "where theme preferences are restored" --limit 5

# Build or inspect the current workspace index
zg index --embedding local/potion-code-16m-v2
zg status

# Connect an agent
zg install --target codex --yes

Use the topic guides for decision-making and workflows. Use this page—and the installed help—for command discovery.

Use the Installed Reference

zg help
zg help query
zg help models
zg help file-types
zg help environment
zg version

The most frequently used environment settings are ZVEC_GREP_MODE, ZVEC_GREP_EMBEDDING, ZVEC_GREP_MODEL_CACHE, and ZVEC_GREP_DEVICE. Run zg help environment for the complete list and precedence rules.

On this page