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. These docs describe the intended design as much as the current state.

CLI

Status: built and released. @claude-transcripts/cli ships as a compiled binary per platform on each release, and as the CLI bundled into the app image. It is the hook (hook run), the installer (install), and the admin surface (backfill, export/import, migrate, reindex, doctor, sessions, search). The scripts it consolidated are gone; scripts/ now holds dev-only repo automation (dev-automation.md).

A terminal client for the system, and the admin utility for setup and data operations. It is an optional interface — the system is fully usable without it (and without the webui) — but it's the most convenient surface for humans at a terminal and for AI agents driving the system headless.

Two roles

  1. Application client (talks to the webapi). Everything the webui can do, the CLI can do, because both are just webapi consumers (ADR 0016): list/inspect sessions, read transcripts, query views via /api/couch, fetch blobs via /api/s3, run searches, post enrichment metadata. All app-side reads and writes go through the webapi — the CLI never touches CouchDB/S3 directly.
  2. Admin / host-side utility (talks to the host). The operations that are inherently local: smoke-test, install/setup (register the hook, generate runtime config), configure, export/import (bundle round-trip), and backfill (adopt on-disk ~/.claude transcripts as first-class history). Host-side metadata ingestion (reading local config/transcripts the container can't see) is the one legitimately non-webapi path — it's an input source, delivered to the webapi, not a backend write around it.

Architecture — an aggregate of internal modules

The CLI is a single tool assembled from multiple internal sources — the same way Claude Code itself is built. Each capability is its own TS module/package, imported as an internal library; the CLI is the aggregate front end that exposes them under one command surface:

Internal moduleResponsibilitySource
webapi clientAll app-side reads/writesgenerated from the webapi OpenAPI spec (ADR 0019) and imported as a lib — never hand-written
.claude/ reader/parserRead + parse the local ~/.claude/ filesystem (transcripts, projects, config) for backfill and verificationits own module/package within the CLI
hooks setupInstall/register the Claude Code hooks, generate runtime confighost-side
export / importUser-data bundle round-trip (dump/restore), format conversionshares the migrations machinery
adminsetup / configure / smoke-testhost-side

New functionality is added as another internal module + a command, so the tool grows by composition. The .claude/ reader is deliberately a standalone module (like the generated client) so it can be reused/tested in isolation and never blocks core CLI use if absent.

Stack

Packaging (deferred)

To make the host-side CLI portable to machines without a Bun runtime, we intend to ship compiled single-file binaries per OS (Bun supports bun build --compile). The exact packaging/release flow is deferred — for now it runs under Bun. In the combined container the CLI is bundled in the image, and the webui offers a download link for it as a convenience (containers.md, routes.md).

Command surface

The authoritative list is the app model's cliSpecclaude-transcripts with no arguments renders help straight from it, so this table and the binary can't disagree for long. As built:

Lifecycle

Recording

Reading

Data lifecycle

Diagnosis

Not built, and listed here only so the gap is visible: couch / s3 power-user passthroughs, and meta post enrichment.