create-github-repo-1
v3.0.0
Published
CLI to create a GitHub repo with folder, git init and push
Readme
create-github-repo-1
A CLI to bootstrap a GitHub repository from local folder creation to first push.
What it does
- Creates a local folder and initializes git on
main - Adds
README.md,.gitignore, and.github/workflows/publish.yml - Creates GitHub repo with
gh repo create - Defaults to private repo creation
- Pushes initial commit to
main - Runs
code . - Runs
github .(required)
Usage
create-github-repo-1 <repo-name> [--private|--public]Examples:
create-github-repo-1 my-new-repo
create-github-repo-1 my-public-repo --publicPrerequisites
gitinstalledgh(GitHub CLI) installed and authenticated (gh auth login)codecommand available from VS Codegithubcommand available
Auto publish on push to main
The generated workflow publishes to npm on every push to main if both conditions are true:
package.jsonexists in the repository- repository secret
NPM_TOKENis configured
Set the secret:
- Open repo settings on GitHub
- Go to Secrets and variables -> Actions
- Add secret
NPM_TOKEN
