A simple Go-based CLI tool to bulk migrate GitHub repositories from one user or organization to another in a single command.
Part of the Marrow Stack ecosystem.
Transferring multiple GitHub repositories manually can be repetitive and slow, especially when moving projects between personal accounts and organizations.
marrow-migrate helps automate that process from the terminal so you can transfer many repositories in one workflow instead of handling each repository one by one.
- Bulk transfer repositories in a single command
- Reduce repetitive manual work in the GitHub UI
- Preview migrations safely with dry-run mode
- Use a lightweight compiled Go binary
- Run the tool across Linux, macOS, and Windows
- Migrate repositories from user to organization
- Migrate repositories from organization to organization
- Migrate repositories from user to user
- Transfer all repositories or only selected repositories
- Preview planned actions with
--dry-run - Use a GitHub token from an environment variable or CLI flag
go install github.com/Marrow-Stack/marrow-migrate@latestgit clone https://github.com/Marrow-Stack/marrow-migrate.git
cd marrow-migrate
go build -o marrow-migrate main.go
sudo mv marrow-migrate /usr/local/bin/Before running the tool, make sure you have:
- Go 1.21 or later if installing from source
- A GitHub Personal Access Token
- Permission to transfer repositories from the source account
- Permission to create or receive repositories in the target account or organization
marrow-migrate requires a GitHub Personal Access Token.
Recommended scopes:
repo— full control of private repositoriesadmin:org— required for organization transfers
Recommended setup:
export GITHUB_TOKEN=ghp_your_actual_token_hereYou can also provide the token directly with the --token flag.
marrow-migrate --source-org old-org --target-org new-orgmarrow-migrate --source-user samarth --target-org marrow-stackmarrow-migrate --source-org old-org --target-org new-org --dry-runmarrow-migrate --source-org old-org --target-org new-org --repos repo1,repo2,api-service| Flag | Description |
|---|---|
--source-org |
Source GitHub organization |
--source-user |
Source GitHub username |
--target-org |
Target GitHub organization |
--target-user |
Target GitHub username |
--repos |
Comma-separated list of specific repository names |
--dry-run |
Preview the migration without executing it |
--token |
GitHub token, optional if GITHUB_TOKEN is set |
- Provide either
--source-orgor--source-user - Provide either
--target-orgor--target-user - Use
--reposwhen only specific repositories should be transferred - Use
--dry-runfirst if you want to validate the operation before execution
marrow-migrate \
--source-org old-org \
--target-org new-orgmarrow-migrate \
--source-user samarth \
--target-org marrow-stack \
--dry-runmarrow-migrate \
--source-user old-user \
--target-user new-user \
--repos repo1,repo2marrow-migrate is in early development and is being built as part of the Marrow Stack proof-of-work journey.
- Improve error handling and logging
- Add progress indicators
- Support migrating releases and tags
- Add interactive mode
- Expand documentation and usage examples
This project is licensed under the MIT License. See the LICENSE file for details.
Built by Samarth.
Solo builder of Marrow Stack — production-ready Next.js + Supabase code blocks.