agentscript is a terminal-first transcript reader for Claude Code and Codex JSONL sessions.
It turns local agent transcripts into readable, indexed blocks so you can search, inspect, hide noisy parts, and slice exactly the context you want to preserve.
npm i -g @amxv/agentscript
agentscript --helpFor local development:
make build
./dist/agentscript --helpOpen a transcript by path:
agentscript open ~/.claude/projects/<project>/<session>.jsonl
agentscript open ~/.codex/sessions/<year>/<month>/<day>/<session>.jsonlOr open the latest transcript discovered under the default roots:
agentscript open --latest 1Run agentscript open with no path to launch the latest-transcript picker. The picker searches:
~/.claude/projects
~/.codex/sessionsEvery renderable block gets a stable index:
#000 user
#001 thinking
#002 assistant
#003 command Bash
#004 command_result Bash
#005 tool_call Edit
#006 tool_result Edit
Hidden blocks keep their original indexes, so slices remain stable even when you hide thinking or tool output.
Preserve the first 100 blocks of context:
agentscript slice transcript.jsonl 0:100 --format md --out context.mdRender from block 100 to the end:
agentscript slice transcript.jsonl 100:Show the last 80 renderable blocks:
agentscript open transcript.jsonl --last 80Show context around a specific block:
agentscript open transcript.jsonl --around 100 --before 25 --after 50agentscript open transcript.jsonl --hide-thinking
agentscript open transcript.jsonl --hide-tools
agentscript open transcript.jsonl --hide-tool-results
agentscript open transcript.jsonl --hide-commands
agentscript open transcript.jsonl --messages-only
agentscript open transcript.jsonl --hide-tool Bash
agentscript open transcript.jsonl --tools Bash,EditFlags can appear before or after the transcript path.
Search recent transcripts:
agentscript search "publish-pr"
agentscript search "r2 cors" --provider claude --latest 20
agentscript search "git status" --provider codexEach result includes the matching block index and an agentscript open ... --around <index> command.
agentscript list --latest 20
agentscript list --provider codexagentscript open transcript.jsonl --format text
agentscript open transcript.jsonl --format md --out transcript.md
agentscript open transcript.jsonl --format json --out normalized.jsonmake fmt
make test
make buildtmp/claude-replay is intentionally ignored and can be used as a local reference clone while working on parser behavior.