claude-history 0.5.0__tar.gz → 0.6.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-history
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: CLI tool to explore and inspect past Claude Code conversations
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -23,7 +23,7 @@ uv pip install -e .
23
23
  pip install -e .
24
24
  ```
25
25
 
26
- To also install the Claude Code skill:
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
@@ -12,7 +12,7 @@ uv pip install -e .
12
12
  pip install -e .
13
13
  ```
14
14
 
15
- To also install the Claude Code skill:
15
+ To also install the agent skill:
16
16
  ```bash
17
17
  ./install.sh # Installs to ~/.claude/skills/
18
18
  ./install.sh /custom/path # Installs to custom location
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-history"
3
- version = "0.5.0"
3
+ version = "0.6.0"
4
4
  description = "CLI tool to explore and inspect past Claude Code conversations"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -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/*"]
@@ -1,7 +1,9 @@
1
1
  """CLI for exploring Claude Code conversation history."""
2
2
 
3
+ import importlib.resources
3
4
  import os
4
5
  import re
6
+ import shutil
5
7
  from pathlib import Path
6
8
 
7
9
  import click
@@ -736,6 +738,60 @@ 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
+ try:
771
+ skill_source = importlib.resources.files("claude_history") / "skill"
772
+ except (TypeError, AttributeError):
773
+ # Fallback for older Python
774
+ import claude_history
775
+
776
+ skill_source = Path(claude_history.__file__).parent / "skill"
777
+
778
+ if not skill_source.is_dir():
779
+ echo(f"Error: Bundled skill not found at {skill_source}")
780
+ return
781
+
782
+ # Create destination directory
783
+ dest_dir.mkdir(parents=True, exist_ok=True)
784
+
785
+ # Remove existing if force
786
+ if skill_dest.exists():
787
+ shutil.rmtree(skill_dest)
788
+ echo(f"Removed existing skill at {skill_dest}")
789
+
790
+ # Copy skill
791
+ shutil.copytree(skill_source, skill_dest)
792
+ echo(f"Installed skill to {skill_dest}")
793
+
794
+
739
795
  def main():
740
796
  """Entry point for the CLI."""
741
797
  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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-history
3
- Version: 0.5.0
3
+ Version: 0.6.0
4
4
  Summary: CLI tool to explore and inspect past Claude Code conversations
5
5
  Requires-Python: >=3.13
6
6
  Description-Content-Type: text/markdown
@@ -23,7 +23,7 @@ uv pip install -e .
23
23
  pip install -e .
24
24
  ```
25
25
 
26
- To also install the Claude Code skill:
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