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

github-search-cli

v0.7.0

Published

Terminal-native GitHub browser — search, trending, bookmarks, history, deep-dive, compare, export, and more. All keyboard-driven, no browser needed.

Readme

search-cli

Browse, search, and trend GitHub repos from your terminal. No browser needed.


Quick start

# Requires Bun (https://bun.sh)
npm install -g github-search-cli

# Launch the interactive TUI browser
search-cli

# Non-interactive search (pipe to jq, csvkit, etc.)
search-cli "language:Rust stars:>10000" --json | jq '.[].fullName'
search-cli "language:Zig" --count
search-cli --trending --json --since weekly

CLI modes

search-cli "query" --json              # JSON array
search-cli "query" --csv               # CSV
search-cli "query" --markdown          # Markdown table
search-cli "query" --count             # Just the number
search-cli "query" --format urls       # One URL per line
search-cli "query" --pipe open         # Open each in browser
search-cli "query" --pipe clone        # Print clone commands
search-cli --trending --json           # Trending as JSON
search-cli --watch "query"             # Poll every 300s

Shell completions

source <(search-cli --completion bash)   # Bash
source <(search-cli --completion zsh)    # Zsh
search-cli --completion fish | source    # Fish

gh extension

gh extension install ./gh-search-cli
gh search-cli "language:Rust"

Features

| Category | What you get | |----------|-------------| | Search | Free-text + qualifiers (language:, stars:, topic:), sort by stars/updated/forks, Tab auto-complete | | Trending | Browse GitHub trending by day/week/month/year, filter by language | | Memory | Persistent history (Ctrl+R), bookmarks (b/B), saved searches (Ctrl+S/Ctrl+O), session restore | | Deep-dive | Per-repo detail: languages, top contributors, README preview (d) | | Compare | Select 2+ repos and compare side-by-side (c/C) | | Explore | Browse popular GitHub topics (E) | | Export | JSON, CSV, Markdown, plain text (Ctrl+E) | | Shell | Pipe-friendly output, --watch mode, shell completions, Docker | | Delight | 3 themes (Tokyo Night, Dracula, Monokai), animated status bar, clipboard share, startup tips |

Main view

| Key | Action | |-----|--------| | / | Focus search input | | Enter | Execute search / open repo | | / / j/k | Navigate results | | t | Toggle search / trending | | s | Cycle sort | | l | Cycle limit | | r | Refresh | | g | Toggle activity graph | | d | Toggle repo deep-dive | | o | Open repo in browser | | b / B | Toggle bookmark / open bookmarks | | c / C | Toggle compare list / show comparison | | E | Open topic explorer | | Tab | Auto-complete qualifier | | ? / Ctrl+H | Help overlay | | q | Quit |

Overlays

| Key | Action | |-----|--------| | Ctrl+R | Search history | | Ctrl+S | Save current search | | Ctrl+O | Saved searches panel | | Ctrl+E | Export results | | Ctrl+N | Notifications | | Ctrl+P | Share repo (copy to clipboard) | | PageDown / Ctrl+F | Next page | | Esc | Close overlay |

Trending mode

| Key | Action | |-----|--------| | 15 | Switch tab (Today → Week → Month → Year → All) | | / / h/l | Navigate tabs |


Search syntax

language:Rust stars:>1000 topic:cli
"machine learning" language:Python stars:>5000
topic:cli -language:JavaScript
org:rust-lang language:Rust

Supported qualifiers: language:, stars:, fork:, archived:, topic:, user:, org:, repo:, updated:, pushed:, visibility:, license:, created:, size:, in:. Prefix with - to exclude.


Configuration

~/.config/search-cli/config.json (created automatically):

{
  "defaultSort": "stars",
  "defaultLimit": 50,
  "theme": "tokyo-night",
  "githubToken": "ghp_..."
}

Or run search-cli init for the interactive setup wizard.

Environment variables: GITHUB_TOKEN, SEARCH_CLI_CONFIG, XDG_CONFIG_HOME, XDG_STATE_HOME.


Install from source

git clone https://github.com/codersdfs/search-cli.git
cd search-cli
bun install
bun start              # Launch TUI
bun test               # 104 tests
bun run build          # Compile binary → dist/

Design

CLI → QueryBuilder → Provider → Normalizer → Ranking → TUI / stdout

| Layer | File | Job | |-------|------|-----| | Entry | src/cli.ts | Arg parsing, routes to TUI or stdout | | TUI | src/tui.ts | Interactive browser (OpenTUI) | | Query | src/query.ts | Parse keywords/qualifiers | | Provider | src/provider.ts | GitHub REST API with caching + token rotation | | Types | src/types.ts | Shared interfaces |

The SearchProvider interface is the extension point for alternative backends (GitLab, local index, AI retriever).


License

MIT