CLI Reference

July 12, 2026 · View on GitHub

Command Reference

CommandDescription
vexor initRun the interactive setup wizard
vexor QUERYShortcut for vexor search QUERY
vexor search QUERY --path PATHSemantic search (auto-indexes if needed)
vexor index --path PATHBuild/refresh index manually
vexor config --showDisplay current configuration
vexor config --clear-flashrankRemove cached FlashRank models under ~/.vexor/flashrank
vexor local --setup [--model MODEL]Download a local model and set provider to local
vexor local --clean-upRemove local model cache under ~/.vexor/models
vexor local --cudaEnable CUDA for local embeddings (requires onnxruntime-gpu)
vexor local --cpuDisable CUDA and use CPU for local embeddings
vexor install --skills claudeInstall Agent Skill for Claude Code
vexor install --skills codexInstall Agent Skill for Codex
vexor mcp [--path PATH]Run the MCP stdio server for AI agents
vexor doctorRun diagnostic checks (command, config, cache, API key, API connectivity)
vexor update [--upgrade] [--pre]Check for new version (optionally upgrade; --pre includes pre-releases)
vexor feedbackOpen GitHub issue form (or use gh)
vexor aliasPrint a shell alias for vx and optionally apply it

Common Flags

FlagDescription
--path PATHTarget directory (default: current working directory)
--mode MODEIndex mode (auto/name/head/brief/full/code/outline)
--top K / -kNumber of results (default: 5)
--ext .py,.md / -eFilter by extension (repeatable)
--exclude-pattern PATTERNExclude paths by gitignore-style pattern (repeatable; .js treated as **/*.js)
--include-hidden / -iInclude hidden files
--no-recursive / -nDon't recurse into subdirectories
--no-respect-gitignoreInclude files ignored by Git (does not disable .vexorignore)
--format porcelainScript-friendly TSV output
--format porcelain-zNUL-delimited output
--no-cacheIn-memory only; do not read/write index cache
--localWith index, create and use <path>/.vexor/index.db

Reranking is a config setting rather than a search flag — see Configuration → Rerank for the available strategies (off, bm25, flashrank, remote, hybrid).

Porcelain output fields: rank, similarity, path, chunk_index, start_line, end_line, preview (line fields are - when unavailable).

Ignore Files

Use .vexorignore for project-specific indexing exclusions. It supports full gitignore syntax, including negation (!pattern), directory-only patterns, and anchored patterns. Files can appear in any directory; rules apply to that directory and its descendants, and Vexor follows the ancestor chain from the repository root when scanning a subdirectory. Outside a Git repository, rules are anchored at the scanned directory.

.vexorignore is always honored, including with --no-respect-gitignore. When both ignore files exist in a directory, .gitignore is read first and .vexorignore second, so .vexorignore can add exclusions or re-include a path with a negated pattern. Explicit --exclude-pattern rules still apply separately. Changes to .vexorignore are detected automatically by the index staleness check, so the next search or index refresh updates the indexed file set.

Index Modes

Control embedding granularity with --mode:

ModeDescription
autoDefault. Smart routing: Python/JS/TS → code, Markdown → outline, small files → full, large files → head
nameEmbed filename only (fastest, zero content reads)
headExtract first snippet for lightweight semantic context
briefExtract high-frequency keywords from PRDs/requirements docs
fullChunk entire content; long documents searchable end-to-end
codeAST-aware chunking by module/class/function boundaries for Python and JavaScript/TypeScript; other files fall back to full
outlineChunk Markdown by heading hierarchy with breadcrumbs; non-.md falls back to full

Cache Behavior

Index cache keys derive from: --path, --mode, --include-hidden, --no-recursive, --no-respect-gitignore, --ext, --exclude-pattern.

Keep flags consistent to reuse cache; changing flags creates a separate index.

By default, indexes are stored in ~/.vexor/index.db. Project-local caching is opt-in: create a .vexor/ directory in a project root, or run vexor index --local. Either way, Vexor writes a self-ignoring .gitignore (*) inside .vexor/ on first use so the index database cannot be committed by accident. For each index or search operation, Vexor walks upward from the resolved target path and uses the nearest .vexor/ directory it finds. This means nested projects use their nearest marker. Searching a parent directory above a project root does not discover markers in its children and therefore uses the global database.

Cache location precedence is: an explicit API/cache override, then the nearest project .vexor/, then ~/.vexor/. Only index.db moves into a project. Configuration, update-check data, FlashRank assets, and local embedding models remain under the global ~/.vexor/ directory.

vexor config --show-index-all    # list all cached indexes
vexor config --clear-index-all   # clear all cached indexes
vexor index --path . --clear     # clear index for specific path
vexor index --path . --local     # create/use ./.vexor/index.db

Re-running vexor index only re-embeds changed files; >50% changes trigger full rebuild.