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.
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.
.agentlens/.
init, start, run, stop is the whole loop.
One-time init, then wrap whatever the agent runs. Stop finalizes and renders.
agentlens init
Creates .agentlens/ in the project. Add it to .gitignore — recordings are local artifacts, not source.
agentlens start
Opens a recording session and captures the starting git state. Fails loudly if one is already active.
agentlens run -- npm test
Streams output as normal while recording stdout, stderr and exit code into the session.
agentlens stop
Captures final git state, detects risks, renders the HTML report and a copyable Markdown summary.
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.
.env.local was modified during this run.package.json changed — dependency surface moved.npm test exited non-zero.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.
Fixed rules, evaluated locally on stop. No model decides what is dangerous.
| Severity | Triggers |
|---|---|
| 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.
|
Not on npm yet — install from a clone and link it onto your $PATH.
Requires Node.js 18 or newer. MIT licensed.