Commands, change classification, risk scoring, and supported languages.
All commands support --format json and --format markdown for machine-readable output.
--context Show dependency details for each entity--min-risk <level> Filter by minimum risk (low, medium, high, critical)--format <fmt> terminal (default), json, or markdown--provider <name> anthropic, openai, or ollama. Auto-inferred from --api-base if omitted.--model <model> Model name (e.g. claude-sonnet-4-5-20250929, gpt-4o, llama3)--api-base <url> Custom endpoint URL. Automatically uses the OpenAI-compatible client.--api-key <key> API key (overrides env var)--min-risk <level> Minimum risk to review (default: high)--max-entities <n> Cap on entities sent to LLM (default: 10)inspect review works with Anthropic, OpenAI, and any OpenAI-compatible server. Use a local LLM for air-gapped or regulated environments.
$ export ANTHROPIC_API_KEY=sk-ant-... $ inspect review HEAD~1
$ export OPENAI_API_KEY=sk-... $ inspect review HEAD~1 --provider openai --model gpt-4o
# Start Ollama, then: $ inspect review HEAD~1 --provider ollama --model llama3
$ inspect review HEAD~1 \ --api-base http://localhost:8000/v1 \ --model my-model
| Provider | API key env var | Default base URL |
|---|---|---|
anthropic | ANTHROPIC_API_KEY | api.anthropic.com |
openai | OPENAI_API_KEY | api.openai.com/v1 |
ollama | none | localhost:11434/v1 |
Based on ConGra (arXiv:2409.14121). Every change is classified along three dimensions: text, syntax, and functional.
| Classification | What changed | Review needed? |
|---|---|---|
| Text | Comments, whitespace, docs only | usually skip |
| Syntax | Signatures, types, declarations (no logic) | check API surface |
| Functional | Logic or behavior | careful review |
| Mixed | Combinations of the above | careful review |
Graph-centric. Dependents and blast radius are the primary discriminators. Entities at the center of the dependency graph score highest. Cosmetic-only changes get an 80% discount.
Risk levels: Critical (>= 0.7) · High (>= 0.5) · Medium (>= 0.3) · Low (< 0.3)
Entity extraction powered by sem-core and tree-sitter. All parsers compiled into the binary.
| Language | Extensions | Entities |
|---|---|---|
| Rust | .rs | functions, structs, enums, impls, traits |
| TypeScript | .ts .tsx | functions, classes, interfaces, types, enums |
| JavaScript | .js .jsx .mjs .cjs | functions, classes, variables |
| Python | .py | functions, classes, decorators |
| Go | .go | functions, methods, types |
| Java | .java | classes, methods, interfaces, enums, fields |
| C | .c .h | functions, structs, enums, unions, typedefs |
| C++ | .cpp .cc .cxx .hpp | functions, classes, structs, enums, namespaces |
| Ruby | .rb | methods, classes, modules |
| C# | .cs | methods, classes, interfaces, enums, structs |
| PHP | .php | functions, classes, methods, interfaces, traits, enums |
| Fortran | .f90 .f95 .f03 .f08 | functions, subroutines, modules, programs |
The CLI and MCP server run entirely locally with no network calls. The HTTP API is optional, for teams that want hosted review without managing LLM infrastructure. You can also self-host the API binary with your own OpenAI key.
REST API for integrating inspect into CI pipelines, bots, and custom workflows. Submit a PR, get back findings. Uses 9 specialized review lenses with entity-level triage and diff-aware validation.
1. Create an account 2. Go to Dashboard > Keys 3. Create an API key 4. Pass it as Authorization: Bearer <key>
$ curl -X POST https://inspect.ataraxy-labs.com/api/review \ -H "Authorization: Bearer insp_your_key_here" \ -H "Content-Type: application/json" \ -d '{"repo":"owner/repo","pr_number":123}' // Response { "pr": { "number": 123, "title": "Fix auth bypass", ... }, "findings": [ { "issue": "Missing origin validation in CORS handler", "evidence": "if (origin.indexOf('example.com') !== -1)", "severity": "critical", "file": "src/middleware/cors.ts" } ], "usage": { "input_tokens": 85000, "output_tokens": 2400 }, "timing": { "triage_ms": 1200, "review_ms": 18000, "total_ms": 19200 } }
$ curl -X POST https://inspect.ataraxy-labs.com/api/triage \ -H "Authorization: Bearer insp_your_key_here" \ -H "Content-Type: application/json" \ -d '{"repo":"owner/repo","pr_number":123}' // Response { "pr": { "number": 123, "title": "Fix auth bypass" }, "entities": [ { "name": "validate_cors", "type": "function", "file": "src/middleware/cors.ts", "risk": "critical", "score": "0.85", "change_type": "modified" } ], "timing_ms": 1400 }
$ curl https://inspect.ataraxy-labs.com/api/health {"status": "ok"}
Pricing: $0.20/M input tokens, $15.00/M output tokens. Track usage in the dashboard.
inspect ships an MCP server so any coding agent (Claude Code, Cursor, etc.) can use entity-level review as a tool. Build with cargo build -p inspect-mcp.
| Tool | Purpose |
|---|---|
inspect_triage | Primary entry point. Full analysis sorted by risk with verdict. |
inspect_entity | Drill into one entity: before/after content, dependents, dependencies. |
inspect_group | Get all entities in a logical change group. |
inspect_file | Scope review to a single file. |
inspect_stats | Lightweight summary: stats, verdict, timing. No entity details. |
inspect_risk_map | File-level risk heatmap with per-file aggregate scores. |
Returned by inspect_triage and inspect_stats. A quick signal for agents and humans.
| Verdict | Meaning |
|---|---|
| likely_approvable | All changes are cosmetic (comments, whitespace, formatting) |
| standard_review | Normal changes, no high-risk entities |
| requires_review | High-risk entities present |
| requires_careful_review | Critical-risk entities present |
Rust toolchain required. Single binary, no runtime dependencies.
$ cargo install --git https://github.com/Ataraxy-Labs/inspect inspect-cli$ git clone https://github.com/Ataraxy-Labs/inspect $ cd inspect && cargo build --release $ ./target/release/inspect diff HEAD~1