Real-time workflow visualization for Claude Code
Project description
ccviz
Real-time workflow visualization for Claude Code.
See exactly what tools Claude called, in what order, and how long each step took — rendered as an interactive DAG in your browser.
Install
pip install ccviz
Requires Python ≥ 3.10. No Node.js needed.
Quick Start
# Start the visualizer (injects hooks + opens browser)
ccviz start
# Run Claude Code as usual
claude
# Open http://localhost:7842 to see the workflow
That's it. Every tool call Claude makes will appear in the graph within a few seconds.
How It Works
Claude Code runs
│
▼
Hooks (PreToolUse / PostToolUse / Stop)
injected into ~/.claude/settings.json
│
▼
~/.ccviz/db.sqlite
│
▼
ccviz server http://localhost:7842
│ SSE (2-5s latency)
▼
Browser — React Flow DAG
ccviz start writes three hooks into ~/.claude/settings.json (global, affects all projects). Claude Code calls these hooks on every tool use, passing a JSON payload via stdin. The hook handler writes to a local SQLite database. The web UI polls via SSE and updates the graph in near-real-time.
UI Overview
┌──────────────┬──────────────────┬─────────────────────────────┐
│ Sessions │ Turns │ Workflow Graph │
│ │ │ │
│ ● project-a │ > turn 1 12:01 │ [Read]──►[Bash]──►[Edit] │
│ project-b │ turn 2 12:05 │ │ │
│ │ ● turn 3 live │ [Agent] │
│ │ │ ┌────┤ │
│ │ │ [Read] [Write] │
└──────────────┴──────────────────┴──────────────────────────────┘
▼ click node
┌─────────────────┐
│ tool: Bash │
│ input: {...} │
│ output: ... │
│ duration: 120ms │
└─────────────────┘
- Left sidebar — all sessions, sorted by recency. Active sessions show a live indicator.
- Middle panel — turns (one per user message) within the selected session.
- Right panel — the workflow DAG for the selected turn.
- Node colors — blue = file ops, orange = shell, green = search/web, purple = sub-agent, gray = other.
- Click any node — opens a detail panel with full input/output and duration.
CLI Reference
ccviz start [--port PORT] [--no-open] # inject hooks, start server, open browser
ccviz stop # stop server (hooks remain active)
ccviz status # show server + hook + DB status
ccviz uninstall # remove hooks, stop server (data preserved)
Default port is 7842.
Data
All data is stored locally in ~/.ccviz/:
~/.ccviz/
├── db.sqlite # sessions, turns, tool calls
└── server.log # server stderr
To wipe all data:
ccviz uninstall
rm -rf ~/.ccviz
Nothing is ever sent off-device.
Development
git clone https://github.com/ccviz/ccviz
cd ccviz
# Backend
pip install -e ".[dev]"
pytest tests/ -v
# Frontend (optional — pre-built assets are included)
cd frontend
npm install
npm run dev # dev server at :5173, proxies /api to :7842
npm run build # outputs to ccviz/frontend/
Project Structure
ccviz/
├── ccviz/
│ ├── db.py # SQLite schema + queries
│ ├── hooks.py # hook handler (called by Claude Code)
│ ├── server.py # FastAPI REST + SSE
│ ├── cli.py # ccviz start/stop/status/uninstall
│ └── frontend/ # pre-built React app (ships with pip package)
├── frontend/ # React source (development only)
│ └── src/
│ ├── App.tsx
│ ├── components/
│ │ ├── SessionList.tsx
│ │ ├── TurnList.tsx
│ │ ├── WorkflowGraph.tsx # React Flow
│ │ └── NodeDetail.tsx
│ └── hooks/useSSE.ts
└── tests/
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccviz-0.1.0.tar.gz.
File metadata
- Download URL: ccviz-0.1.0.tar.gz
- Upload date:
- Size: 128.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48a3813f48b79e420beea5125568820e91a890776593ac89c703e954cb365125
|
|
| MD5 |
a2690d897b7ad337139722997610bee8
|
|
| BLAKE2b-256 |
32017f3ccf8a7bb7f78f15f94332f8420476930ae6822c723bb7188630b990e5
|
File details
Details for the file ccviz-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ccviz-0.1.0-py3-none-any.whl
- Upload date:
- Size: 128.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4376fc547630fd3e867dce9cce0188ddec890b32143decf10e10b421f69f50e
|
|
| MD5 |
f2ab8a59b680c375e5daa260e0a368fe
|
|
| BLAKE2b-256 |
5c04b6355b05cb5c0573e0075e04d662df080befb5073160278dd96e460301bf
|