ForkMe Quick Reference Card¶
🚀 Command Format¶
📋 Forking Strategies Cheat Sheet¶
| Strategy | Use Case | Command |
|---|---|---|
| full | Complete development | --strategy full |
| shallow | Quick review/testing | --strategy shallow --depth 1 |
| sparse | Specific directories | --strategy sparse --sparse-paths "src/,docs/" |
| toplevel | Root files only | --strategy toplevel |
| structure | Directory tree | --strategy structure |
| filetype | Specific file types | --strategy filetype --file-types "py,js" |
| analysis | Fast audit/review | --strategy analysis |
| mirror | Backup/archival | --strategy mirror |
| bundle | Offline/portable | --strategy bundle |
| metadata | Info only (no clone) | --strategy metadata or --analyze-only |
⚡ Common Commands¶
Quick Review¶
Documentation Only¶
Security Audit¶
No Fork (Clone Only)¶
Dry Run (Preview)¶
Get Repository Info¶
🎯 Use Case Matrix¶
| Need | Strategy | Options |
|---|---|---|
| Quick code review | shallow |
--depth 1 |
| Docs extraction | filetype |
--file-types "md,txt,rst" |
| Config audit | sparse |
--sparse-paths "*.yml,*.json" |
| Structure overview | structure |
--analyze |
| Full development | full |
(default) |
| Offline work | bundle |
- |
| Project info | metadata |
--analyze-only |
🔧 Essential Options¶
--strategy <type> # Forking strategy
--depth <n> # Commit depth (shallow)
--branch <name> # Specific branch
--no-fork # Skip GitHub fork
--target <dir> # Target directory
--work-dir <dir> # Working directory
--file-types <ext> # File extensions (comma-separated)
--sparse-paths <paths> # Sparse checkout paths
--analyze-only # Metadata only
--dry-run # Preview mode
--verbose # Debug output
--help # Show help
💡 Pro Tips¶
-
Always start with metadata:
-
Use dry run for complex operations:
-
Combine strategies for efficiency:
-
Security-first approach:
📊 File Type Shortcuts¶
| Use Case | File Types |
|---|---|
| Documentation | md,txt,rst,adoc |
| Python | py,pyx,pyi |
| JavaScript | js,jsx,ts,tsx |
| Web | html,css,js |
| Config | yml,yaml,json,toml,ini |
| Infrastructure | tf,hcl,dockerfile,yml |
| Scripts | sh,bash,zsh,py,rb |
🐛 Quick Troubleshooting¶
| Issue | Solution |
|---|---|
| Auth failed | gh auth login |
| Missing deps | brew install git gh jq (macOS) |
| Permission denied | Use HTTPS URL |
| Slow clone | Use --strategy shallow --depth 1 |
| Sparse paths fail | Check path format (no leading /) |
| Target exists | Remove it or use --target option |
📖 Repository URL Formats¶
# Full URL
./forkme.sh https://github.com/owner/repo
# SSH URL
./forkme.sh git@github.com:owner/repo.git
# Short form
./forkme.sh owner/repo
🔍 Common Workflows¶
Security Review Workflow¶
# Step 1: Get metadata
./forkme.sh --analyze-only vendor/library
# Step 2: Review configs
./forkme.sh --strategy sparse --sparse-paths "*.yml,*.json,Dockerfile" --no-fork vendor/library
# Step 3: Review source
./forkme.sh --strategy sparse --sparse-paths "src/,lib/" vendor/library
Contribution Workflow¶
# Step 1: Check project
./forkme.sh --analyze-only owner/project
# Step 2: Get structure
./forkme.sh --strategy structure owner/project
# Step 3: Fork and clone
./forkme.sh --strategy full owner/project
Documentation Extraction¶
# Get all docs
./forkme.sh --strategy filetype --file-types "md,txt,rst" --no-fork owner/repo
# Get specific docs
./forkme.sh --strategy sparse --sparse-paths "docs/,README.md" --no-fork owner/repo
For complete documentation, see FORKME.md