Skip to main content Switch to mobile version tensor-grep 2.1.2 Fast local code search, symbol navigation, and token-budgeted AI context (Rust + tree-sitter + MCP; zero API key required, GPU experimental)
pip install tensor-grep==2.1.2 Copy PIP instructions
Find the code. Understand the change.
tensor-grep (tg) is a local-first code search, symbol-navigation, and AI context CLI. It combines regex and structural AST search with repository orientation, caller/blast-radius analysis, diff-impact slicing, rollback checkpoints, and an MCP server—with zero telemetry and no API key required for core workflows.
Get started · Installation · Upgrading (v1.x to v2.0) · How it works · Releases
30-second quickstart
With Python 3.11+ on Windows, macOS, and Linux (or the managed native installer in docs/installation.md):
python -m pip install tensor-grep tg --version From any repository:
# 1. Find literal text or regex matches with line numbers tg search -F -n "TODO" src # 2. Orient yourself in an unfamiliar codebase tg orient src # 3. Trace callers and prepare an edit-readiness capsule (add --json or --json --compact) tg callers src create_invoice --json tg prepare src "add invoice tax validation" --json --compact # 4. Inspect git diff blast radius before committing tg diff-impact . --json Commands default to concise human-readable text when --json is omitted; pass --json for machine output or --json --compact for a bounded <= 4,000-byte JSON payload.
12-command core workflow (tg --help vs tg --help-all)
tg --help highlights the 12 core workflow commands so humans and agents can start without noise. Run tg --help-all for the complete command catalog.
For AST structural search and rulesets via PyPI, install python -m pip install "tensor-grep[ast,scan]" (the managed native binary supports tg run directly). In PowerShell, wrap patterns containing $VALUE in single quotes:
tg run -p 'print($VALUE)' --lang python src Why tg vs rg + ast-grep + IDE
rg (ripgrep) is the cold exact-text search baseline. tg does not replace rg; it routes compatible cold text searches through rg or its native CPU engine, and adds warm trigram indexing (tg search --index), symbol graphs, and bounded AI context on top.
ast-grep (sg) has the broader structural-rule surface. tg run and tg scan expose a validated AST search/rewrite slice alongside symbol navigation, diff impact, and checkpoints in one CLI.
IDEs hold rich semantic state interactively, but scripts, CI gates, and coding assistants need headless, deterministic, token-budgeted CLI/MCP outputs (--json, --json --compact, tg_batch, and tg review-bundle verify --require-change-slice) without GUI startup or cloud telemetry.
Zero-telemetry, local-first: Core search, indexing (.tg_cache/), symbol graphs, sessions, and checkpoints run 100% locally with no API key and no outbound telemetry.
Benchmark & verification surfaces
Performance and accuracy claims in tensor-grep are benchmark-governed and workload-specific. Rather than quoting cherry-picked numbers, each surface has a reproducible harness in benchmarks/ documented in docs/benchmarks.md and docs/tool_comparison.md:
Bounded scans can return partial results. Confidence scores and caller graphs are evidence to review, not proof that a change is safe or that a symbol is unused.
Installation & platform channels
Windows (x64), macOS (x64 / Apple Silicon), and Linux (x64 / ARM64) installation options are documented in docs/installation.md and the support matrix. npm, Homebrew, and Winget manifests exist in the repository but are not published to their registries yet.
Contribute and get help
Report a bug, request a feature, or ask a question. Include the command, tg --version, your platform, and a small reproducible example.
See CONTRIBUTING.md for development and review conventions, and SECURITY.md for private vulnerability reporting.
Ongoing work focuses on retrieval quality, cross-file navigation, larger repositories, and integrations. Experimental features graduate through measured results and compatibility checks. See the experimental-feature guide for current boundaries and GitHub issues for discussion.
Apache-2.0. See LICENSE. Related project: gotcontext.ai.
Optional runtime dependency security and verification: security floors.
Released: Nov 29, 2026
All 4 files in this release have provenance metadata.
View provenance details
ast bench dev gpu gpu-win nlp rerank scan semantic
Release files for tensor-grep 2.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distributions (wheels)
Total release size: 34.0 MB
Release files / tensor_grep-2.1.2.tar.gz
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Release files / tensor_grep-2.1.2-cp311-abi3-win_amd64.whl
Security for tensor-grep 2.1.2
All 4 files in this release have been uploaded with provenance metadata.
With provenance tensor_grep-2.1.2.tar.gz Nov 29, 2026
With provenance tensor_grep-2.1.2-cp311-abi3-win_amd64.whl Nov 29, 2026
Attestation for tensor_grep-2.1.2.tar.gz
Attestation for tensor_grep-2.1.2-cp311-abi3-win_amd64.whl
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
Nov 29, 2026 4 release files Full provenance
Nov 28, 2026 4 release files Full provenance
Nov 27, 2026 4 release files Full provenance
Nov 26, 2026 4 release files Full provenance
Nov 25, 2026 4 release files Full provenance
Nov 24, 2026 4 release files Full provenance
Nov 22, 2026 4 release files Full provenance
Nov 16, 2026 4 release files Full provenance
Nov 15, 2026 4 release files Full provenance
Nov 14, 2026 4 release files Full provenance
Nov 13, 2026 4 release files Full provenance
Nov 12, 2026 4 release files Full provenance
Nov 7, 2026 4 release files Full provenance
Nov 6, 2026 4 release files Full provenance
Nov 3, 2026 4 release files Full provenance
Nov 2, 2026 4 release files Full provenance
Nov 1, 2026 4 release files Full provenance
Oct 31, 2026 4 release files Full provenance
Oct 30, 2026 4 release files Full provenance
Oct 29, 2026 4 release files Full provenance
Oct 28, 2026 4 release files Full provenance
Oct 27, 2026 4 release files Full provenance
Oct 26, 2026 4 release files Full provenance
Oct 25, 2026 4 release files Full provenance
Oct 24, 2026 4 release files Full provenance
Oct 23, 2026 4 release files Full provenance
Oct 22, 2026 4 release files Full provenance
Oct 21, 2026 4 release files Full provenance
Oct 11, 2026 4 release files Full provenance
Oct 10, 2026 4 release files Full provenance
Oct 9, 2026 4 release files Full provenance
Oct 8, 2026 4 release files Full provenance
Oct 7, 2026 4 release files Full provenance
Oct 6, 2026 4 release files Full provenance
Oct 5, 2026 4 release files Full provenance
Oct 4, 2026 4 release files Full provenance
Oct 3, 2026 4 release files Full provenance
Oct 2, 2026 4 release files Full provenance
Oct 1, 2026 4 release files Full provenance
Sep 24, 2026 4 release files Full provenance
Sep 23, 2026 4 release files Full provenance
Sep 22, 2026 4 release files Full provenance
Sep 20, 2026 4 release files Full provenance
Sep 13, 2026 4 release files Full provenance
Sep 12, 2026 4 release files Full provenance
Sep 10, 2026 4 release files Full provenance
Sep 8, 2026 4 release files Full provenance
Sep 6, 2026 4 release files Full provenance
Sep 5, 2026 4 release files Full provenance
Sep 4, 2026 4 release files Full provenance
Sep 3, 2026 4 release files Full provenance
Aug 30, 2026 4 release files Full provenance
Aug 24, 2026 4 release files Full provenance
Aug 23, 2026 4 release files Full provenance
Aug 22, 2026 4 release files Full provenance
Aug 21, 2026 2 release files Full provenance
Aug 20, 2026 4 release files Full provenance
Aug 19, 2026 4 release files Full provenance
Aug 13, 2026 4 release files Full provenance
Aug 11, 2026 4 release files Full provenance
Aug 10, 2026 4 release files Full provenance
Aug 9, 2026 4 release files Full provenance
Aug 8, 2026 4 release files Full provenance
Aug 7, 2026 4 release files Full provenance
Aug 6, 2026 4 release files Full provenance
Aug 5, 2026 4 release files Full provenance
Aug 4, 2026 4 release files Full provenance
Aug 2, 2026 4 release files Full provenance
Aug 1, 2026 4 release files Full provenance
Jul 31, 2026 4 release files Full provenance
Jul 30, 2026 4 release files Full provenance
Jul 29, 2026 4 release files Full provenance
Jul 28, 2026 4 release files Full provenance
Jul 27, 2026 4 release files Full provenance
Jul 26, 2026 4 release files Full provenance
Jul 25, 2026 4 release files Full provenance
Jul 24, 2026 4 release files Full provenance
Jul 23, 2026 4 release files Full provenance
Jul 22, 2026 4 release files Full provenance
Jul 21, 2026 4 release files Full provenance
Jul 20, 2026 4 release files Full provenance
Jul 19, 2026 4 release files Full provenance
Jul 18, 2026 4 release files Full provenance
Jul 17, 2026 4 release files Full provenance
Jul 16, 2026 4 release files Full provenance
Jul 15, 2026 4 release files Full provenance
Jul 14, 2026 4 release files Full provenance
Jul 13, 2026 4 release files Full provenance
Jul 12, 2026 4 release files Full provenance
Jul 11, 2026 4 release files Full provenance
Jul 10, 2026 4 release files Full provenance
Jul 9, 2026 4 release files Full provenance
Jul 8, 2026 4 release files Full provenance
Jul 7, 2026 4 release files Full provenance
Jul 6, 2026 4 release files Full provenance
Jul 5, 2026 4 release files Full provenance
Jul 4, 2026 4 release files Full provenance
Jul 3, 2026 4 release files Full provenance
Jun 28, 2026 4 release files Full provenance
Jun 27, 2026 4 release files Full provenance
Jun 26, 2026 4 release files Full provenance
May 23, 2026 4 release files Full provenance
May 15, 2026 4 release files Full provenance
May 11, 2026 4 release files Full provenance
May 9, 2026 4 release files Full provenance
May 1, 2026 4 release files Full provenance
Apr 30, 2026 4 release files Full provenance
Apr 27, 2026 4 release files Full provenance
Apr 19, 2026 4 release files Full provenance
Apr 18, 2026 4 release files Full provenance
Apr 16, 2026 4 release files Full provenance
Apr 12, 2026 4 release files Full provenance
Apr 2, 2026 4 release files Full provenance
Apr 1, 2026 4 release files Full provenance
Mar 20, 2026 4 release files Full provenance
Mar 7, 2026 4 release files Full provenance
Mar 6, 2026 4 release files Full provenance
Mar 4, 2026 4 release files Full provenance
Mar 3, 2026 4 release files Full provenance
Mar 2, 2026 4 release files Full provenance
Feb 27, 2026 4 release files No provenance
Feb 25, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from fc0d8e6











