GHFS - GitHub Filesystem
Lazily read any public repo at /mnt/github/<owner>/<repo>/. It's a FUSE filesystem that caches and lazily downloads GitHub repos to your machine. This means that you can use normal unix commands (e.g. rg, find, grep, cat), and normal tools to read files.
Quick Start
bash
# Read any file cat /mnt/github/tokio-rs/tokio/src/runtime/mod.rs # Search across a repo rg "async fn spawn" /mnt/github/tokio-rs/tokio/ # Explore structure ls /mnt/github/vercel/next.js/packages/ # download a skill file cat /mnt/github/rgodha24/ghfs/skills/ghfs/SKILL.md
How It Works
- •First access triggers shallow clone (~seconds)
- •Subsequent reads use cache (instant)
- •file reads from ghfs are guaranteed to be at MOST 24h old.
- •Auto-refresh: 24h normal, 1h for watched repos
- •Atomic updates—readers never see partial state
keep in mind:
it's readonly. no writes/commits/etc.
it is a checked out worktree, often of a --depth=1 clone. this means that git log will not work as you expect in most cases.
patterns
- •Spawn an
exploresubagent to look at multiple different libraries, and find API signatures, docs, etc. if you run into edge cases. - •Look at repos mentioned by the user for inspiration/examples/useful files.
CLI Commands for extra control
| Command | Purpose |
|---|---|
ghfs list | Shows downloaded repos |
ghfs sync owner/repo | Force refresh of a repo |
ghfs watch owner/repo | refresh every 1h |