Git pull all repository of directory tree from specified directory.
npm install git-puller

A modern, beautiful CLI tool to pull all git repositories in a directory tree with smart branch detection and colorful output.
main โ master โ current branchInstall the command line interface globally:
``sh`
npm install -g git-puller
Or use with npx:
`sh`
npx git-puller -d ./
`shPull all repos in current directory (auto-detects branch)
git-puller -d ./
๐ Usage
`sh
Usage: git-puller [options]๐ Pull all git repositories in a directory tree with smart branch detection
Options:
-V, --version output the version number
-d, --directory Target directory (required)
-r, --remote Git remote (default: "origin")
-b, --branch Git branch (auto | main | master | custom) (default: "auto")
-h, --help display help for command
`$3
When using the default
"auto" mode, git-puller will:
1. โ
Check for main branch first
2. โ
Fall back to master if main doesn't exist
3. โ
Use current branch if neither exists$3
#### Basic Usage
`sh
Pull all repos in current directory
git-puller -d ./Pull all repos in a projects folder
git-puller -d ~/projectsUsing the short alias
gplr -d ./
`#### Advanced Usage
`sh
Force a specific branch across all repos
git-puller -d ./ -b mainUse a different remote
git-puller -d ./ -r upstreamCombine options
gplr -d ~/work -r origin -b develop
`$3
`
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Git Puller - Pulling Repositories โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Remote: origin โข Branch: auto-detect
โ Found 5 directories to check
โ /path/to/repo1
Updated: 3 changes
Files changed: 2 files
โ /path/to/repo2
Already up to date
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ Status โ Count โ Percentage โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโค
โ โ Successful โ 1 โ 20.0% โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโค
โ โ Up to date โ 4 โ 80.0% โ
โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโโโโโโโค
โ โ Failed โ 0 โ 0.0% โ
โโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโ
All repositories processed successfully!
`๐ก Why git-puller?
$3
Managing multiple git repositories across different directories is tedious:
- Different repos use different default branches (main vs master)
- Manually pulling each repository is time-consuming
- No visibility into which repos were updated
- Error-prone when managing dozens of projects$3
git-puller solves this by:
- โ
Auto-detecting the correct branch for each repository
- โ
Pulling all repos in parallel for speed
- โ
Beautiful output showing exactly what happened
- โ
Summary statistics for quick overview
- โ
Error handling that doesn't stop on single failuresPerfect for:
- ๐จโ๐ป Developers managing multiple projects
- ๐ Keeping workspace repositories in sync
- ๐ข Teams with many microservices
- ๐ Students with multiple course repositories
๐ ๏ธ Development
`sh
Install dependencies
npm installBuild the project
npm run buildRun in development mode
npm run devRun tests
npm testRun tests with UI
npm run test:uiRun tests with coverage
npm run test:coverageLint code
npm run lintFormat code
npm run formatCheck formatting
npm run format:check
`$3
`
git-puller/
โโโ src/
โ โโโ index.ts # Main CLI entry point
โ โโโ ui.ts # Modern UI components
โ โโโ utils.ts # Directory utilities
โ โโโ utils.test.ts # Unit tests
โโโ dist/ # Compiled JavaScript
โโโ package.json
`๐ Requirements
- Node.js >= 18.0.0
- Git installed and accessible from command line
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
1. Fork the repository
2. Create your feature branch (
git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add some amazing feature')
4. Push to the branch (git push origin feature/amazing-feature`)Provided under the terms of the MIT license.
Built with:
- simple-git - Git command wrapper
- commander - Command-line interface
- chalk - Terminal styling
- ora - Elegant terminal spinners
- cli-table3 - Beautiful tables
---
Made with โค๏ธ for developers who manage multiple repositories