@amxv/agentscript
v0.1.2
Published
Readable Claude Code and Codex JSONL transcript searcher, renderer, and slicer
Maintainers
Readme
agentscript
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, slice exact context ranges, extract file and command activity, and export handoff-ready Markdown or HTML.
Install
npm i -g @amxv/agentscript
agentscript --helpFor local development:
make build
./dist/agentscript --helpOpen transcripts
Open a transcript by path:
agentscript open ~/.claude/projects/<project>/<session>.jsonl
agentscript open ~/.codex/sessions/<year>/<month>/<day>/<session>.jsonlOpen a recent transcript:
agentscript open --latest 1
agentscript list --latest 20Run agentscript open with no path to launch the latest-transcript picker. The picker searches:
~/.claude/projects
~/.codex/sessionsStable block indexes and turns
Every 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 EditHidden blocks keep their original indexes, so slices remain stable even when you hide thinking or tool output.
Show user-turn numbers too:
agentscript open transcript.jsonl --turnsSlice by turn:
agentscript open transcript.jsonl --turn-slice 2:4Filtering, profiles, and folding
agentscript open transcript.jsonl --hide-thinking
agentscript open transcript.jsonl --show-internal-goal
agentscript open transcript.jsonl --show-internal
agentscript open transcript.jsonl --messages-only
agentscript open transcript.jsonl --hide-tool-results
agentscript open transcript.jsonl --hide-commands
agentscript open transcript.jsonl --kind user,assistant,command
agentscript open transcript.jsonl --hide-kind thinking,tool_result
agentscript open transcript.jsonl --tools Bash,Edit
agentscript open transcript.jsonl --hide-tool BashUse built-in profiles:
agentscript open transcript.jsonl --profile compact
agentscript open transcript.jsonl --profile handoff
agentscript open transcript.jsonl --profile debug
agentscript open transcript.jsonl --profile commandsCollapse long blocks:
agentscript open transcript.jsonl --max-lines 40Collapsed output includes an exact expand command:
agentscript open "transcript.jsonl" --around 120 --expand 120Expand all collapsed blocks:
agentscript open transcript.jsonl --max-lines 40 --expand allSlicing
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 context around a block:
agentscript open transcript.jsonl --around 100 --before 25 --after 50Split a transcript into rendered files:
agentscript split transcript.jsonl --at 100 --out-dir parts --format md
agentscript split transcript.jsonl --every 80 --out-dir parts --format htmlSearch
Basic search:
agentscript search "publish-pr"
agentscript search "r2 cors" --provider claude --latest 20Advanced search:
agentscript search push rejected --all --near 20
agentscript search "git (push|pull)" --regex --tool Bash
agentscript search permission --search-kind command_result
agentscript search YOLO --case-sensitiveEach result includes the matching block index and an agentscript open ... --around <index> command.
Command, file, and activity views
Show shell commands:
agentscript commands transcript.jsonl
agentscript commands transcript.jsonl --failed --with-output
agentscript commands transcript.jsonl --grep "go test"Show files referenced or changed:
agentscript files transcript.jsonl
agentscript changes transcript.jsonlSummarize Git, PR, push, validation, and failure activity:
agentscript activity transcript.jsonl
agentscript activity transcript.jsonl --format jsongit and pr are aliases for activity.
Export
agentscript export transcript.jsonl --format html --out transcript.html
agentscript export transcript.jsonl --format md --md-style llm-context --slice 0:100 --out context.md
agentscript export transcript.jsonl --format json --out normalized.jsonMarkdown styles:
--md-style compact
--md-style llm-context
--md-style auditConfig
Show the active config and built-in profiles:
agentscript config show
agentscript config pathCreate a starter config:
agentscript config initThe config supports custom profiles with different block sets, hidden kinds, tool filters, max line folding, output format, and Markdown style.
Development
make fmt
make test
make buildtmp/claude-replay is intentionally ignored and can be used as a local reference clone while working on parser behavior.
