
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
opencode-replay
Advanced tools
A CLI tool that generates static HTML transcripts from OpenCode sessions, enabling browsing, searching, and sharing of AI-assisted coding conversations.
Live Demo - See example session transcripts
OpenCode stores session data in ~/.local/share/opencode/storage/ as JSON files, but this data isn't easily browsable or shareable. opencode-replay transforms these sessions into clean, searchable, static HTML pages.
Use cases:
# Using bun (recommended)
bun install -g opencode-replay
# Using npm
npm install -g opencode-replay
# Generate HTML for current project's sessions
cd /path/to/your/project
opencode-replay
# Open the generated transcript in your browser
opencode-replay --open
Generate static HTML transcripts viewable in any browser:
opencode-replay # Current project's sessions
opencode-replay --all # All projects
opencode-replay -o ./my-transcripts # Custom output directory
opencode-replay -a # Auto-name output (e.g., ./my-project-replay)
Generate markdown for sharing or piping:
# To stdout (for piping)
opencode-replay -f md -s ses_xxx
opencode-replay -f md -s ses_xxx | gh gist create --filename transcript.md -
opencode-replay -f md -s ses_xxx | pbcopy
# To file
opencode-replay -f md -s ses_xxx -o transcript.md
Upload HTML directly to GitHub Gist with a shareable preview URL:
opencode-replay --gist # Secret gist (default)
opencode-replay --gist --gist-public # Public gist
opencode-replay -s ses_xxx --gist # Upload specific session
Requires GitHub CLI to be installed and authenticated (gh auth login).
The generated gist is viewable via gisthost.github.io which renders HTML files directly.
# Generate HTML for current project (auto-detects from cwd)
opencode-replay
# Generate HTML for ALL projects across your machine
opencode-replay --all
# Specify output directory (default: ./opencode-replay-output)
opencode-replay -o ./my-transcripts
# Export a specific session by ID
opencode-replay --session ses_4957d04cdffeJwdujYPBCKpIsb
# Open in browser after generation
opencode-replay --open
# Include raw JSON export alongside HTML
opencode-replay --json
Serve generated transcripts via HTTP for easier viewing and sharing:
# Generate and serve via HTTP (default port: 3000)
opencode-replay --serve
# Serve on a custom port
opencode-replay --serve --port 8080
# Serve existing output without regenerating
opencode-replay --serve --no-generate -o ./existing-output
The built-in server includes:
index.html for directory requests)Add clickable links to GitHub commits in the rendered output:
opencode-replay --repo owner/repo-name
# Example
opencode-replay --repo sst/opencode
This adds links to commit hashes found in tool outputs, making it easy to navigate to the exact commits referenced during a session.
| Option | Short | Description |
|---|---|---|
--all | Generate for all projects (default: current project only) | |
--auto | -a | Auto-name output directory from project/session name |
--output <path> | -o | Output directory (HTML) or file (markdown) |
--session <id> | -s | Generate for a specific session only |
--format <type> | -f | Output format: html (default), md |
--stdout | Output to stdout (markdown only, requires --session) | |
--gist | Upload HTML to GitHub Gist after generation | |
--gist-public | Make gist public (default: secret) | |
--json | Include raw JSON export alongside HTML | |
--open | Open in browser after generation | |
--storage <path> | Custom storage path (default: ~/.local/share/opencode/storage) | |
--serve | Start HTTP server after generation | |
--port <number> | Server port (default: 3000) | |
--no-generate | Skip generation, only serve existing output | |
--repo <owner/name> | GitHub repo for commit links (e.g., sst/opencode) | |
--quiet | -q | Suppress non-essential output |
--verbose | Show detailed debug output | |
--help | -h | Show help message |
--version | -v | Show version |
# Generate transcripts for your current project
cd ~/workspace/my-project
opencode-replay
# Generate all sessions and open in browser
opencode-replay --all --open
# Export a specific session with JSON data
opencode-replay --session ses_abc123 --json -o ./session-export
# Auto-name output from project name
opencode-replay -a # Creates ./my-project-replay
# Use custom storage location
opencode-replay --storage /custom/path/to/storage
# Generate and serve for easy sharing
opencode-replay --serve --port 8080
# Quick preview of existing transcripts
opencode-replay --serve --no-generate -o ./my-transcripts
# Markdown to stdout for piping
opencode-replay -f md -s ses_xxx
# Create a GitHub Gist from a session
opencode-replay -s ses_xxx --gist
# Upload all projects to a public gist
opencode-replay --all --gist --gist-public
# Add GitHub commit links
opencode-replay --repo sst/opencode
opencode-replay-output/
├── index.html # Master index (all sessions)
├── assets/
│ ├── styles.css # Stylesheet
│ └── search.js # Client-side search
├── projects/ # Only in --all mode
│ └── {project-name}/
│ └── index.html # Project-level session list
└── sessions/
└── {session-id}/
├── index.html # Session overview with timeline
├── page-001.html # Conversation pages (5 prompts each)
├── page-002.html
└── session.json # Raw data (if --json flag)
Each tool type has specialized rendering:
| Tool | Display |
|---|---|
bash | Terminal-style command with $ prefix, dark output box |
read | File path header with content preview and line numbers |
write | File path with "Created" badge, content preview |
edit | Side-by-side diff view (old/new comparison) |
glob | Pattern with file list and type icons |
grep | Pattern with matching lines (file:line format) |
task | Agent type badge with collapsible prompt/result |
todowrite | Checklist with status icons |
webfetch | Clickable URL with content preview |
batch | Nested tool call summary |
--gist feature)# Clone the repository
git clone https://github.com/ramtinJ95/opencode-replay
cd opencode-replay
# Install dependencies
bun install
# Run in development mode
bun run src/index.ts
# Type check
bun run typecheck
# Build for distribution
bun run build
MIT
FAQs
Generate static HTML transcripts from OpenCode sessions
The npm package opencode-replay receives a total of 8 weekly downloads. As such, opencode-replay popularity was classified as not popular.
We found that opencode-replay demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.