Ephemeral workspace manager for exploring GitHub repositories with Claude Code
Project description
claude-explore
Ephemeral workspace manager for exploring GitHub repositories with Claude Code.
Overview
claude-explore makes it easy to explore GitHub repositories with Claude Code without cluttering your workspace. It automatically:
- Clones repositories to a temporary workspace (
~/.claude-explore/) - Launches Claude Code in the right directory (including subdirectories)
- Tracks your exploration sessions
- Cleans up old workspaces automatically
Features
- Context-agnostic: Run from any terminal, no need to cd first
- Subdirectory support: Explore specific parts of a repository
- Session tracking: Resume previous explorations
- Auto-cleanup: Remove old workspaces based on age
- Disk usage monitoring: Track workspace sizes
- No manual setup: Works out of the box
Installation
# Install using uv (recommended)
uv tool install claude-explore
# Or using pip
pip install claude-explore
Quick Start
# Explore a repository (options can come before URL)
claude-explore https://github.com/user/repo
claude-explore --skip-permissions https://github.com/user/repo
# Explore a subdirectory
claude-explore https://github.com/user/repo/tree/main/src/core
# List active workspaces
claude-explore list
# Clean up old workspaces (older than 7 days)
claude-explore clean
# Get workspace info
claude-explore info
Usage
Explore a Repository
The default action is to explore - just pass a URL directly:
# Basic usage (no 'explore' subcommand needed!)
claude-explore https://github.com/anthropics/anthropic-sdk-python
# Explore a specific subdirectory
claude-explore https://github.com/anthropics/anthropic-sdk-python/tree/main/src/anthropic
# Skip git pull if workspace exists
claude-explore --no-update https://github.com/user/repo
# Launch Claude with --dangerously-skip-permissions
claude-explore --skip-permissions https://github.com/user/repo
# Pass additional Claude arguments
claude-explore --claude-args "--debug --verbose" https://github.com/user/repo
# Combine multiple options (flags before URL)
claude-explore --skip-permissions --no-update https://github.com/user/repo
# You can also use the explicit 'explore' subcommand if you prefer
claude-explore explore --skip-permissions https://github.com/user/repo
Supported URL formats:
https://github.com/user/repohttps://github.com/user/repo.gitgit@github.com:user/repo.githttps://github.com/user/repo/tree/branch/path/to/subdir
List Sessions
# List all exploration sessions
claude-explore list
# Show only recent sessions (last 7 days)
claude-explore list --days 7
Output example:
Found 3 session(s):
a1b2c3d4
Repository: user/awesome-repo
URL: https://github.com/user/awesome-repo
Subdirectory: src/core
Last used: 2025-11-14T10:30:00
Created: 2025-11-13T15:20:00
e5f6g7h8
Repository: org/another-repo
URL: https://github.com/org/another-repo
Last used: 2025-11-12T14:15:00
Created: 2025-11-12T14:15:00
Resume a Session
# Resume a previous exploration (use ID from 'list' command)
claude-explore resume a1b2c3d4
# Resume with permissions skipped
claude-explore resume --skip-permissions a1b2c3d4
# Resume with additional Claude args
claude-explore resume --claude-args "--debug" a1b2c3d4
Clean Up Workspaces
# Remove workspaces not used in 7 days (default)
claude-explore clean
# Remove workspaces not used in 30 days
claude-explore clean --days 30
# Remove ALL workspaces (with confirmation)
claude-explore clean --all
Workspace Information
# Show workspace manager info and disk usage
claude-explore info
Output example:
Claude Explore Workspace Manager
========================================
Base directory: /home/user/.claude-explore
Workspaces directory: /home/user/.claude-explore/workspaces
Sessions file: /home/user/.claude-explore/sessions.json
Active workspaces: 3
Total disk usage: 450.5 MB
How It Works
Directory Structure
~/.claude-explore/
├── workspaces/
│ ├── a1b2c3d4/ # Hashed workspace ID (user/repo)
│ │ ├── .git/
│ │ ├── src/
│ │ └── ...
│ └── e5f6g7h8/
│ └── ...
└── sessions.json # Session metadata and timestamps
Workspace IDs
Each repository gets a unique workspace ID based on user/repo:
- Same repository always gets the same workspace ID
- Different subdirectories of the same repo share the same workspace
- This avoids duplicate clones and saves disk space
Session Tracking
The sessions.json file tracks:
- Workspace ID
- Repository name and URL
- Subdirectory (if exploring a subdir)
- Created and last used timestamps
This enables:
- Resuming previous explorations
- Automatic cleanup of old workspaces
- Usage tracking and statistics
Command Reference
claude-explore <repo_url>
Explore a GitHub repository.
Arguments:
repo_url: GitHub repository URL (HTTPS or SSH)
Options:
--no-update: Skip git pull if workspace exists--workspace-dir PATH: Use custom workspace base directory--skip-permissions: Launch Claude with--dangerously-skip-permissions--claude-args TEXT: Additional arguments to pass to Claude (e.g.,"--debug --verbose")
claude-explore list
List active exploration sessions.
Options:
--days N: Show only sessions from last N days--workspace-dir PATH: Use custom workspace base directory
claude-explore resume <workspace_id>
Resume a previous exploration session.
Arguments:
workspace_id: Workspace identifier (fromlistcommand)
Options:
--workspace-dir PATH: Use custom workspace base directory--skip-permissions: Launch Claude with--dangerously-skip-permissions--claude-args TEXT: Additional arguments to pass to Claude (e.g.,"--debug --verbose")
claude-explore clean
Clean up old workspaces.
Options:
--days N: Remove workspaces not used in N days (default: 7)--all: Remove all workspaces (prompts for confirmation)--workspace-dir PATH: Use custom workspace base directory
claude-explore info
Show workspace manager information and disk usage.
Options:
--workspace-dir PATH: Use custom workspace base directory
Advanced Usage
Shell Aliases
Create convenient aliases for your common workflows:
# Add to ~/.bashrc or ~/.zshrc
# Always skip permissions when exploring
alias clauded-explore='claude-explore --skip-permissions'
# Explore with debug mode enabled
alias claude-debug='claude-explore --claude-args "--debug"'
# Explore without updating (faster for repeat visits)
alias claude-cached='claude-explore --no-update'
Usage:
# Use your alias
clauded-explore https://github.com/user/repo
# Expands to: claude-explore --skip-permissions https://github.com/user/repo
Custom Workspace Directory
Use a different base directory for workspaces:
# Use custom directory
claude-explore --workspace-dir /mnt/data/claude-workspaces https://github.com/user/repo
# All commands support this option
claude-explore list --workspace-dir /mnt/data/claude-workspaces
claude-explore clean --workspace-dir /mnt/data/claude-workspaces
Workflow Examples
Quick repository exploration:
# One-liner to explore a repo you found
claude-explore https://github.com/user/interesting-repo
# Claude opens, ask your questions
# Exit when done
# With your alias (always skip permissions)
clauded-explore https://github.com/user/interesting-repo
Regular cleanup routine:
# Weekly cleanup (cron job or manual)
claude-explore clean --days 14
Check disk usage:
# See how much space workspaces are using
claude-explore info
Comparison with Manual Workflow
Without claude-explore:
cd ~/temp
git clone https://github.com/user/repo
cd repo/src/core
claude
# Later: manually clean up ~/temp
With claude-explore:
claude-explore https://github.com/user/repo/tree/main/src/core
# Automatic cleanup after 7 days
Requirements
- Python 3.10+
- Git
- Claude Code (
claudecommand must be available)
Development
# Clone the repository
git clone https://github.com/user/claude-explore
cd claude-explore
# Install in development mode
uv tool install -e .
# Run tests
pytest tests/
License
MIT
Related Tools
- llmd - Generate LLM context from repositories
- cc-conversation-search - Search Claude Code conversations
Tips
- Workspaces are shallow clones (
--depth=1) to save disk space - The same repository always uses the same workspace (no duplicates)
- Subdirectory explorations share the parent repo's workspace
- Use
--no-updateif you're working with a specific commit/state - Set up a weekly cron job to run
claude-explore clean
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_explore-0.1.2.tar.gz.
File metadata
- Download URL: claude_explore-0.1.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc7a130701b15db0d8c557db875e2b3c0e4e7b43690e0af40b9c18b71df7465
|
|
| MD5 |
32532c58602dd7de43abf17655a0f706
|
|
| BLAKE2b-256 |
978485418086cc539346411c4426ed342c17bb2bee0b71f8f1caae0392f69b6c
|
Provenance
The following attestation bundles were made for claude_explore-0.1.2.tar.gz:
Publisher:
publish.yml on akatz-ai/claude-explore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_explore-0.1.2.tar.gz -
Subject digest:
5fc7a130701b15db0d8c557db875e2b3c0e4e7b43690e0af40b9c18b71df7465 - Sigstore transparency entry: 701719582
- Sigstore integration time:
-
Permalink:
akatz-ai/claude-explore@385d6bf0c2cc877ca61c2e5f6acece64a29e53c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/akatz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@385d6bf0c2cc877ca61c2e5f6acece64a29e53c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_explore-0.1.2-py3-none-any.whl.
File metadata
- Download URL: claude_explore-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a39cbe03cec56d3e86fdd979253929f3af2208232edf928b6c549e5baec795
|
|
| MD5 |
ad6eb31906e31f6c08abfdb45ac5aea9
|
|
| BLAKE2b-256 |
b7df6840fff1ebca3ee7c59eb631c4eba926f3457e47b73ea45ee2ee1e828ee4
|
Provenance
The following attestation bundles were made for claude_explore-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on akatz-ai/claude-explore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_explore-0.1.2-py3-none-any.whl -
Subject digest:
40a39cbe03cec56d3e86fdd979253929f3af2208232edf928b6c549e5baec795 - Sigstore transparency entry: 701719586
- Sigstore integration time:
-
Permalink:
akatz-ai/claude-explore@385d6bf0c2cc877ca61c2e5f6acece64a29e53c1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/akatz-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@385d6bf0c2cc877ca61c2e5f6acece64a29e53c1 -
Trigger Event:
push
-
Statement type: