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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gh-repo-manager

v0.1.2

Published

Node.js CLI tool to list and delete GitHub repositories via the official API.

Readme

gh-repo-manager

GitHub release (latest by date) License

Node.js CLI tool to list and delete GitHub repositories using the official GitHub REST API (Octokit).

Status

Experimental — use with caution (requires a GitHub token).

Table of Contents

Key features

  • List repositories for the authenticated user.
  • Interactively select repositories to delete.
  • Batch deletion with concurrency control.

Requirements

  • Node.js >= 20
  • A GitHub personal access token with repo scope (for private repos) or appropriate scopes for public-only operations.

Quick links

  • License: LICENSE
  • Repository: package.json

What the project does

This small CLI helps you inspect and remove GitHub repositories from the command line. It uses @octokit/rest for API calls and @clack/prompts for interactive selection and confirmation.

Why this is useful

  • Fast way to clean up outdated or unused repositories.
  • Interactive selection reduces risk of accidental deletions.
  • Programmatic primitives allow integration into scripts or automation.

Installation

Clone the repository and install dependencies:

git clone https://github.com/migudevelop/gh-repo-manager.git
cd gh-repo-manager
pnpm install

Run in development mode:

pnpm run start:dev

You can also run the CLI directly with Node (this repository uses ESM):

gh-repo-manager --help

Usage (CLI)

  • List repositories (default):
# Uses GITHUB_TOKEN environment variable, or provide --token
GITHUB_TOKEN=ghp_xxx 
# or
gh-repo-manager --token <your_token>
  • Delete repositories (interactive):
node src/index.js --delete --token <your_token>

Global usage (when the package is installed globally or run via the published binary):

# After publishing/installing globally
npm install -g gh-repo-manager
pnpm install -g gh-repo-manager

Then use the CLI:


# Short option (token):
gh-repo-manager -t <your_token>

# Long option (token):
gh-repo-manager --token <your_token>

# Delete interactively using short or long form:
gh-repo-manager -d -t <your_token>
gh-repo-manager --delete --token <your_token>

# You can also run via npx without global install:
npx gh-repo-manager --token <your_token>

Notes:

  • If you install the package globally (when published) the binary is gh-repo-manager.
  • The CLI will prompt you to select repositories and ask for confirmation before deletion.

Environment & configuration

  • GITHUB_TOKEN — preferred way to provide your GitHub token.
  • --token <token> — CLI option to override environment variable.

Troubleshooting

  • Ensure your token has the required scopes (e.g., repo for private repository deletion).
  • Node version must be >= 20.0.0 as declared in package.json.

Maintainers & Contributing

  • Maintainer: Miguel Martínez
  • License: MIT (see LICENSE)