ccsinfo
Inspect Claude Code sessions, tasks, prompt history, and usage statistics from a CLI or REST API.
Get StartedOverview
-
Overview
Introduce ccsinfo, its audience, and the core value of exploring Claude Code activity from local data or a remote service.
-
Architecture and Project Structure
Map the cli, core, server, utils, and tests packages, and show how parsers, services, and routers fit together.
-
Data Model and Storage
Describe the ~/.claude/projects and ~/.claude/tasks layouts, session JSONL files, prompt history files, and the encoded project path naming scheme.
Getting Started
-
Installation
Cover Python 3.12+ requirements, package installation, the ccsinfo entry point, and optional developer dependencies.
-
Quickstart: Local CLI Mode
Walk through using ccsinfo directly against a local ~/.claude directory to list sessions, inspect messages, and view statistics.
-
Quickstart: Remote Server Mode
Show how to start the FastAPI server with ccsinfo serve, verify it with health endpoints, and point CLI clients at it.
Configuration
-
Configuration
Document the CCSINFO_SERVER_URL environment variable, the --server-url flag, and serve command host and port options.
-
Project IDs and Lookups
Explain dash-encoded project IDs, session lookup behavior, and why task lookups must be scoped by session ID.
Usage Guides
-
Working with Sessions
Cover listing sessions, filtering by project or active status, viewing session details, reading messages, and inspecting tool calls.
-
Working with Projects
Show how to browse projects, inspect project metadata, and understand per-project activity and statistics.
-
Working with Tasks
Document task listing, status filtering, pending work views, task details, blocking relationships, and session-scoped task lookup.
-
Searching Sessions, Messages, and History
Explain full-text search across session metadata, message content, and prompt history stored in .history.jsonl files.
-
Using Statistics and Trends
Cover global totals, daily activity breakdowns, trend analysis, most active projects, and most used tools.
-
JSON Output and Automation
Show how major CLI commands support JSON output and how to integrate ccsinfo into scripts and other tooling.
API Reference
-
API Overview
Introduce the REST API, shared response models, common query parameters, and the relationship between CLI commands and HTTP endpoints.
-
Sessions API
Reference session listing, active sessions, session detail, messages, tools, tasks, progress, and summary endpoints.
-
Projects API
Reference project listing, project detail, project sessions, active project sessions, and project statistics endpoints.
-
Tasks API
Reference task listing, status filtering, pending tasks, and session-qualified task detail endpoints.
-
Search API
Reference session, message, and prompt-history search endpoints and explain what fields each search mode covers.
-
Stats and Health API
Reference global stats, daily stats, trend analytics, health checks, and server info endpoints.
Operations
-
Running the Server
Cover running ccsinfo as a network-accessible FastAPI service, host and port choices, health checks, and remote client usage patterns.
-
Active Session Detection
Explain how ccsinfo infers active Claude sessions from running processes, the short-lived cache it uses, and platform-specific caveats.
-
Troubleshooting
Help users diagnose missing ~/.claude data, empty results, project ID confusion, task lookup issues, and local versus remote mode problems.
Development
-
Development Setup
Cover source layout, editable installs, uv-based workflows, and the developer environment expected by the repository.
-
Testing and Quality Checks
Document pytest, tox, xdist-based test runs, Ruff formatting and linting, mypy, flake8, and pre-commit hooks including secret scanners.
-
Automation and CI
Explain the current automation story around tox and pre-commit configuration, and note that no checked-in GitHub Actions or other CI pipeline files are present.