Skip to main content

claude-history

CLI tool to explore and inspect past Claude Code and Codex conversation histories.

Installation

# Recommended: install globally with uv
uv tool install claude-history

# Or with pip
pip install claude-history

This package installs two CLIs:

  • claude-history for ~/.claude/projects/
  • codex-history for ~/.codex/sessions/

To also install the agent skill (for Claude Code, Codex, etc.):

# Default: installs to ~/.claude/skills/
claude-history install-skill

# Custom location (e.g., for Codex)
claude-history install-skill -d ~/.codex/skills

To install the Codex skill:

codex-history install-skill

Usage

List projects

claude-history projects

Shows all projects with conversation history, conversation counts, and last modified dates.

List conversations in a project

claude-history list [PROJECT] [-n LIMIT]
  • PROJECT: Can be specified in multiple formats:
    • Relative path: . (current directory), .., ./subdir
    • Full filesystem path: /Users/bob/myproject
    • Project name suffix: myproject (matches any project ending with that name)
    • Path as shown by projects command: /Users/bob/myproject
  • Without argument: lists recent conversations across all projects

View a conversation

claude-history view SESSION_ID [-f|--full] [--no-tools] [-n LIMIT] [-o OFFSET] [--tail]
  • SESSION_ID: Full ID, partial ID (e.g., first 8 chars), or file path
  • -f: Show full message content (not truncated)
  • --no-tools: Hide tool use details
  • -n: Limit messages shown
  • -o: Skip first N messages
  • --tail: Show the last N messages (use with -n)

Quick summary

claude-history summary SESSION_ID

Shows conversation metadata and a compact flow of user/assistant exchanges with tools used.

Search conversations

claude-history search QUERY [-p PROJECT] [-n LIMIT]

Search conversations for a text string.

  • -p PROJECT: Limit search to a specific project (supports ., .., full paths, or name suffix)
  • Without -p: searches all conversations across all projects

Generate catchup context

claude-history catchup SESSION_ID [-c MAX_CHARS] [--include-tools] [--from-start]

Generates a markdown summary suitable for pasting into a new Claude session to restore context. By default it prioritizes recent conversation content and includes the final assistant message in full. Use --from-start to use start-first truncation behavior.

Project summary

claude-history project-summary PROJECT_PATH [-n LIMIT] [-c MAX_CHARS]

Summarizes recent conversations in a project.

Export

claude-history export SESSION_ID [-f text|json]

Export conversation to simplified text or JSON format.

Print bundled skill

claude-history skill

Prints the packaged SKILL.md contents.

Codex Usage

codex-history has the same command surface as claude-history and is tuned for Codex session files and project organization. Use CODEX_HISTORY_DIR to override the default ~/.codex/sessions/ location.

List Codex projects

codex-history projects

List Codex conversations

codex-history list [PROJECT] [-n LIMIT]

View/search/summarize Codex sessions

codex-history view SESSION_ID
codex-history search "query" [-p PROJECT]
codex-history summary SESSION_ID
codex-history catchup SESSION_ID
codex-history project-summary PROJECT
codex-history export SESSION_ID
codex-history skill

Common Workflows

Catching up on a previous session

# Find the session (use . for current directory)
claude-history list . -n 10

# Get a catchup summary to paste into new context
claude-history catchup abc123def

Finding where something was discussed

# Search current project
claude-history search "authentication bug" -p .

# Search all projects
claude-history search "authentication bug"

Understanding project history

# Summarize current project's recent sessions
claude-history project-summary . -n 5

# Or specify a path
claude-history project-summary /path/to/project -n 5

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_history-0.8.0.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_history-0.8.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file claude_history-0.8.0.tar.gz.

File metadata

  • Download URL: claude_history-0.8.0.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for claude_history-0.8.0.tar.gz
Algorithm Hash digest
SHA256 8a30ddec1cda9e4505226e61a70b473a0945457a01c23d1919a805eb010b4898
MD5 2e8229c5817b538901ca024eca1c11d5
BLAKE2b-256 2979b35b6357852d6795e65569be5184e574584095f710e5c64f3ec1d7cdfa51

See more details on using hashes here.

File details

Details for the file claude_history-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: claude_history-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for claude_history-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ce4cb1531970c268e467d80dd24dc09acf73192c2bc9a196a9721dd1f2b90c6
MD5 f9ba482f4755357b3e918b14a743f838
BLAKE2b-256 10da18808efefa0404506a7224726446fc272582bf4f1e92e1c8cb0c5650a327

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.1

2 files

0.7.0

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page