git0
v0.3.58
Published
CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.
Maintainers
Readme
🤖 Agent skill — npx skills@latest add https://github.com/OpenSourceAGI/dev-tools-starter-agent --skill git0 (what it covers)
Step 0: Download Git Repo
CLI tool to search GitHub repositories, download source & releases for your system, and instantly set up, then install dependencies and open code editor.
🚀 Installation
npm install -g git0bun install -g git0

✨ Features
- Search GitHub repositories by name with fuzzy matching
- Download repositories directly from GitHub URLs or owner/repo shortcuts. Skip the manual git clone, cd, install dance
- Get Releases instantly download latest release for your system or all systems
- Automatic dependency installation and installation for multiple project types
- Smart IDE integration - automatically opens projects in your preferred editor
- Cross-platform support - works on Windows, macOS, and Linux
- Conflict resolution - handles directory naming conflicts automatically
- Partial paths - paste a
/tree/or/blob/link and download just that folder or file - Optional
.githistory ---historyattaches the full history after the source is already on disk - Faster than git - skips
.githistory and uncompresses while downloading
🎯 Usage
# Direct download from GitHub URL
## g and git0 both work
g https://github.com/facebook/react
# Search for repositories by name
g react starter
# Download using owner/repo shorthand
git0 facebook/react
# Use git0 without installing, (only node needed)
# (copy this line into your project's readme to help others setup)
npx git0 facebook/react
# Download only one folder — paste the GitHub link as you copied it
g https://github.com/facebook/react/tree/main/packages/react-dom
# ...or one file
g https://github.com/debate/debate-ai.com/blob/master/.continue/agents/new-config.yaml
# Same thing, without a URL
git0 facebook/react/packages/react-dom
git0 facebook/react --path=packages/react-dom
# A specific branch, tag or commit
git0 facebook/react --branch=v18.2.0
# With the full .git history attached after the download
git0 facebook/react --history
# History only — no working files at all
git0 facebook/react --history-onlyOptions
| Flag | What it does |
| --- | --- |
| --path=<path> | Download only that folder or file of the repository |
| --branch=<ref> | Download a branch, tag or commit instead of the default branch |
| --history | Also fetch the full .git history, in the background |
| --history-only | Clone only the history — no working files |
| --mirror | Keep every ref (notes, remote-tracking) when cloning history |
📁 Partial Paths
Copy a link out of the GitHub UI and git0 downloads exactly what the link points at, not the repository around it:
g https://github.com/facebook/react/tree/main/packages/react-dom
# → ./react-dom/ — the contents of that folder, at the rootThe branch and the path are both read off the URL. Entries outside the path are
discarded as the tarball streams, so they are never written to disk, and what is
kept is lifted to the root of the target folder — you get react-dom/, not
react/packages/react-dom/.
The folder is named after the path rather than the repository, because that is
what you asked for. A /blob/ link to a single file downloads that one file into
its enclosing folder's name. Pass a second argument, or --path with any repo
reference, if you'd rather name it yourself:
git0 facebook/react --path=packages/react-dom my-copy🕐 Downloading With .git History
By default git0 downloads a tarball — the source at one commit, no history. That
is what makes it quick. When you do want the history, --history gets you both
without giving up the speed:
git0 facebook/react --historyThe source tarball lands first. The history is fetched after the archive has
finished unzipping, in the background, while the IDE opens and dependencies
install. You end up in exactly the state git clone would have left you in — a
working tree with a full .git beside it, git log and git blame working,
git status clean — except you started working several seconds earlier.
Why the lazy order is faster. git clone is one serial operation: the remote
counts and packs every object in the project's history, sends the pack, and only
then writes files you can run. Nothing can start until all of it finishes. A
GitHub tarball is a pre-made, cached, already-compressed snapshot of one commit,
so git0 pipes it straight into a tar extractor — files are being written while
the rest is still downloading. And history is the one part of a clone that
nothing on the critical path is waiting for: bun install does not need git
log. So it is fetched last, overlapping the install rather than blocking it.
There is a benchmark for this in benchmark/ — it measures
time until the project can run, separately from time until history is
available, for git clone, git clone --depth=1, git0, and git0 --history:
bun run bench facebook/reactHistory Only
To take the history and none of the working files — for a backup, a mirror, or to move a repository between hosts:
git0 facebook/react --history-only
# → ./react.git/ — HEAD, config, objects/, refs/, packed-refsThat directory holds what normally lives inside .git, placed at its root: all
the commits, branches and tags, no editable files. Read it without checking
anything out, or restore a normal working copy from it:
git --git-dir=react.git log --all --oneline
git clone react.git react--history-only uses a bare clone (branches and tags). Add --mirror for every
ref Git can fetch — notes, remote-tracking refs and the rest — which is what you
want when the point is a complete backup:
git0 facebook/react --history-only --mirrorSupported Project Types
git0 automatically detects and sets up the following project types:
| Project Type | Detection | Installation |
| ----------------- | -------------------------------------- | --------------------------------------------- |
| Node.js | package.json | bun install (fallback to npm install) |
| Docker | Dockerfile, docker-compose.yml | docker-compose up -d or docker build |
| Python | requirements.txt, setup.py | Virtual environment + pip install |
| Rust | Cargo.toml | cargo build |
| Go | go.mod | go mod tidy |
Supported IDEs
git0 automatically detects and opens projects in your preferred IDE:
- Antigravity
- Cursor
- Windsurf
- VS Code
- VSCode Server WebUI
- Neovim
- Webstorm
🔧 Configuration
What Happens After Download
- Repository is downloaded to your current directory — only the requested path, if you named one
- Project type is detected automatically
- Dependencies are installed based on project type
- IDE is launched automatically (if available)
- Development server starts (for Node.js projects)
.githistory is attached in the background, if you passed--history
If a directory with the same name exists, git0 automatically appends a number (e.g., react-2, react-3).
GitHub Token (Optional)
For higher API rate limits, set your GitHub token:
export GITHUB_TOKEN=your_github_token_hereWithout a token, you're limited to 60 requests per hour. With a token, you get 5,000 requests per hour.
Please star this repo for updates! 🌟
