npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

create-github

v1.0.10

Published

a command-line tool to quickly initialize a Git repository and push it to GitHub

Readme

create-github

License

create-github is a command-line tool to quickly initialize a Git repository and push it to GitHub. With simple interactive prompts, you can complete all steps from initializing the Git repository to pushing your code.

Features

  • Automatically generates a .gitignore file (if it doesn't exist).
  • Supports interactive initialization of a Git repository (git init).
  • Supports interactively adding files to the staging area (git add .).
  • Supports interactively committing code (git commit).
  • Supports setting up a remote repository address (git remote add origin).
  • Supports pushing code to a specified branch (git push -u origin <branch>).
  • Provides friendly command-line prompts and error handling.
  • Cross-platform support: Automatically detects the operating system and generates appropriate Git commands for Windows (PowerShell) and Unix/Linux systems.

Installation and Usage

Option 1: Run Directly with npm init

You can use the following command to initialize a GitHub repository directly:

npm init github

This command will prompt you through the steps to initialize a Git repository and push it to GitHub.

Option 2: Run Directly with npm create

Alternatively, you can use the shorter npm create syntax:

npm create github

This command works similarly to npm init github and provides the same functionality.

Example

$ npm create github
Welcome to create-github - Quickly initialize a Git repository and push to GitHub

.gitignore file created successfully
Execute git init? (default: y): y
git init executed successfully
Execute git add .? (default: y): y
git add . executed successfully
Enter commit message (default: Initial commit): First commit
git commit executed successfully
Enter GitHub repository URL: https://github.com/your-repo.git
Enter branch name (default: main): main
git remote added successfully
Execute git push to main branch? (default: y): y
git push to main branch successful

Operation completed!

Cross-Platform Support

The tool automatically detects the operating system and generates appropriate Git commands:

  • Windows: Uses PowerShell commands.
  • Non-Windows: Uses Unix/Linux shell commands.

For example, the following script is added to package.json:

"scripts": {
  "git": "powershell -Command \"$msg = Read-Host 'Enter commit message'; git add .; git commit -m \\\"$msg\\\"; git push\""
}

Configuration File

The TypeScript configuration file tsconfig.json contains the following settings:

{
  "compilerOptions": {
    "target": "ES2020",
    "module": "CommonJS",
    "outDir": "./dist",
    "rootDir": "./src",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "typeRoots": ["node_modules/@types"],
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src/**/*"],
  "exclude": ["node_modules", "**/*.test.ts"]
}

Ensure that TypeScript and Node.js type definitions are installed correctly:

npm install --save-dev typescript @types/node

Contribution Guidelines

We welcome issues and pull requests! If you'd like to contribute to the project, please follow these steps:

  1. Fork this repository.
  2. Create your feature branch (git checkout -b feature/YourFeatureName).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push your branch (git push origin feature/YourFeatureName).
  5. Submit a Pull Request.

License

This project is licensed under the MIT License.