Skip to main content

vera-ai

Vera is code retrieval and structural navigation for AI coding agents and developers, built to spend less context finding the right code. Describe what a piece of code does, look up where a symbol is defined, or trace who calls it, and Vera returns ranked functions, classes, and call sites with file paths and line ranges.

Each project's index lives in .vera/ with no background daemon or database server. Parsing, storage, BM25 keyword search, and code-aware ranking always run on your machine; embeddings run either locally on any CPU (potion-code-16M-v2, offline after one download) or through an OpenAI-compatible API such as Qwen3 embeddings plus reranking.

This package installs the native vera binary and runs it.

Install and setup

1. One-time machine setup

uvx vera-ai install
# or
pip install vera-ai && vera-ai install

Requires Python 3.9 or later.

install downloads the native Vera binary matching this package's version, adds a vera command to your user bin directory (for example ~/.local/bin), and opens the agent skill picker if you are in a terminal. Without a terminal (as in CI), it installs the binary and skips the skill picker. vera-ai <command> (or uvx vera-ai <command>) also forwards any command to the binary.

Next, pick your model backend once for your machine (and install the skill globally if you skipped it):

vera setup
vera agent install

2. In each repository

vera index .
vera search "where expired sessions are cleaned up"

Inside a Git repository, Vera automatically adds .vera/ and its .vera.* working files to .git/info/exclude, so you do not need to edit .gitignore. After editing code, vera update . or vera watch . refreshes only changed files.

Designed for context efficiency

  • Hybrid retrieval aimed at definitions. On an embedded index, each query runs BM25 keyword search and embedding similarity together, fuses the rankings, optionally reranks top candidates, and prioritizes symbol definitions and source files over passing mentions, tests, docs, and generated code (a --full-text-only index uses BM25 alone).
  • Whole symbols and compact output. Tree-sitter extracts functions, classes, methods, and structs across most of Vera's 65 supported languages. Results come back as plain Markdown code blocks labeled with path:start-end kind:name (--compact returns signatures without bodies; --json outputs JSON).
  • Direct structural lookup. The same index answers definitions (vera structural definitions), callers and callees (vera references), HTTP routes (vera structural routes), environment variable reads (vera structural env), SQL sites, explicit implementations (vera structural impls), and dead-code candidates (vera dead-code).
  • Fast on CPU, including dependency trees. On an AMD Ryzen 7 9800X3D CPU, Vera indexes its own repository (447 files, ~8,100 chunks) in 0.9 seconds with Potion Code and answers a CLI search in ~0.13 seconds including process startup. Index dependency sources without embeddings via vera index ~/.cargo/registry/src --full-text-only, then search them alongside your repo with vera search "retry backoff" --also ~/.cargo/registry/src.
  • Agent integration. For shell-capable agents (Claude Code, OpenCode, Codex, Factory Droid, Cursor, Gemini CLI, Copilot, and other Agent Skills clients), vera agent install installs an on-demand skill that teaches when to use vera search, vera structural, vera references, rg, or direct file reads. An MCP server (vera mcp) is included for MCP-centric clients; see the MCP guide.
  • Measured retrieval and agent efficiency. In a 4-arm Flask experiment (10 cross-file questions, 40 sessions, all 10/10 blind-judged), Vera with Qwen3 API embeddings + reranking cut total prompt tokens by 48% vs grep/file reads (statistically significant at p = 0.037), while local Vera observed -27% vs Semble CLI's -12% (within noise at N = 10). On Semble v0.5.5's 1,251-task benchmark with potion-code-16M-v2, Vera 2.0.1 scored 0.8436 nDCG@10 vs Semble 0.5.5's 0.8514 (0.9199 vs 0.9177 Recall@5) in 4.7 GB vs 32 GB of disk space. Details: Benchmarks.

Common commands

Task Command
Guided backend and skill setup vera setup
Orient in an unfamiliar repository vera overview
Search by behavior vera search "retry failed uploads with backoff"
Scan signatures only vera search "request validation" --compact --limit 8
Narrow results vera search "error handling" --lang rust --path "src/**" --type function
Scope to uncommitted or branch changes vera search "token validation" --changed (or --base main)
Search another indexed tree alongside yours vera search "retry backoff" --also ~/.cargo/registry/src
Find a definition vera structural definitions parse_config
Find callers or callees vera references parse_config / vera references parse_config --callees
Regex search over indexed files vera grep "TODO|FIXME"
Refresh changed files vera update . or vera watch .
Diagnose why a file was skipped vera explain-path path/to/file
Install or update agent skills vera agent install
Check your setup vera doctor
Check for a newer release vera upgrade

Models and privacy

Two starting points fit most workflows:

  • Local CPU (vera setup --potion-code, default): runs MinishLab's potion-code-16M-v2 on any CPU with no GPU, ONNX Runtime, or API key, and works offline after a one-time ~32 MB download.
  • API mode (vera setup --api): pairs qwen/qwen3-embedding-8b and qwen/qwen3-reranker-8b via the OpenRouter preset (one paid key) or any OpenAI-compatible embedding endpoint plus optional generic/Voyage reranking (including separate hosts or a local llama.cpp server) for maximum retrieval quality.

Local GPU ONNX backends (vera setup --onnx-jina-cuda and others) and keyword-only indexes (--full-text-only) are also supported; see Models and backends.

With a local backend and no external reranker or completion endpoint configured, your code and queries stay on your machine. Data goes elsewhere only to endpoints you configure: API mode sends chunk text and queries to your embedding host, an API reranker receives queries and top candidate chunks, and --deep with a completion endpoint sends the query plus local symbol names and file paths. Vera checks GitHub for a new release once a day; set VERA_NO_UPDATE_CHECK=1 to disable it.

How this package installs Vera

  • Downloads the release archive matching this package's exact version (VERA_MANIFEST_URL overrides the manifest URL) and verifies archive size and SHA-256 before extracting.
  • Caches the verified binary in Vera's data directory (~/.local/share/vera on Linux) for offline reuse.
  • Covers Linux (x86_64, aarch64, plus static musl on x86_64 systems without glibc), macOS (Intel and Apple Silicon), and Windows (x86_64). Set VERA_TARGET to override target detection, for example VERA_TARGET=x86_64-unknown-linux-musl uvx vera-ai install.
  • vera uninstall removes the binary, models, configuration, agent skills, and the vera shim while leaving per-project .vera/ indexes untouched.

Documentation

Vera is MIT licensed.

Metadata

Release files for vera-ai 2.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vera-ai 2.5.0
File Size Uploaded Provenance Actions
vera_ai-2.5.0.tar.gz 16.5 kB Without provenance Details for vera_ai-2.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vera-ai 2.5.0
File Interpreter ABI Platform Actions
vera_ai-2.5.0-py3-none-any.whl Python 3 none any Details for vera_ai-2.5.0-py3-none-any.whl

Total release size: 28.3 kB

Release files / vera_ai-2.5.0.tar.gz

Download URL vera_ai-2.5.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0ec2c9b4b48a3723f4336655b642d3710fb27bb1626de6975608d7109b92a92c
BLAKE2b-256 checksum
How to use checksums
990b34e056b73fb385e66e11eae618aa5a991b09e17b0188d6c6ac35d72a3aef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / vera_ai-2.5.0-py3-none-any.whl

Download URL vera_ai-2.5.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbfb1c2d86039cbbbcf16f690e19cd5a4933b29039e1d09512e14fb7a9b835dd
BLAKE2b-256 checksum
How to use checksums
66ac7911f95e29f17a7eae3c79d8e851018dc0563b6ce4042399f0333b5f5495
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.11.18

Security for vera-ai 2.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.5.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page