Understand every change your AI agent makes.
TraceNest is a production-minded, cross-platform, local-first open-source CLI tool for reviewing, inspecting, comparing, and documenting changes made during AI-assisted coding sessions.
Autonomous and AI-assisted coding agents (such as Claude Code, OpenCode, Cline, Cursor, Codex) execute code modifications, refactorings, and file creations at high speed. While agents accelerate development, they frequently:
- Introduce subtle security vulnerabilities (e.g.
eval(), unescaped subprocesses,verify=False). - Leave hardcoded development credentials, tokens, or JWTs in code.
- Touch files outside the intended task scope or alter CI/CD workflows (
.github/workflows/). - Modify project dependencies (
requirements.txt,package.json,pyproject.toml) unexpectedly. - Produce large multi-file diffs that are difficult for human reviewers to audit.
TraceNest solves this by establishing a deterministic review layer between your AI agent and your codebase.
- Local-First & Privacy-By-Default: No cloud account, no telemetry, no paid API required. Works completely offline.
- Deterministic Review Engine: Fast, rule-based scanning for secrets, configuration tampering, dependency drift, and dangerous patterns.
- Git Baseline Snapshots: Capture clean checkpoints before unleashing your AI agent, and accurately measure exactly what changed.
- Automated Secret Redaction: Detected credentials and high-entropy secrets are masked before appearing in terminal output, logs, or reports.
- Multi-Format Reports: Export comprehensive review reports in Markdown and structured JSON.
- Session Delta Comparison: Track changes across multiple agent iterations using
tracenest compare <session_a> <session_b>. - Optional Local & Remote AI Explanations: Integrate with local Ollama or OpenAI-compatible models for high-level summaries without sacrificing privacy.
Install TraceNest into your Python 3.12+ environment:
pip install tracenestOr install from source in editable mode:
git clone https://github.com/tracenest/tracenest.git
cd tracenest
pip install -e .cd /path/to/your/project
tracenest initThis creates .tracenest/ for local session storage and creates a documented tracenest.toml configuration file.
tracenest snapshot create --label "before-ai-refactor" --note "Baseline state before agent run"After the AI agent makes edits to your codebase, run:
tracenest reviewTraceNest will scan the working tree diff, run all deterministic security and scope rules, display a formatted Rich terminal summary, and export reports to .tracenest/reports/.
tracenest compare sess_20261024_010000_abc123 sess_20261024_020000_def456| Command | Description |
|---|---|
tracenest init |
Initialize TraceNest storage and generate default configuration. |
tracenest status |
Display repository state, active branch, pending changes, and recent snapshots. |
tracenest snapshot create |
Record a baseline snapshot of the current working tree. |
tracenest snapshot list |
List recorded baseline snapshots with timestamps and commit references. |
tracenest review |
Analyze repository changes, evaluate deterministic rules, and save review session. |
tracenest review --ai |
Run review with optional AI provider advisory explanation. |
tracenest report |
Export or display Markdown / JSON report for a session. |
tracenest compare <sess_a> <sess_b> |
Compare two sessions to see newly introduced or resolved findings. |
TraceNest is built on strict engineering security principles:
- No Code Execution: TraceNest never executes commands found in repository files or generated by LLMs.
- Safe Subprocesses: Subprocess invocations never use
shell=Truefor untrusted arguments. - No Unsolicited Network Calls: In default mode, TraceNest makes zero network requests.
- Remote Data Sharing Guard: Remote AI providers are blocked unless
allow_remote_data_sharing = trueis explicitly configured. - Secret Redaction: High-entropy credentials and API keys are automatically redacted in terminal output, logs, and AI prompts.
TraceNest is open-source software licensed under the MIT License.