claude-history 0.5.0__tar.gz → 0.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {claude_history-0.5.0/src/claude_history.egg-info → claude_history-0.6.1}/PKG-INFO +3 -3
- {claude_history-0.5.0 → claude_history-0.6.1}/README.md +1 -1
- {claude_history-0.5.0 → claude_history-0.6.1}/pyproject.toml +8 -2
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history/cli.py +54 -2
- claude_history-0.6.1/src/claude_history/skill/SKILL.md +107 -0
- {claude_history-0.5.0 → claude_history-0.6.1/src/claude_history.egg-info}/PKG-INFO +3 -3
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/SOURCES.txt +2 -1
- {claude_history-0.5.0 → claude_history-0.6.1}/LICENSE +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/setup.cfg +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history/__init__.py +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history/parser.py +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/dependency_links.txt +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/entry_points.txt +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/requires.txt +0 -0
- {claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-history
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: CLI tool to explore and inspect past Claude Code conversations
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: click>=8.3.1
|
|
@@ -23,7 +23,7 @@ uv pip install -e .
|
|
|
23
23
|
pip install -e .
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
To also install the
|
|
26
|
+
To also install the agent skill:
|
|
27
27
|
```bash
|
|
28
28
|
./install.sh # Installs to ~/.claude/skills/
|
|
29
29
|
./install.sh /custom/path # Installs to custom location
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "claude-history"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.6.1"
|
|
4
4
|
description = "CLI tool to explore and inspect past Claude Code conversations"
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.10"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"click>=8.3.1",
|
|
9
9
|
"orjson>=3.10.0",
|
|
@@ -14,3 +14,9 @@ claude-history = "claude_history.cli:main"
|
|
|
14
14
|
|
|
15
15
|
[dependency-groups]
|
|
16
16
|
dev = []
|
|
17
|
+
|
|
18
|
+
[tool.setuptools.packages.find]
|
|
19
|
+
where = ["src"]
|
|
20
|
+
|
|
21
|
+
[tool.setuptools.package-data]
|
|
22
|
+
claude_history = ["skill/*"]
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import os
|
|
4
4
|
import re
|
|
5
|
+
import shutil
|
|
5
6
|
from pathlib import Path
|
|
6
7
|
|
|
7
8
|
import click
|
|
@@ -511,19 +512,20 @@ def export(session_id: str, output_format: str):
|
|
|
511
512
|
if output_format == "json":
|
|
512
513
|
import json
|
|
513
514
|
|
|
515
|
+
messages: list[dict] = []
|
|
514
516
|
output = {
|
|
515
517
|
"session_id": conv.session_id,
|
|
516
518
|
"title": conv.title,
|
|
517
519
|
"cwd": conv.cwd,
|
|
518
520
|
"git_branch": conv.git_branch,
|
|
519
521
|
"start_time": conv.start_time.isoformat() if conv.start_time else None,
|
|
520
|
-
"messages":
|
|
522
|
+
"messages": messages,
|
|
521
523
|
}
|
|
522
524
|
|
|
523
525
|
for msg in conv.messages:
|
|
524
526
|
if msg.is_meta:
|
|
525
527
|
continue
|
|
526
|
-
|
|
528
|
+
messages.append(
|
|
527
529
|
{
|
|
528
530
|
"role": msg.role,
|
|
529
531
|
"text": msg.text,
|
|
@@ -736,6 +738,56 @@ def project_summary(project: str, limit: int, max_chars: int):
|
|
|
736
738
|
click.echo(f"\n({len(output)} characters)", err=True)
|
|
737
739
|
|
|
738
740
|
|
|
741
|
+
@cli.command("install-skill")
|
|
742
|
+
@click.option(
|
|
743
|
+
"-d",
|
|
744
|
+
"--dest",
|
|
745
|
+
type=click.Path(),
|
|
746
|
+
default=None,
|
|
747
|
+
help="Destination directory (default: ~/.claude/skills)",
|
|
748
|
+
)
|
|
749
|
+
@click.option("-f", "--force", is_flag=True, help="Overwrite existing skill")
|
|
750
|
+
def install_skill(dest: str | None, force: bool):
|
|
751
|
+
"""Install the agent skill for claude-history to ~/.claude/skills/.
|
|
752
|
+
|
|
753
|
+
This makes the claude-history skill available to Claude Code (or other coding agents).
|
|
754
|
+
"""
|
|
755
|
+
# Determine destination
|
|
756
|
+
if dest:
|
|
757
|
+
dest_dir = Path(dest)
|
|
758
|
+
else:
|
|
759
|
+
dest_dir = Path.home() / ".claude" / "skills"
|
|
760
|
+
|
|
761
|
+
skill_dest = dest_dir / "claude-history"
|
|
762
|
+
|
|
763
|
+
# Check if already exists
|
|
764
|
+
if skill_dest.exists() and not force:
|
|
765
|
+
echo(f"Skill already exists at {skill_dest}")
|
|
766
|
+
echo("Use --force to overwrite")
|
|
767
|
+
return
|
|
768
|
+
|
|
769
|
+
# Get the bundled skill directory
|
|
770
|
+
import claude_history
|
|
771
|
+
|
|
772
|
+
skill_source = Path(claude_history.__file__).parent / "skill"
|
|
773
|
+
|
|
774
|
+
if not skill_source.is_dir():
|
|
775
|
+
echo(f"Error: Bundled skill not found at {skill_source}")
|
|
776
|
+
return
|
|
777
|
+
|
|
778
|
+
# Create destination directory
|
|
779
|
+
dest_dir.mkdir(parents=True, exist_ok=True)
|
|
780
|
+
|
|
781
|
+
# Remove existing if force
|
|
782
|
+
if skill_dest.exists():
|
|
783
|
+
shutil.rmtree(skill_dest)
|
|
784
|
+
echo(f"Removed existing skill at {skill_dest}")
|
|
785
|
+
|
|
786
|
+
# Copy skill
|
|
787
|
+
shutil.copytree(skill_source, skill_dest)
|
|
788
|
+
echo(f"Installed skill to {skill_dest}")
|
|
789
|
+
|
|
790
|
+
|
|
739
791
|
def main():
|
|
740
792
|
"""Entry point for the CLI."""
|
|
741
793
|
cli()
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-history
|
|
3
|
+
description: |
|
|
4
|
+
CLI tool to explore and inspect past Claude Code conversation histories. Use this skill when:
|
|
5
|
+
- You need to catch up on a previous conversation that ran out of context
|
|
6
|
+
- You want to review what was discussed or accomplished in past sessions
|
|
7
|
+
- You need to search across conversation history for specific topics
|
|
8
|
+
- You want to generate a summary of past work to paste into a new session
|
|
9
|
+
- The user asks about their Claude Code conversation history
|
|
10
|
+
- The user wants to resume work from a previous session and needs context
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Claude History CLI
|
|
14
|
+
|
|
15
|
+
A tool to explore past Claude Code conversations stored in `~/.claude/projects/`.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
# Install from PyPI
|
|
21
|
+
pip install claude-history
|
|
22
|
+
|
|
23
|
+
# Install the Claude Code skill (default: ~/.claude/skills/)
|
|
24
|
+
claude-history install-skill
|
|
25
|
+
|
|
26
|
+
# Install to a custom location (e.g., for Codex)
|
|
27
|
+
claude-history install-skill -d ~/.codex/skills
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Commands
|
|
31
|
+
|
|
32
|
+
### List projects
|
|
33
|
+
```bash
|
|
34
|
+
claude-history projects
|
|
35
|
+
```
|
|
36
|
+
Shows all projects with conversation history, conversation counts, and last modified dates.
|
|
37
|
+
|
|
38
|
+
### List conversations in a project
|
|
39
|
+
```bash
|
|
40
|
+
claude-history list [PROJECT] [-n LIMIT]
|
|
41
|
+
```
|
|
42
|
+
- `PROJECT`: Can be specified in multiple formats:
|
|
43
|
+
- Full filesystem path: `/Users/bob/myproject`
|
|
44
|
+
- Project name suffix: `myproject` (matches any project ending with that name)
|
|
45
|
+
- Path as shown by `projects` command: `/Users/bob/myproject`
|
|
46
|
+
- Without argument: lists recent conversations across all projects
|
|
47
|
+
|
|
48
|
+
### View a conversation
|
|
49
|
+
```bash
|
|
50
|
+
claude-history view SESSION_ID [-f|--full] [--no-tools] [-n LIMIT] [-o OFFSET]
|
|
51
|
+
```
|
|
52
|
+
- `SESSION_ID`: Full ID, partial ID (e.g., first 8 chars), or file path
|
|
53
|
+
- `-f`: Show full message content (not truncated)
|
|
54
|
+
- `--no-tools`: Hide tool use details
|
|
55
|
+
- `-n`: Limit messages shown
|
|
56
|
+
- `-o`: Skip first N messages
|
|
57
|
+
|
|
58
|
+
### Quick summary
|
|
59
|
+
```bash
|
|
60
|
+
claude-history summary SESSION_ID
|
|
61
|
+
```
|
|
62
|
+
Shows conversation metadata and a compact flow of user/assistant exchanges with tools used.
|
|
63
|
+
|
|
64
|
+
### Search conversations
|
|
65
|
+
```bash
|
|
66
|
+
claude-history search QUERY [-n LIMIT]
|
|
67
|
+
```
|
|
68
|
+
Search all conversations for a text string.
|
|
69
|
+
|
|
70
|
+
### Generate catchup context
|
|
71
|
+
```bash
|
|
72
|
+
claude-history catchup SESSION_ID [-c MAX_CHARS] [--include-tools]
|
|
73
|
+
```
|
|
74
|
+
Generates a markdown summary suitable for pasting into a new Claude session to restore context. Output goes to stdout.
|
|
75
|
+
|
|
76
|
+
### Project summary
|
|
77
|
+
```bash
|
|
78
|
+
claude-history project-summary PROJECT_PATH [-n LIMIT] [-c MAX_CHARS]
|
|
79
|
+
```
|
|
80
|
+
Summarizes recent conversations in a project - useful for understanding project history across sessions.
|
|
81
|
+
|
|
82
|
+
### Export
|
|
83
|
+
```bash
|
|
84
|
+
claude-history export SESSION_ID [-f text|json]
|
|
85
|
+
```
|
|
86
|
+
Export conversation to simplified text or JSON format.
|
|
87
|
+
|
|
88
|
+
## Common Workflows
|
|
89
|
+
|
|
90
|
+
### Catching up on a previous session
|
|
91
|
+
```bash
|
|
92
|
+
# Find the session
|
|
93
|
+
claude-history list /path/to/project -n 10
|
|
94
|
+
|
|
95
|
+
# Get a catchup summary to paste into new context
|
|
96
|
+
claude-history catchup abc123def > catchup.md
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Finding where something was discussed
|
|
100
|
+
```bash
|
|
101
|
+
claude-history search "authentication bug"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Understanding project history
|
|
105
|
+
```bash
|
|
106
|
+
claude-history project-summary /path/to/project -n 5
|
|
107
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: claude-history
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.1
|
|
4
4
|
Summary: CLI tool to explore and inspect past Claude Code conversations
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: LICENSE
|
|
8
8
|
Requires-Dist: click>=8.3.1
|
|
@@ -23,7 +23,7 @@ uv pip install -e .
|
|
|
23
23
|
pip install -e .
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
To also install the
|
|
26
|
+
To also install the agent skill:
|
|
27
27
|
```bash
|
|
28
28
|
./install.sh # Installs to ~/.claude/skills/
|
|
29
29
|
./install.sh /custom/path # Installs to custom location
|
|
@@ -9,4 +9,5 @@ src/claude_history.egg-info/SOURCES.txt
|
|
|
9
9
|
src/claude_history.egg-info/dependency_links.txt
|
|
10
10
|
src/claude_history.egg-info/entry_points.txt
|
|
11
11
|
src/claude_history.egg-info/requires.txt
|
|
12
|
-
src/claude_history.egg-info/top_level.txt
|
|
12
|
+
src/claude_history.egg-info/top_level.txt
|
|
13
|
+
src/claude_history/skill/SKILL.md
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{claude_history-0.5.0 → claude_history-0.6.1}/src/claude_history.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|