A powerful command-line tool for efficiently syncing all repositories from a GitLab group or user account with parallel processing, real-time status updates, and advanced features.
Rust port of gh-pull-all, adapted for GitLab (glab CLI).
- Clone & Sync: Clones new repositories and pulls updates to existing ones
- Group & User Support: Works with both GitLab groups and individual user accounts
- Parallel Processing: Configurable thread count (default 8) for concurrent operations
- SSH Support: Option to use SSH URLs instead of HTTPS
- Private Repository Access: Auto-detects glab CLI auth, supports GITLAB_TOKEN env var and --token flag
- Delete Mode: Safely deletes cloned repositories with uncommitted changes protection
- Smart Branch Management:
--pull-from-default: Merges default branch into current branch when behind--switch-to-default: Switches all repos to default branch
- Real-time Status Display: Live in-place updates with color-coded progress bar
- Error Tracking: Numbered error tracking with detailed error list at completion
- Custom GitLab URL: Supports self-hosted GitLab instances via
--gitlab-url
# Install from crates.io
cargo install glab-pull-all
# Or build from source
git clone https://github.com/link-foundation/glab-pull-all.git
cd glab-pull-all
cargo install --path .# Sync all repositories from a GitLab group
glab-pull-all --group my-group
# Sync all repositories from a GitLab user
glab-pull-all --user my-username
# Use SSH for cloning into a specific directory
glab-pull-all --group my-group --ssh --dir ./repos
# Use 16 concurrent operations
glab-pull-all --user my-username --threads 16
# Run operations sequentially
glab-pull-all --user my-username --single-thread
# Disable live updates for CI/terminal history
glab-pull-all --group my-group --no-live-updates
# Delete all cloned repositories (with confirmation)
glab-pull-all --user my-username --delete
# Pull from default branch into current branch when behind
glab-pull-all --group my-group --pull-from-default
# Switch all repositories to their default branch
glab-pull-all --group my-group --switch-to-default
# Use a self-hosted GitLab instance
glab-pull-all --group my-group --gitlab-url https://gitlab.example.com| Option | Short | Description | Default |
|---|---|---|---|
--group <name> |
-g |
GitLab group (organization) name | - |
--user <name> |
-u |
GitLab username | - |
--token <token> |
-t |
GitLab personal access token | GITLAB_TOKEN env |
--ssh |
-s |
Use SSH URLs for cloning | false |
--dir <path> |
-d |
Target directory for repositories | . (current) |
--threads <n> |
-j |
Number of concurrent operations | 8 |
--single-thread |
Run operations sequentially | false |
|
--no-live-updates |
Disable live in-place status updates | false |
|
--delete |
Delete all cloned repositories | false |
|
--pull-from-default |
Pull default branch into current branch | false |
|
--switch-to-default |
Switch repos to default branch | false |
|
--gitlab-url <url> |
GitLab instance URL | https://gitlab.com |
|
--help |
-h |
Show help | - |
--version |
-V |
Show version | - |
Validation Rules:
- Must specify either
--groupor--user(not both) - Cannot specify both
--single-threadand--threads - Cannot specify both
--pull-from-defaultand--switch-to-default - Thread count must be >= 1
Authentication is resolved in the following priority order:
- glab CLI: If
glabis installed and authenticated, the token is used automatically - Environment variable:
GITLAB_TOKENenvironment variable - CLI flag:
--token <token>argument - Public access: Works without authentication for public repositories
| Icon | Status | Description |
|---|---|---|
| ⏳ | pending | Repository queued for processing |
| 📦 | cloning | Currently being cloned |
| 📥 | pulling | Currently being pulled |
| 🔍 | checking | Checking repository status |
| 🗑️ | deleting | Being deleted |
| ✅ | success | Operation completed successfully |
| ❌ | failed | Operation failed |
| skipped | Skipped (private without token, not a git repo) | |
| 🔄 | uncommitted | Has uncommitted changes (auto-skipped) |
The progress bar shows real-time operation status:
[████████████░░░░░░░░] 12/20 (60%)
Color coding:
- 🟩 Green = success
- 🟥 Red = failed
- 🟨 Yellow = skipped
- 🟦 Cyan = in progress
- ⬜ Gray = pending
- Rust: 1.70+ (for building from source)
- Git: Installed and configured
- glab CLI (optional): For enhanced authentication and private repo access
- SSH keys (optional): For SSH cloning
# Build
cargo build
# Run tests
cargo test
# Run with verbose output
cargo test --verbose
# Format code
cargo fmt
# Run clippy lints
cargo clippy --all-targets --all-features
# Run the example
cargo run --example basic_usage.
├── .github/workflows/ # CI/CD pipeline
├── changelog.d/ # Changelog fragments
├── examples/ # Usage examples
├── scripts/ # Build/release scripts
├── src/
│ ├── cli.rs # CLI argument parsing (clap)
│ ├── display.rs # Status display, progress bar, colors
│ ├── git_ops.rs # Git operations (clone, pull, delete, etc.)
│ ├── gitlab.rs # GitLab API and glab CLI integration
│ ├── lib.rs # Library entry point
│ ├── main.rs # Binary entry point
│ └── runner.rs # Parallel/sequential orchestration
├── tests/
│ └── integration_test.rs
├── Cargo.toml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
└── README.md
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Unlicense - Public Domain
Rust port of gh-pull-all by Link Foundation.