@vera-ai/cli 2.3.1 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -39
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# @vera-ai/cli
|
|
2
2
|
|
|
3
|
-
Vera is
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
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.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This package installs the native `vera` binary and runs it.
|
|
8
|
+
|
|
9
|
+
## Install and setup
|
|
10
|
+
|
|
11
|
+
### 1. One-time machine setup
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
14
|
npx -y @vera-ai/cli install
|
|
@@ -14,72 +18,78 @@ bunx @vera-ai/cli install
|
|
|
14
18
|
|
|
15
19
|
Requires Node.js 18 or later (or Bun).
|
|
16
20
|
|
|
17
|
-
`install` downloads the Vera binary
|
|
21
|
+
`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. `npx -y @vera-ai/cli <command>` also forwards any command to the binary.
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
Next, pick your model backend once for your machine (and install the skill globally if you skipped it):
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
|
-
|
|
23
|
-
vera
|
|
26
|
+
vera setup
|
|
27
|
+
vera agent install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. In each repository
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
```bash
|
|
33
|
+
vera index .
|
|
26
34
|
vera search "where expired sessions are cleaned up"
|
|
27
35
|
```
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## What you get
|
|
37
|
+
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.
|
|
32
38
|
|
|
33
|
-
|
|
34
|
-
- Whole functions, not line fragments. Vera indexes functions, classes, methods, and other symbols as separate results, with structural (tree-sitter) parsing for most of its 65 supported languages.
|
|
35
|
-
- Fast on an ordinary CPU. On a Ryzen 7 9800X3D desktop, Vera indexes its own repository (447 files, about 8,100 chunks) in under a second, and a command-line search returns in about 0.13 seconds including process startup. A search over a 51,000-file keyword-only index takes about 0.2 seconds. `vera update .` and `vera watch .` re-index only changed files.
|
|
36
|
-
- Measured search quality. On Semble's 1,251-task code search benchmark, with the same embedding model for both tools, Vera scores within 1% of Semble on nDCG@10 and slightly ahead on Recall@5, with an index about a seventh the size. See the [benchmarks](https://github.com/VeraTools/Vera/blob/master/docs/benchmarks.md).
|
|
37
|
-
- Dependency search. Index a dependency tree once with `--full-text-only` (keyword-only, no model needed), then search it next to your project with `vera search "retry backoff" --also ~/.cargo/registry/src`.
|
|
38
|
-
- Structural questions from the same index: where a symbol is defined, who calls it, which routes or environment variables exist, which types implement an interface, and which functions have no callers. A search can be limited to files changed in your working tree or branch.
|
|
39
|
-
- Agent integration. `vera agent install` adds a Vera skill to more than 30 agent clients, including Claude Code, Codex, Cursor, OpenCode, Gemini CLI, and Copilot. An MCP server (`vera mcp`) is included for clients that prefer it; see the [MCP guide](https://github.com/VeraTools/Vera/blob/master/docs/mcp.md).
|
|
39
|
+
## Designed for context efficiency
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
- **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).
|
|
42
|
+
- **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).
|
|
43
|
+
- **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`).
|
|
44
|
+
- **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`.
|
|
45
|
+
- **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](https://github.com/VeraTools/Vera/blob/master/docs/mcp.md).
|
|
46
|
+
- **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](https://github.com/VeraTools/Vera/blob/master/docs/benchmarks.md).
|
|
42
47
|
|
|
43
48
|
## Common commands
|
|
44
49
|
|
|
45
50
|
| Task | Command |
|
|
46
51
|
|---|---|
|
|
47
|
-
| Guided setup | `vera setup` |
|
|
52
|
+
| Guided backend and skill setup | `vera setup` |
|
|
53
|
+
| Orient in an unfamiliar repository | `vera overview` |
|
|
48
54
|
| Search by behavior | `vera search "retry failed uploads with backoff"` |
|
|
49
|
-
|
|
|
50
|
-
|
|
|
51
|
-
|
|
|
55
|
+
| Scan signatures only | `vera search "request validation" --compact --limit 8` |
|
|
56
|
+
| Narrow results | `vera search "error handling" --lang rust --path "src/**" --type function` |
|
|
57
|
+
| Scope to uncommitted or branch changes | `vera search "token validation" --changed` (or `--base main`) |
|
|
58
|
+
| Search another indexed tree alongside yours | `vera search "retry backoff" --also ~/.cargo/registry/src` |
|
|
52
59
|
| Find a definition | `vera structural definitions parse_config` |
|
|
53
|
-
| Find callers
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
| Install
|
|
60
|
+
| Find callers or callees | `vera references parse_config` / `vera references parse_config --callees` |
|
|
61
|
+
| Regex search over indexed files | `vera grep "TODO\|FIXME"` |
|
|
62
|
+
| Refresh changed files | `vera update .` or `vera watch .` |
|
|
63
|
+
| Diagnose why a file was skipped | `vera explain-path path/to/file` |
|
|
64
|
+
| Install or update agent skills | `vera agent install` |
|
|
58
65
|
| Check your setup | `vera doctor` |
|
|
59
66
|
| Check for a newer release | `vera upgrade` |
|
|
60
67
|
|
|
61
68
|
## Models and privacy
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Two starting points fit most workflows:
|
|
71
|
+
|
|
72
|
+
- **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.
|
|
73
|
+
- **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.
|
|
64
74
|
|
|
65
|
-
`vera setup --
|
|
75
|
+
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](https://github.com/VeraTools/Vera/blob/master/docs/models.md).
|
|
66
76
|
|
|
67
|
-
With a local backend, your code and queries stay on your machine.
|
|
77
|
+
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.
|
|
68
78
|
|
|
69
79
|
## How this package installs Vera
|
|
70
80
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
- `vera uninstall` removes the binary, models, configuration, agent skills, and the `vera` command.
|
|
81
|
+
- 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.
|
|
82
|
+
- Caches the verified binary in Vera's data directory (`~/.local/share/vera` on Linux) for offline reuse.
|
|
83
|
+
- 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 npx -y @vera-ai/cli install`.
|
|
84
|
+
- `vera uninstall` removes the binary, models, configuration, agent skills, and the `vera` shim while leaving per-project `.vera/` indexes untouched.
|
|
76
85
|
|
|
77
86
|
## Documentation
|
|
78
87
|
|
|
79
|
-
- [Installation guide](https://github.com/VeraTools/Vera/blob/master/docs/installation.md):
|
|
80
|
-
- [
|
|
88
|
+
- [Installation guide](https://github.com/VeraTools/Vera/blob/master/docs/installation.md): backends, agent skills, prebuilt binaries, Docker
|
|
89
|
+
- [Models and backends](https://github.com/VeraTools/Vera/blob/master/docs/models.md): local CPU, Qwen API, GPU ONNX, and custom models
|
|
90
|
+
- [Query guide](https://github.com/VeraTools/Vera/blob/master/docs/query-guide.md): choosing commands and phrasing queries
|
|
81
91
|
- [Features](https://github.com/VeraTools/Vera/blob/master/docs/features.md): every command and flag
|
|
82
|
-
- [Benchmarks](https://github.com/VeraTools/Vera/blob/master/docs/benchmarks.md):
|
|
92
|
+
- [Benchmarks](https://github.com/VeraTools/Vera/blob/master/docs/benchmarks.md): agent context-efficiency study, retrieval snapshots, and methodology
|
|
83
93
|
- [GitHub repository](https://github.com/VeraTools/Vera): source, issues, and release notes
|
|
84
94
|
|
|
85
95
|
Vera is MIT licensed.
|