forage-cli
v0.1.0
Published
A sleek terminal UI for exploring, searching, and managing npm packages
Maintainers
Readme
forage
A sleek terminal UI for exploring, searching, and managing npm packages. Think crates-tui but for npm.
Features
- Discovery Dashboard — Popular packages, curated categories, and local project summary at a glance
- Search — Fast, debounced search across the npm registry with download stats and version info
- Package Details — README rendering, version history, dependency tree, download sparklines
- Local Awareness — Detects your
package.json, shows installed versions, highlights outdated deps - Actions — Copy install commands to clipboard, open npm/repo/docs in browser
- Keyboard-Driven — Vim-style navigation throughout
Install
npm install -g forage-cliRequires Node.js 20+.
Usage
# Open the discovery dashboard
forage
# Jump straight to search results
forage reactKeybindings
Dashboard
| Key | Action |
|-----|--------|
| Tab | Cycle sections (Popular / Categories / Local) |
| j k ↑ ↓ | Navigate within section |
| Enter | Select package / category / open local view |
| / | Jump to search |
| q | Quit |
Search
| Key | Action |
|-----|--------|
| / | Focus search input |
| Esc | Unfocus input / return to dashboard |
| j k ↑ ↓ | Navigate results |
| Enter | View package details |
| y | Copy install command |
| o | Open on npm |
| l | View local dependencies |
| g G | Jump to top / bottom |
| q | Quit |
Package Detail
| Key | Action |
|-----|--------|
| Esc | Go back |
| Tab | Cycle tabs (Overview / Versions / Dependencies) |
| j k ↑ ↓ | Scroll content |
| y | Copy install command |
| o | Open on npm |
| r | Open repository |
| d | Open docs / homepage |
| g G | Jump to top / bottom |
| q | Quit |
Local Dependencies
| Key | Action |
|-----|--------|
| Esc | Go back |
| j k ↑ ↓ | Navigate dependencies |
| Enter | View package details |
| y | Copy install command |
| g G | Jump to top / bottom |
| q | Quit |
How It Works
Forage uses the public npm registry API and npm downloads API. No authentication required. All data is fetched in real-time with no local caching between sessions.
Local project detection reads package.json from your current working directory and detects your package manager via lock files (pnpm-lock.yaml, yarn.lock, or falls back to npm).
Built With
- Ink — React for CLIs
- Zustand — State management
- marked + marked-terminal — README rendering
License
MIT
