@marcuwynu23/gitrepo
v1.0.1
Published
CLI tool to create GitHub repositories and optionally set remote origins
Downloads
3
Maintainers
Readme
gitrepo
A simple CLI tool to create GitHub repositories (in your personal account or organization) and automatically set them as a Git remote using SSH.
📦 Features
- Create repositories under your GitHub username or a specified organization.
- Choose visibility:
--privateor--public. - Add as Git remote automatically (
git remote add). - Initialize Git repo and checkout to a default or custom branch.
- Optionally skip adding Git remote with
--remote-only. - Create multiple repositories in one command.
Dependencies
Ensure the following tools are installed on your system:
- Git – Required for local git operations.
- GitHub CLI (gh) – Used to create repositories on GitHub.
- Node.js – To run the CLI tool.
- ts-node – Used if running the tool via TypeScript directly (CLI includes #!/usr/bin/env ts-node).
- Optional: javascript-obfuscator – Used in the npm run build script for obfuscation.
🚀 Installation
Clone this repo and run:
npm install
npm run buildOr install globally (if published):
npm install -g gitrepo🛠️ Usage
gitrepo [options] <repo1> <repo2> ...Options
| Flag | Description |
| ----------------- | --------------------------------------------------- |
| --org <org> | Specify GitHub organization to create the repo in |
| --private | Make repository private (default if neither is set) |
| --public | Make repository public |
| --remote <name> | Remote name (default: origin) |
| --remote-only | Skip local git init and just create GitHub repo |
| --branch <name> | Default branch name (default: main) |
📂 Example
# Create a private repo in your personal GitHub and set remote
gitrepo --private my-awesome-tool
# Create a public repo in your organization
gitrepo --org my-org --public new-ui-library
# Only create the remote repo, no local changes
gitrepo --remote-only --org my-org static-assets
# Create multiple repos in one go
gitrepo --public app-api app-web app-utils🧠 Notes
- GitHub CLI (
gh) is required. Make sure you're authenticated:gh auth login - SSH key must be configured in your GitHub account.
📄 License
MIT License
