Clone, configure, and set up repositories in seconds with intelligent project detection.
Quick Start
·
Features
·
Configuration
·
Report Bug
GITD is a CLI tool that streamlines the process of cloning and setting up Git repositories. Instead of manually running git clone, installing dependencies, and configuring your environment, GITD does it all in one command.
# Traditional workflow
git clone https://github.com/user/project.git
cd project
npm install # or yarn, pnpm, cargo, pip...
cp .env.example .env
# ... more setup steps
# With GITD
gitd -s https://github.com/user/project
# Done! Dependencies installed, environment configured.bash -c "$(curl -fsSL https://raw.githubusercontent.com/Obed0101/gitd/main/install.sh)"The installer will:
- Detect your shell (Bash/Zsh)
- Configure your preferred package managers
- Set up the base directory for cloned repos
# Clone a repository
gitd https://github.com/user/repo
# Clone and auto-setup (install dependencies)
gitd -s https://github.com/user/repo
# Clone a specific branch
gitd -b develop https://github.com/user/repo
# Clone, setup, and specify branch
gitd -s -b main https://github.com/user/repoGITD automatically detects your project type and uses the appropriate package manager:
| Language | Detected Files | Package Managers |
|---|---|---|
| JavaScript/TypeScript | package.json, lockfiles |
bun, pnpm, yarn, npm |
| Rust | Cargo.toml |
cargo |
| Go | go.mod |
go |
| Python | pyproject.toml, requirements.txt |
uv, poetry, pipenv, pip |
| Ruby | Gemfile |
bundler |
| Java | pom.xml, build.gradle |
maven, gradle |
| PHP | composer.json |
composer |
| Elixir | mix.exs |
mix |
| .NET | *.csproj, *.fsproj |
dotnet |
| Zig | build.zig |
zig |
| Swift | Package.swift |
swift |
| Haskell | stack.yaml, *.cabal |
stack, cabal |
| C/C++ | CMakeLists.txt, Makefile |
cmake, make |
GITD respects your lockfiles to ensure reproducible builds:
bun.lockb → Uses Bun
pnpm-lock.yaml → Uses pnpm
yarn.lock → Uses Yarn
package-lock.json → Uses npm
- Confirmation prompts before operations
- Repository size display before cloning
- Colored output for better readability
- Loading spinners for long operations
If a required tool isn't installed, GITD offers to install it:
⚠ Bun is not installed. Install it? [Y/n]
GITD stores user preferences in ~/.gitd/config.json:
{
"version": "2.0.0",
"repos": {
"baseDir": "~/Repos",
"removeGitDir": true
},
"packageManagers": {
"javascript": "bun",
"python": "uv",
"rust": "cargo"
},
"setup": {
"autoInstallDeps": true,
"confirmBeforeInstall": true
}
}Projects can include a .gitdrc file for custom setup:
{
"version": "1.0",
"detection": {
"language": "javascript",
"tool": "pnpm"
},
"hooks": {
"post-clone": {
"commands": ["cp .env.example .env"]
},
"post-setup": {
"commands": ["npm run build", "npm test"]
}
},
"env": {
"required": ["DATABASE_URL"],
"defaults": {
"NODE_ENV": "development"
}
},
"workflows": {
"dev": {
"description": "Start development server",
"steps": ["pnpm dev"]
}
}
}See .gitdrc Configuration Guide for full documentation.
gitd [options] <repository_url>| Option | Description |
|---|---|
-h, --help |
Show help message |
-v, --version |
Display version |
-s, --setup |
Run setup after cloning (install dependencies) |
-b, --branch <name> |
Clone a specific branch |
# Basic clone
gitd https://github.com/facebook/react
# Clone and setup a Next.js project
gitd -s https://github.com/vercel/next.js
# Clone a specific branch with setup
gitd -s -b canary https://github.com/vercel/next.js
# Clone a Rust project
gitd -s https://github.com/rust-lang/rustBy default, repositories are cloned to ~/Repos. Change this in the installer or edit ~/.gitd/config.json:
{
"repos": {
"baseDir": "~/Projects"
}
}# Using the installer
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Obed0101/gitd/main/install.sh)" -- --upgrade
# Or if already installed
cd ~/.gitd && git pullbash ~/.gitd/uninstall.sh- Multi-language project detection (22+ languages)
- Package manager preferences
- Interactive installer with rollback
- Bash and Zsh support
- Automatic tool installation
- Per-repository configuration (
.gitdrc) - Lifecycle hooks (post-clone, pre-setup, post-setup)
- Environment variable prompts
- Named workflows
- Editor integration
- Fish shell support
- Organize repos by owner (
~/Repos/owner/repo) - GitHub Actions integration
- VS Code extension
-
gitd updatecommand
- Plugin system
- Template repositories
- Team/organization configurations
- CI/CD integration
- Web dashboard
GITD includes multiple security layers when executing repository configurations:
- Command Blacklist: Blocks dangerous commands (
rm -rf /, fork bombs, etc.) - Sudo Protection: Blocks sudo by default
- User Confirmation: Prompts before executing hooks
- Timeout Protection: Prevents infinite loops
- Error Handling: Fails safely on errors
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
# Clone the repository
git clone https://github.com/Obed0101/gitd.git
cd gitd
# Run tests
./tests/gitd.bats
# Test changes locally
source src/bash/gitd.bash
gitd -s https://github.com/your-test-repo- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Shell: Bash 4.0+ or Zsh 5.0+
- Git: For cloning repositories
- GitHub CLI (
gh): For repository metadata - jq (optional): For advanced JSON parsing
Distributed under the Apache License 2.0. See LICENSE for more information.
Made with determination in Mexico
Star this repo if you find it useful!