codeseek
Rust-powered code intelligence CLI for AI coding agents. Builds call graphs and hybrid semantic search indexes (Dense + Sparse + RRF + Reranker) across 7 languages. Ships as native MCP tools for Claude Code and Codex CLI.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/CodeBendKit/codeseek with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/CodeBendKit/codeseek'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/codebendkit--codeseek)HTML
<a href="/listings/codebendkit--codeseek"><img src="/api/listings/codebendkit--codeseek/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
# Install via npm (handles setup wizard + binary download automatically) npm install -g codeseek # First run — interactive setup wizard configures your embedding model codeseek # Index your project codeseek init # Search code by symbol name codeseek search main --limit 10 # Query call graph codeseek callers main codeseek callees process_data # Register with Claude Code / Codex as MCP tools codeseek install # Check status codeseek status # Auto-index on git commits codeseek install-hooks
Natural Language Code Search example
╰─$ codeseek search 'how the code embedding work' 1. get_embedding (0.7973) /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0 2. EmbeddingService (0.2855) /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0 3. EmbeddingData (0.1449) /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0 4. EmbeddingResponse (0.1304) /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0 5. default_model (0.0450) /home/do/ssd/iohub/dev/codeseek/rust-core/src/config.rs:0
Function Call Graph example
╰─$ codeseek callgraph apply_rerank Call graph for 'apply_rerank' (depth=1): == Callers (upstream, depth=1) == search (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/hybrid_search.rs:210) == Callees (downstream, depth=1) == rerank (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/reranker_service.rs:331) config (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/hybrid_search.rs:325)
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
README.md · README · 343 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.
- # CodeSeek
- **Code intelligence CLI tool for Claude Code.** AST-based call graph analysis + semantic search — right from your terminal.
- ## Quick Start
- ```bash
- # Install via npm (handles setup wizard + binary download automatically)
- npm install -g codeseek
- # First run — interactive setup wizard configures your embedding model
- codeseek
- # Index your project
- codeseek init
- # Search code by symbol name
- codeseek search main --limit 10
- # Query call graph
- codeseek callers main
- codeseek callees process_data
- # Register with Claude Code / Codex as MCP tools
- codeseek install
- # Check status
- codeseek status
- # Auto-index on git commits
- codeseek install-hooks
- ```
- Natural Language Code Search example
- ```bash
- ╰─$ codeseek search 'how the code embedding work'
- 1. get_embedding (0.7973)
- /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0
- 2. EmbeddingService (0.2855)
- /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0
- 3. EmbeddingData (0.1449)
- /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0
- 4. EmbeddingResponse (0.1304)
- /home/do/ssd/iohub/dev/codeseek/rust-core/src/services/embedding_service.rs:0
- 5. default_model (0.0450)
- /home/do/ssd/iohub/dev/codeseek/rust-core/src/config.rs:0
- ```
- Function Call Graph example
- ```bash
- ╰─$ codeseek callgraph apply_rerank
- Call graph for 'apply_rerank' (depth=1):
- == Callers (upstream, depth=1) ==
- search (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/hybrid_search.rs:210)
- == Callees (downstream, depth=1) ==
- rerank (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/reranker_service.rs:331)
- config (/home/do/ssd/iohub/dev/codeseek/rust-core/src/services/hybrid_search.rs:325)
- ```
- ## Install
- ### npm
- ```bash
- npm install -g codeseek
- ```
- The npm package ships a lightweight JS wrapper that handles:
- | Step | Description |
- |------|-------------|
- | **First-run wizard** | Interactive CLI prompts for embedding API token, model, and base URL |
- | **Binary download** | Automatically pulls the correct Rust binary for your platform from GitHub Releases |
- | **Pass-through** | All commands (`init`, `search`, `callers`, etc.) are forwarded to the native binary |
- Supported platforms:
- | Platform | Architecture |
- |----------|-------------|
- | macOS | arm64 (Apple Silicon), x64 (Intel) |
- | Linux | x64 |
- ### Homebrew
- ```bash
- brew tap CodeBendKit/codeseek git@github.com:CodeBendKit/codeseek.git
- brew install codeseek
- ```
- ### From source
- ```bash
- # install protoc
- # macos: brew install protobuf
- # ubuntu: sudo apt install protoc
- git clone https://github.com/CodeBendKit/codeseek.git
- cd codeseek
- ./build.sh --release
- ```
- `build.sh` compiles both the TypeScript wrapper (`dist/`) and the Rust binary, then installs to `~/.codeseek/bin/`.
- ## Commands
- | Command | Description |
- |---------|-------------|
- | `codeseek` | First-time setup wizard (configures embedding model interactively) |
- | `codeseek init` | Build/update code index (full on first run, MD5-incremental thereafter) |
- | `codeseek status` | Index statistics: functions, files, last update |
- | `codeseek search <query>` | Symbol name search (falls back from vector → graph name match) |
- | `codeseek callers <symbol>` | Find functions that call this symbol |
- | `codeseek callees <symbol>` | Find functions this symbol calls |
- | `codeseek callgraph <symbol>` | Query call graph with configurable depth (bi-directional) |
- | `codeseek list` | List all indexed projects with paths |
- | `codeseek install` | Register codeseek as MCP tools in Claude Code / Codex |
- | `codeseek uninstall` | Remove MCP integration |
- | `codeseek uninit` | Delete the current project index |
- | `codeseek install-hooks` | Install git hooks (post-commit/post-merge → `codeseek init`) |
- | `codeseek serve --mcp` | Start MCP server (stdio JSON-RPC, used by Claude Code internally) |
- All query commands support `--json` for machine-readable output.
- ## Claude Code / Codex Integration
- ```bash
- codeseek install
- ```
- Writes MCP server config to:
- | Agent | Config file |
- |-------|------------|
- | **Claude Code** | `~/.claude.json` (global, all projects) or `./.mcp.json` (project-local) |
- | **Codex CLI** | `~/.codex/config.toml` |
- Claude Code auto-discovers these tools after restart:
- | Tool | Capability |
- |------|-----------|
- | `codeseek_search` | Find symbols by name |
- | `codeseek_callers` | Trace upstream callers |
- | `codeseek_callees` | Trace downstream callees |
- | `codeseek_callgraph` | Query call graph with configurable depth (bi-directional) |
- | `codeseek_status` | Check index health |
- Remove integration:
- ```bash
- codeseek uninstall
- ```
- ## How It Works
- ### Index Building (`codeseek init`)
- ```
- Source files
- → Tree-sitter AST parse (7 languages)
- → Extract functions / classes / methods
- → Batch embed via API (20 texts per call, SQLite cache)
- → Store vectors in LanceDB
- → Build BM25 index in Tantivy
- → Serialize call graph (PetCodeGraph)
- → Save to ~/.codeseek/<project_hash>/
- ```
- **Idempotent**: first run is full build, subsequent runs compare MD5 hashes — only changed files are re-processed. Use `codeseek install-hooks` for automatic re-index on git commit/merge.
- ### Hybrid Search Pipeline (`codeseek search`)
- ```
- ┌─────────────────────┐
- User query ────────────→│ Embedding Model │──→ Query vector
- └─────────────────────┘
- │
- ┌───────────────────────┼───────────────────────┐
- ▼ ▼ ▼
- ┌──────────────┐ ┌───────────────┐ ┌───────────────┐
- │ Dense Search │ │ Sparse Search │ │ Graph Search │
- │ (LanceDB ANN)│ │ (Tantivy BM25)│ │ (PetCodeGraph)│
- └──────┬───────┘ └──────┬────────┘ └────────┬──────┘
- │ │ │
- └──────────────────────┼────────────────────────┘
- ▼
- ┌─────────────────┐
- │ RRF Fusion │ ← Reciprocal Rank Fusion
- │ (Top-20 candidates)│
- └────────┬────────┘
- │
- ▼
- ┌─────────────────┐
- │ Reranker │ ← Cross-Encoder fine re-ranking
- │ (Qwen3-Reranker)│ scores each (query, code) pair
- └────────┬────────┘
- │
- ▼
- ┌─────────────────┐
- │ Final Results │ ← Top-5 (or Top-N)
- └─────────────────┘
- ```
- | Stage | Technology | Role | Speed |
- |-------|-----------|------|:-----:|
- | **Dense Search** | LanceDB + Embedding Model | Semantic vector similarity | Fast |
- | **Sparse Search** | Tantivy BM25 | Keyword & token matching | Fast |
- | **RRF Fusion** | Reciprocal Rank Fusion | Merge heterogeneous scores fairly | Instant |
- | **Reranker** | Cross-Encoder (Qwen3-Reranker-4B) | Full-interaction precision scoring | ~1-2s |
- | **Fallback** | PetCodeGraph | Graph-based name search (no API needed) | Instant |
- If embedding/Reranker are unavailable, the pipeline falls back gracefully to graph-based name search.
- ### Storage
- - **Config**: `~/.codeseek/config.json` (global, shared across all projects)
- - **Index**: `~/.codeseek/<md5(project_root)>/`
- - `project.json` — Project metadata
- - `graph.bin` — Serialized call graph
- - `embeddings.lance/` — LanceDB vector data
- - `tantivy_bm25/` — BM25 full-text index
- - `file_hashes.json` — MD5 incremental tracking
- No daemon, no HTTP server. Every command is a standalone process.
- ## Benchmarks
- End-to-end retrieval quality on public code-search benchmarks. Every number below is produced by
- the harnesses in [`evals/`](evals/) — measured, not estimated.
- | Benchmark | What it measures | Scale | Metric | Result |
- |-----------|------------------|-------|--------|:------:|
- | **[MTEB(Code, v1)](evals/mtebcode/)** | Natural language → function retrieval over real go / java / python source, plus CosQA | 101 tasks · 3,040 queries | nDCG@10 | **0.9182** |
- | **[RepoQA](evals/repoqa/)** | Repository-level localization inside a real codebase (needle in a haystack) | 10 repos · 5 languages · 100 tasks | accuracy | **84.0%** |
- **MTEB(Code)** — go `0.9448` · java `0.9101` · python `0.8994` · CosQA `0.9598`, with recall@10
- `0.9720` and MRR@10 `0.9004`: the right function is almost always retrieved, so what remains to win
- is rank-1 ordering rather than candidate generation.
- **RepoQA** — typescript `100%` · python `90%` · rust `90%` · java `85%` · cpp `55%`.
- ```bash
- # Full reproduction commands: evals/*/results/README.md
- cd evals/mtebcode && python3 -m mtebcode_eval prepare --tasks csn,CosQA
- cd evals/repoqa && python3 -m repoqa_eval prepare
- ```
- > Conditions: codeseek v0.1.31 with `Qwen/Qwen3-Embedding-4B`, `index.hybrid.cutoff.enabled = false`.
- > Full reports under [`evals/mtebcode/results/`](evals/mtebcode/results/) and
- > [`evals/repoqa/results/`](evals/repoqa/results/).
- ## Supported Languages
- | Language | Functions | Structs/Classes | Call Graph |
- |----------|:---------:|:---------------:|:----------:|
- | Rust | ✅ | ✅ | ✅ |
- | Python | ✅ | ✅ | ✅ |
- | JavaScript | ✅ | ✅ | ✅ |
- | TypeScript | ✅ | ✅ | ✅ |
- | Go | ✅ | ✅ | ✅ |
- | C/C++ | ✅ | ✅ | ✅ |
- | Java | ✅ | ✅ | ✅ |
- ## Configuration
- `~/.codeseek/config.json`:
- ```json
- {
- "embedding": {
- "provider": "openai-compatible",
- "model": "Qwen/Qwen3-Embedding-4B",
- "api_token": "sk-...",
- "api_base_url": "https://api.siliconflow.cn/v1",
- "dimensions": 2560,
- "instruct": "Given a code search query, retrieve relevant functions or code snippets that answer the query."
- },
- "index": {
- "min_code_block_length": 16,
- "enable_reranker": true,
- "hybrid": {
- "enable_bm25": true,
- "bm25_top_k": 20,
- "vector_top_k": 20,
- "rrf_k": 60,
- "rrf_top_k": 20
- },
- "reranker": {
- "enabled": true,
- "model": "Qwen/Qwen3-Reranker-4B",
- "api_token": "sk-...",
- "api_base_url": "https://api.siliconflow.cn/v1/rerank",
- "top_n": 5,
- "candidate_multiplier": 5,
- "timeout_secs": 60
- }
- },
- "installed_hooks": {}
- }
- ```
- > `embedding.instruct` — Qwen3-Embedding query-side instruction (asymmetric retrieval). Only the
- > search query gets the official `Instruct: {instruct}\nQuery:{query}` prefix; indexed code stays
- > raw, so existing vector indexes remain valid. Omit it to use the default shown above; set it to
- > `""` to turn the prefix off.
- ### Model Roles
- | Model | Role | When |
- |-------|------|------|
- | `Qwen/Qwen3-Embedding-4B` | Converts code → vectors for dense search | Index building |
- | `Qwen/Qwen3-Reranker-4B` | Scores (query, code) pairs for precision | Search time |
- Set via the interactive wizard on first run, or create manually.
- ## Development
- ```bash
- cd rust-core
- # Build
- cargo build
- # Build + install to ~/.codeseek/bin/
- cd .. && ./build.sh --release
- # Run tests
- cargo test
- # Compile TypeScript wrapper
- npm run build
- ```
- ## License
- MIT
- Built with: Tree-sitter · Petgraph · LanceDB · Tantivy · Tokio · Clap
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.