1.0.5 • Published 6 months ago
gh-init v1.0.5
gh-init
gh-init
is an npm package that automatically creates a GitHub repository and links it with the project in the current directory. This tool is designed to streamline the process of initializing a GitHub repository.
Key Features
- Checks if you are authenticated with GitHub.
- Automatically creates a GitHub repository with the name of the current directory.
- Initializes a local Git repository if one doesn’t exist.
- Sets the remote origin to the newly created GitHub repository.
- Makes an initial commit and pushes the code.
Installation
This package does not require permanent installation. You can run it directly using npx
:
npx gh-init
How to Use
- Navigate to the project directory you want to link to a GitHub repository.
Run the following command:
npx gh-init
Follow the on-screen messages to complete the process.
Requirements
- Node.js installed on your machine.
- Git installed and configured.
GitHub CLI (
gh
) installed and authenticated. You can verify authentication with the command:gh auth status
If you’re not authenticated, run:
gh auth login
Important Notes
- Ensure that the project directory is either empty or contains the project you want to version.
- The name of the GitHub repository created will match the directory name.