MCPcopy Index your code
hub / github.com/d-kimuson/claude-code-viewer

github.com/d-kimuson/claude-code-viewer @v0.7.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.5 ↗ · + Follow
1,308 symbols 3,583 edges 516 files 1 documented · 0% updated 2mo agov0.7.5 · 2026-05-10★ 1,24111 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Claude Code Viewer

License CI GitHub Release

ccv-logo

A full-featured web-based Claude Code client that provides complete interactive functionality for managing Claude Code projects. Start new conversations, resume existing sessions, monitor running tasks in real-time, and browse your conversation history—all through a modern web interface.

https://github.com/user-attachments/assets/090d4806-163f-4bac-972a-002c7433145e

Important Notice: Agent SDK and Subscription Usage

[!WARNING] As of April 2026, Anthropic's Terms of Service prohibit using the Agent SDK to send chat messages with a subscription account. While Anthropic's X/Twitter announcements suggested personal use may be acceptable, the boundary between permitted and prohibited use remains ambiguous.

In response, chat sending, session resuming, permission approval, and AskUserQuestion have been made opt-in.

Note that real-time conversation log viewing, session history browsing, Git operations, and all other read-oriented features are implemented independently of the Agent SDK and remain fully available regardless of your authentication mode. You can start a Claude Code session from the CLI (or the built-in terminal) and watch it live in Claude Code Viewer without any restrictions.

Choosing Your Authentication Mode

On first launch (or from the Settings screen), you will be prompted to select your authentication method:

  • API Key (default) — Uses the Anthropic API directly. All features, including chat sending, are fully available.
  • Subscription — Opts out of Agent SDK chat features. The chat input switches to a copy mode: configure your session options in the form, then click the Copy button to get the equivalent claude CLI command with the corresponding arguments already set. Paste and run it in any terminal to start or resume your session. Once the session is running, Claude Code Viewer will display the conversation in real-time as usual.

Built-in Terminal

Claude Code Viewer includes an integrated terminal emulator accessible via the panel at the bottom of the screen. Open it, paste the copied command, and launch Claude Code without ever leaving the browser.


Introduction

Claude Code Viewer is a web-based Claude Code client focused on comprehensive session log analysis. It preserves and organizes all conversation data through strict schema validation and a progressive disclosure UI that reveals details on demand.

Core Philosophy: Zero data loss + Effective organization + Remote-friendly design

System Requirements

  • Node.js: Version 22.13.0 or later
  • Claude Code: v1.0.125 or later
  • Operating Systems: macOS and Linux (Windows is not supported)

Installation & Usage

Quick Start (CLI)

Run directly from npm without installation:

npx @kimuson/claude-code-viewer@latest --port 3400

Alternatively, install globally:

npm install -g @kimuson/claude-code-viewer
claude-code-viewer --port 3400

The server will start on port 3400 (or the default port 3000). Open http://localhost:3400 in your browser to access the interface.

Available Options:

claude-code-viewer [options]

Options:
  -p, --port <port>                Port to listen on (default: 3000)
  -h, --hostname <hostname>        Hostname to listen on (default: localhost)
  -v, --verbose                    Enable verbose debug logging
  -P, --password <password>        Password for authentication
  -e, --executable <executable>    Path to Claude Code executable
  --claude-dir <claude-dir>        Path to Claude directory
  --api-only                       Run in API-only mode without Web UI

Remote Access via Tailscale (Mobile / PWA)

Claude Code Viewer works great as a persistent server you access from your phone. A convenient approach is to run it on a always-on machine and expose it over Tailscale with HTTPS:

  1. Set up HTTPS on your Tailscale node following the Tailscale HTTPS certificates guide.
  2. Start Claude Code Viewer bound to all interfaces with a password:

bash claude-code-viewer --hostname 0.0.0.0 --port 3400 --password your-secret

  1. Access from your phone via the Tailscale HTTPS URL (e.g. https://your-machine.ts.net:3400).

Claude Code Viewer is a PWA (Progressive Web App). On mobile, tap "Add to Home Screen" to get an app-like experience with an optimized UI and push notifications when sessions complete.

Configuration

Command-Line Options and Environment Variables

Claude Code Viewer can be configured using command-line options or environment variables. Command-line options take precedence over environment variables.

Command-Line Option Environment Variable Description Default
-p, --port <port> PORT Port number for Claude Code Viewer to run on 3000
-h, --hostname <hostname> HOSTNAME Hostname to listen on for remote access localhost
-v, --verbose Enable verbose debug logging. Outputs detailed server-side logs to stderr for troubleshooting (unset)
-P, --password <password> CCV_PASSWORD Password for authentication. When set, enables password-based authentication to protect access to Claude Code Viewer. All /api routes (except login, logout, check, config, and version endpoints) require authentication. If not set, authentication is disabled and the application is publicly accessible (none)
-e, --executable <executable> CCV_CC_EXECUTABLE_PATH Path to Claude Code installation. If not set, uses system PATH installation, or falls back to bundled version from dependencies (auto-detect)
--claude-dir <claude-dir> CCV_GLOBAL_CLAUDE_DIR Path to Claude directory where session logs are stored ~/.claude
--terminal-disabled CCV_TERMINAL_DISABLED Disable the in-app terminal panel when set to 1/true (env) or when the flag is present (CLI) (unset)
--terminal-shell <path> CCV_TERMINAL_SHELL Shell executable for terminal sessions (e.g. /bin/zsh) (auto-detect)
--terminal-unrestricted CCV_TERMINAL_UNRESTRICTED When set to 1 (env) or when the flag is present (CLI), disables the restricted shell flags for bash (unset)
--api-only CCV_API_ONLY Run in API-only mode. Disables Web UI, terminal WebSocket, and non-essential endpoints. Only core API routes (/api/version, /api/config, /api/projects, /api/claude-code, /api/search, /api/sse) are exposed. Useful for integrating with external tools like n8n (unset)

Breaking Change: Environment variable names have been changed. If you're using environment variables, update them as follows:

  • CLAUDE_CODE_VIEWER_AUTH_PASSWORDCCV_PASSWORD
  • CLAUDE_CODE_VIEWER_CC_EXECUTABLE_PATHCCV_CC_EXECUTABLE_PATH
  • New environment variable added: CCV_GLOBAL_CLAUDE_DIR (previously the Claude directory path was hardcoded to ~/.claude)

API Authentication

When --password / CCV_PASSWORD is set, all /api routes (except auth-related endpoints) require authentication. You can authenticate in two ways:

  1. Session cookie: Use the /api/auth/login endpoint to set the ccv-session cookie, then include it in subsequent requests.
  2. Authorization header: Send Authorization: Bearer <password> on each request.

If no password is configured, API authentication is disabled.

User Settings

Settings can be configured from the sidebar in Claude Code Viewer.

Setting Default Description
Hide sessions without user messages true Claude Code creates logs for operations like /compact that aren't tied to actual tasks, which can create noise. When enabled, sessions without user messages are hidden.
Unify sessions with same title false When resuming, Claude Code creates a new session with regenerated conversation logs. When enabled, only the latest session with the same title is displayed.
Auto-schedule Continue on Rate Limit false Automatically schedules a continue message when Claude hits rate limits. When enabled, the system detects rate limit errors in live sessions and creates a scheduled job to send "continue" one minute after the limit reset time. This prevents manual intervention for rate limit recovery.
Enter Key Behavior Shift+Enter Specifies which key combination sends messages. Options include Enter, Shift+Enter, and Command+Enter.
Search Hotkey Command+K Select the hotkey to open the search dialog. Options include Ctrl+K and Command+K.
Find Hotkey Command+F Select the hotkey to open the in-page find bar. Options include Ctrl+F and Command+F.
Model Choices default, haiku, sonnet, opus Customize the list of

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 1,115
Class 136
Method 40
Interface 17

Languages

TypeScript100%

Modules by API surface

src/server/core/git/services/GitService.ts39 symbols
src/server/core/claude-code/services/ClaudeCodeSessionProcessService.ts25 symbols
src/web/app/components/MarkdownContent.tsx22 symbols
src/server/core/terminal/TerminalService.ts20 symbols
src/server/core/session/services/ExportService.ts18 symbols
src/web/app/projects/[projectId]/sessions/[sessionId]/components/diffModal/DiffViewer.tsx16 symbols
src/web/app/components/rightPanel/GitTabContent.tsx16 symbols
src/@types/speech-recognition.d.ts16 symbols
src/web/lib/api/queries.ts15 symbols
src/web/components/SettingsControls.tsx15 symbols
src/web/app/projects/[projectId]/sessions/[sessionId]/components/conversationList/ConversationList.tsx15 symbols
src/web/app/components/rightPanel/FilesToolsTabContent.tsx15 symbols

For agents

$ claude mcp add claude-code-viewer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page