CLI launcher for claude-code-history-viewer -- csb view <id> (Alpha #3)
Epic
One of four alpha-release criteria. Users need to be able to open a session's full transcript in a readable viewer without navigating through GUIs. This issue tracks adding csb view <id> that launches claude-code-history-viewer (or another reader) on the exact JSONL file, analogous to how typora file.md opens a markdown file directly.
Why
Current reality:
csb list shows session metadata (folders, dates, message counts)
csb show <id> shows structured metadata details
- Neither reads the actual conversation
To read a conversation today, you either:
- Open
claude-code-history-viewer GUI, navigate to the project, click the session (many clicks)
- Open the JSONL in a text editor (barely human-readable)
- Run
claude --resume <id> which requires being in the right project directory
None of these are "just show me the conversation." csb view <id> should be that one-liner.
Approach
Two parts:
Part 1 (upstream): history-viewer CLI mode
claude-code-history-viewer is a Tauri app at C:\code-ext\claude-code-history-viewer. Tauri apps can accept CLI args via the tauri.conf.json CLI plugin. Add:
claude-code-history-viewer --jsonl /path/to/session.jsonl opens the app focused on that file
claude-code-history-viewer --session-id <uuid> opens the app focused on that session (resolves path internally)
claude-code-history-viewer --project <project> --session-id <uuid> for disambiguation
This is an upstream change to the history-viewer repo (owned by @jhlee0409, per the README acknowledgements). We'd need to either:
- Fork, implement, PR upstream (preferred)
- Or file an issue requesting the feature and wait
Part 2 (csb-side): csb view command
# commands.py
def cmd_view(args):
config = _get_config(args)
conn = open_db(config["index_path"])
session = get_session(conn, args.session_id)
if not session:
print(f"No session found matching '{args.session_id}'")
return 1
jsonl_path = Path(config["claude_dir"]) / session["jsonl_path"]
# Try viewer commands in order of preference
viewers = [
["claude-code-history-viewer", "--jsonl", str(jsonl_path)],
# Fallbacks could go here -- open in default app, etc.
]
for cmd in viewers:
if shutil.which(cmd[0]):
subprocess.Popen(cmd)
return 0
print(f"No viewer found. JSONL path: {jsonl_path}")
return 1
Config key to override the viewer: config["viewer_command"] = "claude-code-history-viewer --jsonl {path}"
Simpler fallback (if upstream CLI mode delays)
If we can't get claude-code-history-viewer CLI mode in time for alpha, the fallback is:
csb view <id>
# -> opens the directory containing the JSONL in the OS file manager
# -> or prints the path so the user can double-click
Not ideal, but it's still one command vs. many clicks.
Even simpler: csb view <id> pipes the JSONL through a distillation filter (reusing #12's code) and outputs markdown to stdout, which can be piped to less or glow:
csb view 916441e6 | less
csb view 916441e6 | glow - # rich markdown rendering
This is probably the best alpha approach because it doesn't depend on upstream changes and gives immediate value. The history-viewer CLI integration can come in a later release.
Acceptance criteria
Related
CLI launcher for claude-code-history-viewer --
csb view <id>(Alpha #3)Epic
One of four alpha-release criteria. Users need to be able to open a session's full transcript in a readable viewer without navigating through GUIs. This issue tracks adding
csb view <id>that launchesclaude-code-history-viewer(or another reader) on the exact JSONL file, analogous to howtypora file.mdopens a markdown file directly.Why
Current reality:
csb listshows session metadata (folders, dates, message counts)csb show <id>shows structured metadata detailsTo read a conversation today, you either:
claude-code-history-viewerGUI, navigate to the project, click the session (many clicks)claude --resume <id>which requires being in the right project directoryNone of these are "just show me the conversation."
csb view <id>should be that one-liner.Approach
Two parts:
Part 1 (upstream): history-viewer CLI mode
claude-code-history-vieweris a Tauri app atC:\code-ext\claude-code-history-viewer. Tauri apps can accept CLI args via thetauri.conf.jsonCLI plugin. Add:claude-code-history-viewer --jsonl /path/to/session.jsonlopens the app focused on that fileclaude-code-history-viewer --session-id <uuid>opens the app focused on that session (resolves path internally)claude-code-history-viewer --project <project> --session-id <uuid>for disambiguationThis is an upstream change to the history-viewer repo (owned by
@jhlee0409, per the README acknowledgements). We'd need to either:Part 2 (csb-side):
csb viewcommandConfig key to override the viewer:
config["viewer_command"] = "claude-code-history-viewer --jsonl {path}"Simpler fallback (if upstream CLI mode delays)
If we can't get
claude-code-history-viewerCLI mode in time for alpha, the fallback is:Not ideal, but it's still one command vs. many clicks.
Even simpler:
csb view <id>pipes the JSONL through a distillation filter (reusing #12's code) and outputs markdown to stdout, which can be piped tolessorglow:This is probably the best alpha approach because it doesn't depend on upstream changes and gives immediate value. The history-viewer CLI integration can come in a later release.
Acceptance criteria
csb view <id>command exists in cli.py and commands.pyclaude-code-history-viewer --jsonl <path>if availableviewer_commandfor user overrideclaude-code-history-viewerrequesting CLI mode (optional, can be deferred)csb viewusageRelated
claude-code-history-viewerby @jhlee0409notes/ideas/2026-04-10__21-58-00__both_initial-release-criteria-and-repokit-common-question.md