npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amxv/agentscript

v0.1.2

Published

Readable Claude Code and Codex JSONL transcript searcher, renderer, and slicer

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 --help

For local development:

make build
./dist/agentscript --help

Open transcripts

Open a transcript by path:

agentscript open ~/.claude/projects/<project>/<session>.jsonl
agentscript open ~/.codex/sessions/<year>/<month>/<day>/<session>.jsonl

Open a recent transcript:

agentscript open --latest 1
agentscript list --latest 20

Run agentscript open with no path to launch the latest-transcript picker. The picker searches:

~/.claude/projects
~/.codex/sessions

Stable 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 Edit

Hidden 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 --turns

Slice by turn:

agentscript open transcript.jsonl --turn-slice 2:4

Filtering, 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 Bash

Use 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 commands

Collapse long blocks:

agentscript open transcript.jsonl --max-lines 40

Collapsed output includes an exact expand command:

agentscript open "transcript.jsonl" --around 120 --expand 120

Expand all collapsed blocks:

agentscript open transcript.jsonl --max-lines 40 --expand all

Slicing

Preserve the first 100 blocks of context:

agentscript slice transcript.jsonl 0:100 --format md --out context.md

Render 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 50

Split 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 html

Search

Basic search:

agentscript search "publish-pr"
agentscript search "r2 cors" --provider claude --latest 20

Advanced 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-sensitive

Each 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.jsonl

Summarize Git, PR, push, validation, and failure activity:

agentscript activity transcript.jsonl
agentscript activity transcript.jsonl --format json

git 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.json

Markdown styles:

--md-style compact
--md-style llm-context
--md-style audit

Config

Show the active config and built-in profiles:

agentscript config show
agentscript config path

Create a starter config:

agentscript config init

The 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 build

tmp/claude-replay is intentionally ignored and can be used as a local reference clone while working on parser behavior.