inspect CLI
inspect ranks Git changes by structural risk at the function and class level and serves the result to agents through JSON and MCP
- 214 ★ on the repository
- Last commit
Minimal access
Why this level
- Triage reads the diff and repository sources, and `inspect review` sends risky entities to the chosen model
Install
- Works in
Manual install
cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cliNeeds Rust. The MCP server builds separately: `cargo build -p inspect-mcp`.
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- Triage reads the diff and repository sources, and `inspect review` sends risky entities to the chosen model
This is third-party code. Review the repository files before installing.
What it does
inspect is a Rust utility for entity-level review. It parses a diff with tree-sitter, finds which functions, classes and methods changed and labels each change as text-only, syntax or functional. It then computes a score from 0.0 to 1.0 from the change class, the number of dependent entities and public API exposure. Cosmetic edits get a 70 percent discount. Blast radius comes from a dependency graph of the whole repository, and unrelated edits in one commit are split into groups. The commands are `inspect diff <ref>`, `inspect pr <number>` and `inspect file <path>` for triage with no model, and `inspect review <ref>` with an LLM check of the riskiest entities. The model can be Anthropic, OpenAI or any compatible server, Ollama included. The repository also builds an MCP server, `inspect-mcp`, with six tools: `inspect_triage`, `inspect_entity`, `inspect_group`, `inspect_file`, `inspect_stats` and `inspect_risk_map`. A `SKILL.md` sits in the root.
Who it is for. Pull request reviewers and agents that audit large diffs and want to see first which functions are truly risky before reading every line.
Good fit when
- A 12-file pull request where you need to see which changes touch the public API
- An agent wrote a lot of code and the reviewer needs changes sorted by descending risk
- One commit mixes unrelated edits and they need splitting into groups
- Claude Code or Cursor should get a review verdict as the MCP tool `inspect_triage` call
Not a fit when
- You want a style or formatting check: `inspect` scores code structure and ignores formatting
- The project language is outside the supported tree-sitter grammars
- Review without sending code to an external model: `inspect review` sends risky entities to an LLM
Example request
Run inspect on the last commit and show the entities with above-medium riskLimitations
- Install goes through `cargo install --git`, so Rust is required. The MCP server builds with a separate `cargo build -p inspect-mcp`, and the README has no ready package.
- `inspect review` sends the riskiest entities to the chosen model: Anthropic or OpenAI need an API key, while with Ollama the code stays local.
- The recall and F1 figures in the README come from the authors' own runs of the Greptile and Martian tests, with no independent confirmation in the repository.
- The dependency graph covers supported languages, and for others the score rests on the diff alone.
How to disable. Remove the binaries with `cargo uninstall inspect-cli` and drop the `inspect` block from `mcpServers` in the agent settings. A built repository folder is deleted like any directory.
FAQ
How do I install inspect?
Run `cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cli`. Rust is required. Building from source has its own block in the README.
How do I connect inspect to Claude Code as MCP?
Build `cargo build -p inspect-mcp` and add an `mcpServers` block with the `inspect` key and the path to the `inspect-mcp` binary. Six tools appear, the main one being `inspect_triage`.
Do I need a model?
No. `inspect diff` triages without an LLM and answers in seconds. `inspect review` needs Anthropic, OpenAI or a compatible server.
What does the `requires_careful_review` verdict mean?
The changes include critical-risk entities. The other verdicts are `likely_approvable` for cosmetic edits, `standard_review` and `requires_review` for high risk.
Is there a hosted service?
Yes, the README describes an API for review and entity triage at inspect.ataraxy-labs.com. Local use does not need it.
Discussion
No questions or reviews yet.
Related
CLI toolsCode Buster finds dependency cycles, dead and duplicate code and complexity growth across a repository, locally and without an LLM
rust-analyzer MCP: Rust code navigation for agents
r3bl-rust-analyzer-mcp-server
A Rust MCP server on standard threads: the agent gets hover info, go to definition, references, formatting and compiler diagnostics from rust-analyzer
Three skills and a clippy config: an agent writes, reviews and ports idiomatic Rust, and CI enforces the checkable rules
A local codebase index with ten MCP tools: dependency graph, git history, code health and architectural decisions without re-grepping on every step
An MCP server that indexes code with tree-sitter so an agent reads single symbols, not files, traces paths and weighs edits
CLI with a virtual board of AI experts that reviews a PR or local diff and returns a score, severity level and evidence.
README in short
The README explains the problem with line diffs and describes how inspect computes change class, risk score, blast radius and groups. It then covers installation, commands, LLM setup, the MCP server with a table of six tools, Greptile and Martian benchmark results, the hosted API and the language list.
README badge
Original SKILL.md
# inspect Entity-level code review for Git. Scores changes by risk and groups them by logical dependency. ## Structure Cargo workspace at repo root: - `inspect-core` — analysis engine, LLM integration, risk scoring - `inspect-cli` — CLI (`inspect diff`, `inspect pr`, `inspect review`, `inspect predict`) - `inspect-mcp` — MCP server (6 tools) - `inspect-api` — REST API (Axum, JWT auth, deployed via Docker) Separate Next.js website in `docs/` (deployed to inspect.ataraxy-labs.com via Vercel "site" project). ## Build & Test ```bash cargo build --release -p inspect-cli # binary at target/release/inspect cargo build --release -p inspect-mcp # binary at target/release/inspect-mcp cargo test --workspace # 12 tests ``` ## Key Paths - Risk scoring: `crates/inspect-core/src/` - CLI commands: `crates/inspect-cli/src/commands/` - MCP tools: `crates/inspect-mcp/src/` - API routes: `crates/inspect-api/src/` - Website: `docs/` (Next.js 15, Clerk auth, Supabase, Stripe billing) - Benchmarks: `benchmarks/` ## Website (docs/) The `docs/` directory is the live website. Vercel project name is "site" (root dir set to `docs/`). - Auth: Clerk - DB: Supabase - Billing: Stripe (raw fetch, not SDK) - Env vars are on the Vercel "site" project, NOT the "docs" project ## How Review Works 1. sem-core extracts entities from diff 2. Score each entity by risk (change classification, blast radius, dependency depth) 3. Group related entities by dependency graph 4. For LLM review: triage first (cut 100 entities to 10), then point LLM at high-risk set