local-first  ·  no cloud  ·  no telemetry

Your agent says it's done.

AI coding agents edit dozens of files, run scripts, install dependencies, hit failures, retry, and hand you back a “done.” AgentLens records the session and gives you one local HTML report — every command, every file change, every risky touch — before you commit.

~/your-project — agentlens
Node ≥ 18 MIT licensed TypeScript Zero network calls
01

Opaque by default.

Reviewing what an agent did means scrolling a chat transcript and reconciling it against git status. The things most worth catching — a touched .env, a silently rewritten lockfile, a deleted test — are exactly the things that scroll past.

1 self-contained HTML file. No CDN, no fetch on load — it opens years from now.
0 network calls, backends, or accounts. Everything lives in .agentlens/.
8 commands total. init, start, run, stop is the whole loop.
02

Four commands.

One-time init, then wrap whatever the agent runs. Stop finalizes and renders.

01 — ONCE
agentlens init

Creates .agentlens/ in the project. Add it to .gitignore — recordings are local artifacts, not source.

02 — BEGIN
agentlens start

Opens a recording session and captures the starting git state. Fails loudly if one is already active.

03 — WRAP
agentlens run -- npm test

Streams output as normal while recording stdout, stderr and exit code into the session.

04 — FINISH
agentlens stop

Captures final git state, detects risks, renders the HTML report and a copyable Markdown summary.

03

One page to review
before you commit.

The report opens with a four-pill strip — the “look at this first” panel — then the evidence behind it: risk flags by severity, a command timeline with verdicts, changed files grouped by status, and the full diff, collapsed.

report.html run_20260529T192518Z_cfnq9r  ·  branch main
Highest risk
High
Files changed
5
Commands failed
1
Sensitive touched
Yes

Risk flags

HighSecret-like file touched — .env.local was modified during this run.
Mediumpackage.json changed — dependency surface moved.
MediumA command failed — npm test exited non-zero.

Command timeline

Failnpm test12s
Passnpm run build31s
Passnode scripts/migrate.js4s

Changed files

M src/auth.ts M package.json M .env.local A src/session.ts D src/tests/auth.spec.ts

Sample values taken from the project README. Diffs over 256 KB are stored head + tail with a truncation marker; per-command output keeps a 4 KB head and tail with a truncated flag, so nothing is ever silently dropped.

04

What counts as risky.

Fixed rules, evaluated locally on stop. No model decides what is dangerous.

SeverityTriggers
High .env, credentials, *.pem or secret-like files touched. Three or more commands failing.
Medium package.json or lockfile changes. CI config (.github/workflows/*, .gitlab-ci.yml, .circleci/*, .travis.yml, azure-pipelines.yml). Git config (.gitignore, .gitattributes, .gitmodules). Migration files. Deleted files. Large diff — over 500 lines or 20 files. Any failed command.
05

Install.

Not on npm yet — install from a clone and link it onto your $PATH.

$ git clone https://github.com/mihhhir08/AgentLens $ cd AgentLens && npm install $ npm run build && npm link → agentlens is now on your $PATH

Requires Node.js 18 or newer. MIT licensed.