The Clone Home CLI provides powerful command-line tools for organizing your local repositories by cloning and managing your GitHub repositories locally. Clone Home only reads from GitHub via API - it never modifies anything on GitHub itself.
| Command | Description | Options |
|---|---|---|
setup |
Initial configuration | None |
clone |
Clone all repositories | --dry-run, --force, --filter <pattern> |
list |
List repositories | --filter <pattern> |
status |
Show local repository status | None |
organize |
Interactive repository organization | None |
web |
Start web interface | None |
Configure Clone Home with your GitHub credentials and preferences:
npm start setup
# or if globally installed:
clone-home setupThis will prompt you for:
- GitHub Personal Access Token: Your GitHub API token
- Target Directory: Where repositories will be cloned
- Include Organizations: Whether to include org repositories
- Include Forks: Whether to include forked repositories
Configuration is stored in ~/.clone-home/config.json
Clone all your GitHub repositories:
npm start clone
# or: clone-home cloneSee what would be cloned without actually cloning:
npm start clone -- --dry-run
# or: clone-home clone --dry-runFilter repositories during cloning:
# Only clone repositories matching a pattern
npm start clone -- --filter "my-project"
# Clone repositories from specific owner
npm start clone -- --filter "mycompany/"
# Force overwrite existing directories
npm start clone -- --force
# Combine options
npm start clone -- --filter "react" --dry-runView all your repositories without cloning:
npm start list
# or: clone-home list
# With filter
npm start list -- --filter "react"See which repositories are already cloned locally:
npm start status
# or: clone-home statusLaunch the interactive organization interface:
npm start organize
# or: clone-home organizeThis opens an interactive interface where you can:
- Browse repositories with pagination and filtering
- Create directory tree rules based on language, owner, patterns, etc.
- Auto-organize repositories by various criteria
- Set custom paths for specific repositories
- Export repository lists in multiple formats
- View repository statistics and analytics
By default, repositories are organized in the following structure:
repositories/
├── your-username/
│ ├── repo1/
│ └── repo2/
├── organization-name/
│ ├── org-repo1/
│ └── org-repo2/
└── another-user/
└── forked-repo/
You can create custom directory structures using two methods:
Create rules that automatically organize repositories based on criteria:
{
"rules": [
{
"type": "language",
"value": "JavaScript",
"directory": "languages/javascript"
},
{
"type": "language",
"value": "Python",
"directory": "languages/python"
},
{
"type": "owner",
"value": "mycompany",
"directory": "work/company-projects"
}
]
}Manually specify where each repository should go:
{
"work/current-projects": [
"mycompany/main-app",
"mycompany/api-service"
],
"personal/side-projects": [
"username/portfolio-site",
"username/weekend-hack"
],
"experiments": [
"username/ml-experiment",
"username/new-framework-test"
]
}Both configuration files are created and managed through the interactive organize command.
The --filter option supports various patterns:
# Match repository names containing "api"
clone-home clone --filter "api"
# Match repositories from specific owner
clone-home clone --filter "mycompany/"
# Match repositories with specific language (requires organize command setup)
clone-home clone --filter "javascript"
# Match multiple patterns (separate with spaces)
clone-home clone --filter "api frontend"Use --force to overwrite existing repositories:
# Careful! This will overwrite existing repositories
clone-home clone --force
# Combine with dry-run to see what would be overwritten
clone-home clone --force --dry-runThe organize command provides an interactive interface with the following capabilities:
- 📋 Browse and categorize repositories: Page through your repositories with filtering options
- 🌳 Create directory tree configuration: Set up rules for automatic organization
- 📁 Auto-organize by language/topic: Automatically categorize repositories
- 💾 Save current organization: Export your organization preferences
- 📤 Export repository list: Generate reports in multiple formats (JSON, CSV, Markdown, Text)
Configuration is stored in ~/.clone-home/config.json:
{
"token": "ghp_xxxxxxxxxxxxxxxxxxxx",
"targetDir": "/Users/username/repositories",
"includeOrgs": true,
"includeForks": false
}You can also configure Clone Home using environment variables in a .env file:
# GitHub Personal Access Token
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
# Target directory for cloned repositories
TARGET_DIR=~/repositories
# Include organization repositories (true/false)
INCLUDE_ORGS=true
# Include forked repositories (true/false)
INCLUDE_FORKS=false# 1. Configure Clone Home
clone-home setup
# 2. Preview what will be cloned
clone-home clone --dry-run
# 3. Clone everything
clone-home clone
# 4. Check status
clone-home status# Only clone work-related repositories
clone-home clone --filter "mycompany/"
# Only clone JavaScript projects
clone-home organize # Set up language-based organization first
clone-home clone --filter "javascript"
# Clone specific projects
clone-home clone --filter "important-project"# List all repositories
clone-home list
# List filtered repositories
clone-home list --filter "react"
# Check what's already cloned
clone-home status
# Organize repositories interactively
clone-home organize- Main README - Project overview and quick start
- Web Interface Guide - Visual drag-and-drop interface
- Usage Examples - Comprehensive examples and workflows
- Troubleshooting - Common issues and solutions
- Development Guide - Contributing and development setup