经 AI Skill Hub 精选评估,Tokenix 获评「强烈推荐」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.0 分,适合有一定技术背景的用户使用。
本地语义搜索、符号图、秘密扫描和CLI工具
Tokenix 是一款基于 Rust 开发的开源工具,专注于 ai、ai-tools、cli 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
本地语义搜索、符号图、秘密扫描和CLI工具
Tokenix 是一款基于 Rust 开发的开源工具,专注于 ai、ai-tools、cli 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:cargo install(推荐) cargo install tokenix # 方式二:从源码编译 git clone https://github.com/juninmd/tokenix cd tokenix cargo build --release # 二进制在 ./target/release/tokenix
# 查看帮助 tokenix --help # 基本运行 tokenix [options] <input> # 详细使用说明请查阅文档 # https://github.com/juninmd/tokenix
# tokenix 配置说明 # 查看配置选项 tokenix --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export TOKENIX_CONFIG="/path/to/config.yml"
<p><strong>Give your AI coding agent the exact slice of the repo it needs — not the whole file.</strong></p>
<p><em>Local code index · Tree-sitter symbol graph · Surgical reads · Deterministic output filters · Native agent hooks</em></p>
<p> <a href="https://github.com/juninmd/tokenix/releases"><img src="https://img.shields.io/github/v/release/juninmd/tokenix?style=flat-square&color=ff7700&label=release" alt="Latest Release" /></a> <a href="https://crates.io/crates/tokenix"><img src="https://img.shields.io/crates/v/tokenix?style=flat-square&color=e05d44&label=crates.io" alt="crates.io" /></a> <a href="https://crates.io/crates/tokenix"><img src="https://img.shields.io/crates/d/tokenix?style=flat-square&color=blue&label=downloads" alt="crates.io downloads" /></a> <a href="https://github.com/juninmd/tokenix/stargazers"><img src="https://img.shields.io/github/stars/juninmd/tokenix?style=flat-square&color=yellow" alt="GitHub stars" /></a> <a href="https://github.com/juninmd/tokenix/actions/workflows/rust.yml"><img src="https://img.shields.io/github/actions/workflow/status/juninmd/tokenix/rust.yml?branch=main&style=flat-square&label=CI" alt="CI" /></a> <a href="https://scorecard.dev/viewer/?uri=github.com/juninmd/tokenix"><img src="https://img.shields.io/ossf-scorecard/github.com/juninmd/tokenix?style=flat-square&label=scorecard" alt="OpenSSF Scorecard" /></a> <a href="https://github.com/juninmd/tokenix/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="License" /></a> <a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/built%20with-Rust%20(MSRV%201.90)-dea584?style=flat-square&logo=rust" alt="Built with Rust" /></a> <img src="https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-555555?style=flat-square" alt="Platforms" /> </p>
<p> <a href="#-quick-start"><b>⚡ Quick start</b></a> · <a href="#-features-at-a-glance"><b>✨ Highlights</b></a> · <a href="#-using-tokenix-day-to-day"><b>🧭 Guide</b></a> · <a href="#-agent-guides"><b>🔌 Agent guides</b></a> · <a href="#-dashboard"><b>🖥️ Dashboard</b></a> · <a href="#-command-reference"><b>📖 Commands</b></a> · <a href="#-troubleshooting"><b>❓ Troubleshooting</b></a> </p> </div>
---
⚡ tokenix is a high-performance Rust CLI that sits directly between your AI coding agent and your repository. It indexes your codebase locally, and it never changes what the agent reads. It trims verbose command output (a 10,000-line test run keeps its errors) and offers a symbol graph and outlines the agent can call when it wants them.
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ Native Read(src/hook.rs) → 1,518 lines → 13,498 tokens (always allowed, untouched) │
│ tokenix read src/hook.rs → outline → 2,395 tokens (opt-in; omits usages/tests) │
└─────────────────────────────────────────────────────────────────────────────────────────────┘
| ⚡ Local Code Index | 🌲 Tree-sitter Symbol Graph | ✂️ Deterministic Output Filters |
|---|---|---|
| A SQLite index of every file, chunked by symbol. No model to download, no background process, zero external services. | Deep AST symbol parsing with PageRank importance, bidirectional caller/callee tracing, and diff blast-radius impact analysis. | 528+ bundled filters stripping noisy build/test logs without masking real errors or exit codes. |
| 🛡️ Zero-Trust Security | 📉 Measured Token Savings | 🔌 Universal Agent Compatibility |
|---|---|---|
| In-flight credential masking on hooks and failure tees. Repo-controlled filters are isolated behind SHA-256 trust gates. | 40% to 90% real payload reduction before prompt-cache writes. 100% fail-open contract (always exit 0 on errors). | Native hook support for Claude Code, OpenAI Codex, GitHub Copilot, Antigravity, OpenCode, and any MCP client. |
---
```bash
[!NOTE] Four simple steps, about three minutes. Nothing is downloaded besides the binary.
| Agent | Install | Integration | Guide |
|---|---|---|---|
| **Claude Code** | tokenix install-hook --tool claude-code | PreToolUse hook in settings.json | [docs/agents/claude-code.md](docs/agents/claude-code.md) |
| **OpenAI Codex CLI** | tokenix install-hook --tool codex | PreToolUse hook for commands + tx-read/tx-symbols helpers | [docs/agents/codex.md](docs/agents/codex.md) |
| **GitHub Copilot** | tokenix install-hook --tool copilot | PreToolUse + PostToolUse hooks; --local commits them to .github/ | [docs/agents/copilot.md](docs/agents/copilot.md) |
| **Antigravity** | tokenix install-hook --tool antigravity | Native plugin | [docs/agents/antigravity.md](docs/agents/antigravity.md) |
| **OpenCode** | tokenix install-hook --tool opencode | MCP server only | [docs/agents/opencode.md](docs/agents/opencode.md) |
| **Any MCP client** | tokenix mcp | MCP server with six structure tools: tokenix_symbols, tokenix_graph (callers · callees · impact · flow), tokenix_blast, tokenix_modules, tokenix_deps, tokenix_tokenmap. They return locations and diagrams, never code, and never search contents |
tokenix install-hook --tool all wires every agent except OpenCode. OpenCode's registration lives in the repository, so you have to ask for it explicitly. tokenix remove-hook --tool <agent> undoes the install.
---
[!TIP] Runtokenix --helpfor the full catalog with usage examples;tokenix <command> --helpdisplays all flags and parameters for any specific command.
The same commands the agent uses work in your terminal. Here they run against a two-file demo project:
```console $ tokenix symbols apply_tax
| Symptom | Fix |
|---|---|
No index found | Run tokenix index . in the repository root. The nearest indexed directory counts as the project root, even when a parent directory has a package.json. |
| The agent still reads whole files | By design: tokenix never intercepts Read. The agent can call tokenix read or tokenix symbols itself. |
| A symbol I just wrote is missing | It should not: edits are re-chunked before each command. If more than 25 files changed, run tokenix index (or raise TOKENIX_AUTO_REFRESH_MAX). |
| A repo filter is ignored | Run tokenix trust --status. Repo filters need tokenix trust, and an edit revokes it. |
| Output was cut and I need all of it | Run tokenix retrieve <key> from the [tokenix: ...] marker, or tokenix run --raw. |
| First index is slow or the machine stalls | Use tokenix index --cpu-profile low. |
| Offline or air-gapped | Nothing to download: the only network use is the self-updater (TOKENIX_NO_UPDATE=1 disables it). |
| Remove everything | tokenix remove-hook --tool all, then delete ~/.tokenix (or your TOKENIX_HOME). |
---
Tokenix是一个功能强大的本地语义搜索工具
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Tokenix 的核心功能完整,质量优秀。对于AI 技术爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | tokenix |
| 原始描述 | 开源AI工具:Local semantic search, symbol graphs, secrets scanning, output filters, and CLI 。⭐11 · Rust |
| Topics | aiai-toolsclirust |
| GitHub | https://github.com/juninmd/tokenix |
| License | MIT |
| 语言 | Rust |
收录时间:2026-06-17 · 更新时间:2026-06-20 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。