@emanuelsan/git-initializer

1.0.2 • Public • Published

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

Installation

You can use this tool directly via pnpm dlx (recommended for one-off use):

pnpm dlx @emanuelsan/create-gh-repo

Or install globally:

pnpm add -g @emanuelsan/create-gh-repo

Usage

From any local project folder:

git-initializer

Example 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 <emanuel@example.com>
🔧 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.name and user.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

Package Sidebar

Install

npm i @emanuelsan/git-initializer

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

26.2 kB

Total Files

6

Last publish

Collaborators

  • emanuelsan