Skip to content

gtapp1/repo-bootstrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repo-bootstrapper

Bootstrap a new private GitHub repository and a matching local Node.js project from the command line.

This project is currently suggested for Windows users. It was built as a fun side project :)) and should be treated as such.

Features

  • Creates a private GitHub repo using the GitHub API
  • Initializes a local folder with a Node.js .gitignore and README
  • Sets up git, creates the first commit, and pushes to main
  • Clear progress output with colored logs

Requirements

  • Node.js 18+ recommended
  • Git installed and available on your PATH
  • A GitHub personal access token with repo scope
  • Windows recommended for the default Desktop-based project path

Install

npm install

Setup

Create a .env file in the project root:

GITHUB_TOKEN=your_token_here

To create your token:

  1. Open GitHub and go to Settings.
  2. Open Developer settings, then Personal access tokens.
  3. Create a new token with repo access.
  4. Copy the token into your .env file as GITHUB_TOKEN.
  5. Keep it private and do not commit the .env file.

Usage

node index.js <repo-name>

Example:

node index.js my-new-repo

What It Does

  1. Creates a new private GitHub repo with the provided name
  2. Creates a local folder with the same name
  3. Adds a Node.js .gitignore and a basic README in your Desktop
  4. Initializes git, commits, sets main, and pushes to GitHub

Troubleshooting

  • Ensure your token is valid and has repo scope
  • If a local folder already exists and is not empty, the command will fail
  • If git is not installed, initialization will fail

License

MIT

About

Creates a private Github repo using github API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors