Claude Transcripts docs GitHub
Work in progressUnder active development — not tested as ready for use. Breaking changes land without notice, stored data may need to be discarded between revisions, and there is no auth or security model.

CLI

claude-transcripts is the installer, the hook (hook run), the admin tool and a terminal client. Release binaries for Linux and macOS (x64, arm64) embed the Bun runtime; the app image bundles one at /cli/download; from a checkout run bun run cli <command>.

Which webapi: --webapi, else CT_WEBAPI_URL, else WEBAPI_PORT (on WEBAPI_HOST, default 127.0.0.1), else webapi.url in the hook runtime config, else the installed instance's port from instance.env, else 127.0.0.1:7650. WEBAPI_HOST alone does not count as choosing a target, because .env.template sets it.

Exit codes: 0 success (also --help, --version); 1 the command ran and failed; 2 usage error (unknown command or option, bad value), with usage on stderr. Help, version and usage errors are handled before a command runs, so backfill --help never starts a backfill.

Shell completions: completions <shell> prints a script for bash, zsh or fish. Nothing edits an rc file for you, install included:

eval "$(claude-transcripts completions bash)"   # ~/.bashrc
eval "$(claude-transcripts completions zsh)"    # ~/.zshrc, after compinit
claude-transcripts completions fish | source    # ~/.config/fish/config.fish

It completes command names, flags (plus the global ones), and the values of anything the spec lists choices for (stack <action>, turns --role). The command must be the first word, and bash completes flag values in the --flag value form only.

The command reference below is generated from CLI_SPEC (packages/shared/src/blueprint/cli.ts) by bun run gen:cli-docs; edit the spec, not this page. The same spec drives --help, argument validation and the completions. Not built: couch / s3 passthroughs and meta post enrichment.

<!-- gen:cli-docs:start — generated from CLI_SPEC by bun run gen:cli-docs; do not edit --> Lifecycle

CommandWhat it does
install [options]Set up everything: stores, app, and the Claude Code hook
uninstall [options]Remove the instance (history is kept unless --purge)
setup [options]Install/register the hook + generate runtime config
provisionCreate the CouchDB databases and the Garage bucket + key
stack [action] [options]Control the container stack

Daily use

CommandWhat it does
sessions [id] [options]List / inspect sessions (via the webapi)
search <query> [options]Search the corpus
turns [session] [options]Speaker-split turns: one session, or one speaker across all sessions
backfill [options]Adopt on-disk ~/.claude transcripts as first-class history

Portability

CommandWhat it does
export <dir> [options]Export session data to a portable bundle
import <dir> [options]Restore session data from a portable bundle

Admin

CommandWhat it does
migrate [direction] [options]Run CouchDB migrations
reindexRebuild the search indexes from CouchDB
doctor [options]Smoke-test the write/read/search path end-to-end
hook [action] [options]The Claude Code hook, and its registration
statusline [action] [options]The Claude Code statusline indicator (recording / off), and its registration
completions <shell>Print a shell completion script to eval or source from your shell's rc

Global options (every command)

install [options]

Set up everything: stores, app, and the Claude Code hook

Option
--port-base <n>first port of the block (default 7650)
--meili-keygenerate a Meilisearch master key
--no-hookskip Claude Code registration
--no-statuslineregister the hook but not the statusline
--no-appskip the app container (run the webapi yourself)
--no-prunekeep superseded app images
--skip-preflightcontinue past failed preflight checks
--yesno prompts; take documented defaults
claude-transcripts install
claude-transcripts install --port-base 7700 --no-hook

uninstall [options]

Remove the instance (history is kept unless --purge)

Option
--purgealso delete recorded history (destructive)
--yesskip the confirmation prompt
claude-transcripts uninstall
claude-transcripts uninstall --purge --yes

setup [options]

Install/register the hook + generate runtime config

Option
--checkverify an existing install (read-only)
--no-hookconfig + provision stores only (no registration)
--projectper-repo registration (placeholder — not built)
claude-transcripts setup --check

provision

Create the CouchDB databases and the Garage bucket + key

claude-transcripts provision

stack [action] [options]

Control the container stack

Argument
actionlogs takes service names after it (up \down \restart \logs \ps; default ps)
Option
--appinclude the app container
--volumeswith down: delete the data volumes too
claude-transcripts stack up --app
claude-transcripts stack logs couchdb
claude-transcripts stack down --volumes

sessions [id] [options]

List / inspect sessions (via the webapi)

Argument
idsession id — show detail/transcript (omit to list)
Option
--limit <n>rows to list (default 50) / transcript entries to preview (default 30)
--cwd <value>only this project directory
--model <value>only this model
--hostname <value>only this host
--source <value>only this provenance (live \backfill \…)
--from <value>only sessions overlapping at/after this ISO instant
--to <value>only sessions overlapping at/before this ISO instant
--jsonprint the webapi response as JSON instead of a table
claude-transcripts sessions
claude-transcripts sessions --limit 10
claude-transcripts sessions --cwd ~/dev/api --from 2026-08-01
claude-transcripts sessions 3f9a2c1e --limit 80 --json

search <query> [options]

Search the corpus

Argument
queryrequired. search text
Option
--limit <n>results per section (default: the webapi's)
--offset <n>skip this many results (paging)
--cwd <value>only this project directory
--model <value>only this model
--hostname <value>only this host
--source <value>only this provenance (live \backfill \…)
--jsonprint the webapi response as JSON instead of a table
claude-transcripts search "retry policy"
claude-transcripts search deploy --cwd ~/proj --limit 5 --json

turns [session] [options]

Speaker-split turns: one session, or one speaker across all sessions

Argument
sessionsession id — that session's turns (omit: all sessions)
Option
--role <value>only this speaker (user \assistant \tool_result \system \other)
--from <value>all sessions: only turns at/after this ISO instant
--to <value>all sessions: only turns at/before this ISO instant
--limit <n>turns to show (default 50)
--skip <n>skip this many (paging)
--jsonprint the webapi response as JSON instead of a table
claude-transcripts turns --role user --limit 200
claude-transcripts turns --role user --from 2026-08-01 --json
claude-transcripts turns 3f9a2c1e --role assistant

backfill [options]

Adopt on-disk ~/.claude transcripts as first-class history

Option
--dir <value>transcripts dir (default ~/.claude/projects)
--host <value>hostname to attribute (default: this host)
--actor <value>actor to attribute the history to
--chunk-size <n>entries per chunk doc (default 200)
--no-contentbyte-range chunks only (no turn content)
--forcere-process adopted sessions (deletes their derived docs, then rebuilds)
--replace-livewith --force: also replace live-recorded sessions (loses hook provenance)
--repairadd what an interrupted write left out of an adopted session: missing chunk docs, or a transcript that never reached S3; leaves summary + events alone
--session <value>with --force: re-process only this session
--dry-runpreview without writing (reads the store, so skips are shown)
claude-transcripts backfill --dry-run
claude-transcripts backfill
claude-transcripts backfill --force --session 3f9a2c1e

export <dir> [options]

Export session data to a portable bundle

Argument
dirrequired. destination directory
Option
--since <value>only docs at/after this ISO timestamp
--session <value>only this session id
--no-blobsskip S3 transcripts (~1/10th the size)
claude-transcripts export ./bundle
claude-transcripts export ./bundle --since 2026-01-01 --no-blobs

import <dir> [options]

Restore session data from a portable bundle

Argument
dirrequired. bundle directory
Option
--dry-runverify the bundle without writing
--no-blobsskip transcripts; restore docs only
claude-transcripts import ./bundle --dry-run
claude-transcripts import ./bundle

migrate [direction] [options]

Run CouchDB migrations

Argument
directionapply, roll back, or report (up \down \status; default status)
Option
--to <n>with up: stop at this schema version
--steps <n>with down: how many to undo (default 1)
--dry-runreport what would run without writing
claude-transcripts migrate status
claude-transcripts migrate up --dry-run
claude-transcripts migrate down --steps 2

reindex

Rebuild the search indexes from CouchDB

claude-transcripts reindex

doctor [options]

Smoke-test the write/read/search path end-to-end

Option
--keepleave the synthetic session behind for inspection
claude-transcripts doctor
claude-transcripts doctor --keep

hook [action] [options]

The Claude Code hook, and its registration

Argument
actionrun reads one event payload from stdin (Claude Code calls this) (run \install \uninstall \status; default status)
Option
--dry-runwith install: show the change without writing
--forcewith install: register even if the plugin already does
claude-transcripts hook status
claude-transcripts hook install --dry-run

statusline [action] [options]

The Claude Code statusline indicator (recording / off), and its registration

Argument
actionrender reads Claude Code's statusline JSON from stdin and prints one line (no network) (render \install \uninstall \status; default status)
Option
--dry-runwith install: show the change without writing
claude-transcripts statusline install
claude-transcripts statusline status

completions <shell>

Print a shell completion script to eval or source from your shell's rc

Argument
shellrequired. the shell to complete for (bash \zsh \fish)
claude-transcripts completions bash
claude-transcripts completions fish | source

<!-- gen:cli-docs:end -->