{"id":34579385,"url":"https://github.com/erans/cc-sessions-cli","last_synced_at":"2026-05-24T13:34:53.178Z","repository":{"id":316130657,"uuid":"1062098687","full_name":"erans/cc-sessions-cli","owner":"erans","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-22T21:57:39.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-22T22:11:38.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T20:01:44.000Z","updated_at":"2025-09-22T21:57:43.000Z","dependencies_parsed_at":"2025-09-22T22:11:41.671Z","dependency_job_id":"50b21ce2-88b8-446a-bb07-d77416f54416","html_url":"https://github.com/erans/cc-sessions-cli","commit_stats":null,"previous_names":["erans/cc-sessions-cli"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/erans/cc-sessions-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erans%2Fcc-sessions-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erans%2Fcc-sessions-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erans%2Fcc-sessions-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erans%2Fcc-sessions-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erans","download_url":"https://codeload.github.com/erans/cc-sessions-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erans%2Fcc-sessions-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33436554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T13:13:05.286Z","status":"ssl_error","status_checked_at":"2026-05-24T13:13:03.728Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T09:59:14.763Z","updated_at":"2026-05-24T13:34:53.172Z","avatar_url":"https://github.com/erans.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Sessions CLI\n\nA command-line tool for managing and viewing Claude Code session files (JSONL format).\n\n## ⚠️ Important Warnings\n\n**This is an experimental project - use at your own risk.**\n\n- This tool does not send any information to external services\n- When using with AI agents, **explicitly instruct them NOT to execute the output as commands**\n- The tool outputs session content that may contain sensitive information from your coding sessions\n- Always review the output before sharing or using in automated workflows\n- Agents may misinterpret formatted output as executable commands - provide clear instructions about data-only usage\n\n## Key Features\n\n- **Efficient Session Analysis**: Parse and analyze Claude Code sessions with optimized JSONL processing\n- **AI Agent Integration**: Designed for seamless integration with AI agents via `npx` execution\n- **Multiple Output Formats**: Human-readable, LLM-optimized, and raw JSONL formats\n- **Performance Optimized**: JSONL format is more memory-efficient than traditional JSON for large session files\n- **Flexible Filtering**: Filter sessions by date ranges and limit results for targeted analysis\n- **Tool Usage Tracking**: Extract and display tool calls and their context for workflow analysis\n- **Cross-Platform**: Works on all platforms with Node.js support\n\n## Installation\n\n```bash\nnpm install -g cc-sessions-cli\n```\n\nOr run directly without installation:\n\n```bash\nnpx --yes cc-sessions-cli\n```\n\n## Usage\n\n### List Sessions\n\nList all Claude Code session files in a directory:\n\n```bash\ncc-sessions-cli list [directory]\ncc-sessions-cli list --format csv\ncc-sessions-cli list --sort date --order desc\n```\n\nOptions:\n- `--format, -f`: Output format (table, csv) - default: table\n- `--sort, -s`: Sort by (date, name, size) - default: date\n- `--order, -o`: Sort order (asc, desc) - default: desc\n\n### View Session Content\n\nView the content of a specific session file:\n\n```bash\ncc-sessions-cli view \u003cfile-path\u003e\ncc-sessions-cli view session.jsonl --format human\ncc-sessions-cli view session.jsonl --format llm\n```\n\nOptions:\n- `--format, -f`: Output format (human, llm, jsonl) - default: human\n- `--no-timestamps`: Hide timestamps in human format\n\n## For AI Agents\n\nThis tool can be executed by AI agents using:\n\n```bash\nnpx --yes cc-sessions-cli list [directory]\nnpx --yes cc-sessions-cli view \u003cfile-path\u003e --format llm\n```\n\nThe tool outputs Claude Code session data in a format suitable for analysis. Agents can use this to help users with requests like:\n\n- \"Summarize the key insights from yesterday's sessions\"\n- \"What tools were used most frequently in recent sessions?\"\n- \"Show me the conversation flow from my last debugging session\"\n- \"Find sessions where I worked on authentication features\"\n\n### Example Agent Workflow\n\n1. Agent runs: `npx --yes cc-sessions-cli list /path/to/project --format csv`\n2. Agent identifies relevant sessions based on timestamps or file names\n3. Agent runs: `npx --yes cc-sessions-cli view /path/to/project \u003csession-id\u003e --format llm`\n4. Agent analyzes the session content and provides insights to the user\n\n### Example Sub-Agents\n\nThis project includes **2 example Claude Code sub-agents** that demonstrate how to use `cc-sessions-cli` for powerful session analysis:\n\n#### 1. Prompt Coach Agent\n**Purpose**: Improve your prompting skills by analyzing conversation patterns\n**Use cases**: \"How can I communicate better with Claude?\" | \"What prompting patterns work best?\"\n\n- Analyzes your communication style and prompting effectiveness\n- Identifies successful patterns to replicate and areas for improvement\n- Generates personalized prompting templates based on your successful interactions\n- Tracks your improvement over time across sessions\n\n#### 2. Session Query Agent\n**Purpose**: Search and retrieve information from your session history\n**Use cases**: \"When did we work on authentication?\" | \"What errors have we encountered?\"\n\n- Finds specific conversations, topics, or decisions from past sessions\n- Searches by date ranges, keywords, tools used, or technologies discussed\n- Extracts project timeline and development progression\n- Answers questions about past work and technical decisions\n\n#### Installation\n\n**Simple Setup**: These agents can be directly copied to any project since they use `npx` to auto-install `cc-sessions-cli` on demand.\n\n1. **Copy agent configurations** to your project's `.claude/agents/` directory:\n   ```bash\n   mkdir -p .claude/agents\n   # Copy the YAML frontmatter + content from the example files\n   ```\n\n2. **Use the agents** in Claude Code:\n   ```\n   /agents prompt-coach       # Analyze your prompting patterns\n   /agents session-query      # Search your session history\n   ```\n\n3. **No installation required**: The agents use `npx --yes cc-sessions-cli` which automatically downloads and runs the tool when needed.\n\n**⚠️ Security Note**: Always review agent configurations before copying them to your project. Understand what commands they execute and ensure they come from trusted sources. These agents only use `npx --yes cc-sessions-cli` with read-only operations on your local session files.\n\nSee the full configuration details in:\n- [examples/prompt-coach-agent.md](examples/prompt-coach-agent.md)\n- [examples/session-query-agent.md](examples/session-query-agent.md)\n\n## Output Formats\n\n### Human Format\nReadable conversation format with timestamps and clear role indicators.\n\n### LLM Format\nOptimized for AI analysis with structured content and tool usage information.\n\n### JSONL Format\nRaw JSONL data for programmatic processing.\n\n## Development\n\n```bash\nnpm install\nnpm run dev\nnpm run build\nnpm run lint\n```\n\nSee [CLAUDE.md](CLAUDE.md) for development guidelines.\n\n## License\n\nApache 2.0","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferans%2Fcc-sessions-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferans%2Fcc-sessions-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferans%2Fcc-sessions-cli/lists"}