@emanuelsan/git-initializer
v1.0.2
Published
CLI tool to initialize a local Git repository and create a corresponding GitHub repository with one command.
Downloads
7
Maintainers
Readme
GitHub Repo Initializer CLI
A Node.js CLI tool to automate initializing a local Git repository, configuring author identity, creating a corresponding GitHub repository, and pushing your code—all from the terminal.
Prerequisites
- Node.js v18+
- Git installed and in your PATH
- GitHub CLI (
gh) installed and authenticated
Installation
You can use this tool directly via pnpm dlx (recommended for one-off use):
pnpm dlx @emanuelsan/create-gh-repoOr install globally:
pnpm add -g @emanuelsan/create-gh-repoUsage
From any local project folder:
git-initializerExample session:
? What should the repo be named? » my-new-project
? Visibility: ◉ private ○ public
? Description (optional): » CLI tool to create GitHub repos
...
✅ Git identity found: Emanuel Sandu <[email protected]>
🔧 Initializing Git...
📦 Staging and committing files...
🚀 Creating and pushing GitHub repository...
✅ Done! Repository 'my-new-project' pushed to GitHub.Features
- Checks for Git and GitHub CLI (
gh) - Prompts for repo name, visibility, and description (using Clack)
- Checks/validates global Git identity (
user.nameanduser.email) - Initializes Git if missing, stages and commits all files
- Creates a GitHub repo and pushes code in one step
- Clear error handling and terminal output
License
MIT License
