Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
src/
tests/
specs/
docs/
.specify/
.claude/
coverage/
node_modules/
*.log
.env*
.DS_Store
Thumbs.db
.idea/
.vscode/
tsconfig.json
vitest.config.ts
eslint.config.js
CLAUDE.md
CLAUDE_CODE_DATA_STRUCTURE.md
AGENTS.md
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# claude-code-history Development Guidelines

Auto-generated from all feature plans. Last updated: 2026-04-01

## Active Technologies

- TypeScript 5.x with strict mode enabled + Commander.js (CLI framework), Node.js built-ins (`fs`, `path`, `readline`) (007-support-progress-messages)

## Project Structure

```text
src/
tests/
```

## Commands

npm test && npm run lint

## Code Style

TypeScript 5.x with strict mode enabled: Follow standard conventions

## Recent Changes

- 007-support-progress-messages: Added TypeScript 5.x with strict mode enabled + Commander.js (CLI framework), Node.js built-ins (`fs`, `path`, `readline`)

<!-- MANUAL ADDITIONS START -->
<!-- MANUAL ADDITIONS END -->
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ A POSIX-style CLI tool that does one thing well: access your Claude Code chat hi

- **List Sessions** - View all your Claude Code sessions with summaries, timestamps, and message counts
- **View Conversations** - Read full session content with formatted messages and tool calls
- **Progress Messages** - Search, view, filter, and export `progress` session entries without falling back to raw JSONL files
- **Token Statistics** - View complete token usage breakdown (input, output, cache read, cache creation) per session or aggregated across sessions
- **Search** - Find specific content across all sessions or within a single session
- **Export** - Save sessions to JSON or Markdown format
Expand Down Expand Up @@ -58,6 +59,7 @@ cch list --json
```

**Output:**

```
IDX TIMESTAMP PATH BRANCH SUMMARY MSGS
──── ──────────────────── ────────────────────────────── ─────────────── ────────────────────────────── ─────
Expand All @@ -67,6 +69,7 @@ cch list --json
```

**With `--stats` flag:**

```
IDX TIMESTAMP PATH BRANCH SUMMARY MSGS
──── ──────────────────── ────────────────────────────── ─────────────── ────────────────────────────── ─────
Expand All @@ -93,12 +96,16 @@ cch view 0
# View by UUID
cch view abc123-def456-...

# View only progress messages
cch view 0 --only progress

# Output as JSON
cch view 0 --json
```

**Output:**
```

````
# Session: Implement user authentication

| Property | Value |
Expand Down Expand Up @@ -129,17 +136,18 @@ I'll help you implement JWT authentication. Let me start by...
→ Result:
```typescript
export function authenticate() { ... }
```
````

────────────────────────────────────────────────────────────────────────────────
Token Usage Summary
Input tokens: 500
Output tokens: 1,200
Cache read tokens: 15,000
Cache creation tokens: 3,500
Total tokens: 20,200
Input tokens: 500
Output tokens: 1,200
Cache read tokens: 15,000
Cache creation tokens: 3,500
Total tokens: 20,200
────────────────────────────────────────────────────────────────────────────────
```

````

### Search Sessions

Expand All @@ -155,14 +163,18 @@ cch search "error" --context 3
# Search within a specific session
cch search "bug fix" --session 0

# Search for content that only appears in progress messages
cch search "AGENT_TASK_SCHEMA"

# Limit results
cch search "TODO" --limit 20

# Output as JSON
cch search "query" --json
```
````

**Output:**

```
Found 3 matches in 2 sessions

Expand Down Expand Up @@ -198,6 +210,8 @@ cch export --all --output all-sessions.json
cch export --all --format markdown --output all-sessions.md
```

Progress messages are preserved in JSON and Markdown exports, and `cch view --json` retains `type: "progress"` entries in the returned message list.

### Migrate Sessions

Copy or move sessions between workspaces:
Expand Down Expand Up @@ -238,11 +252,11 @@ cch -f view 0

### Environment Variables

| Variable | Description |
|----------|-------------|
| `CCH_DATA_PATH` | Custom Claude Code data directory (overridden by `--data-path`) |
| `PAGER` | Custom pager command (default: `less` on Unix, `more` on Windows) |
| `NO_COLOR` | Disable colored output |
| Variable | Description |
| --------------- | ----------------------------------------------------------------- |
| `CCH_DATA_PATH` | Custom Claude Code data directory (overridden by `--data-path`) |
| `PAGER` | Custom pager command (default: `less` on Unix, `more` on Windows) |
| `NO_COLOR` | Disable colored output |

## Library Usage

Expand Down Expand Up @@ -428,6 +442,7 @@ Claude Code stores conversation history in `~/.claude/projects/` as JSONL files.
```

Each session file contains JSON entries for:

- **Summary entries** - Session title/summary
- **User messages** - User inputs
- **Assistant messages** - Claude's responses with tool calls
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-code-history",
"version": "0.5.0",
"version": "0.6.0",
"description": "CLI and library for browsing, searching, exporting, and managing Claude Code chat history",
"type": "module",
"main": "./dist/lib/index.js",
Expand Down
35 changes: 35 additions & 0 deletions specs/007-support-progress-messages/checklists/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Specification Quality Checklist: Support Progress Messages

**Purpose**: Validate specification completeness and quality before proceeding to planning
**Created**: 2026-04-01
**Feature**: [spec.md](../spec.md)

## Content Quality

- [x] No implementation details (languages, frameworks, APIs)
- [x] Focused on user value and business needs
- [x] Written for non-technical stakeholders
- [x] All mandatory sections completed

## Requirement Completeness

- [x] No [NEEDS CLARIFICATION] markers remain
- [x] Requirements are testable and unambiguous
- [x] Success criteria are measurable
- [x] Success criteria are technology-agnostic (no implementation details)
- [x] All acceptance scenarios are defined
- [x] Edge cases are identified
- [x] Scope is clearly bounded
- [x] Dependencies and assumptions identified

## Feature Readiness

- [x] All functional requirements have clear acceptance criteria
- [x] User scenarios cover primary flows
- [x] Feature meets measurable outcomes defined in Success Criteria
- [x] No implementation details leak into specification

## Notes

- Validated against `spec.md` on 2026-04-01.
- No clarification markers remain; the spec is ready for `/speckit.plan`.
Loading
Loading