@buygit/cli
v0.5.0
Published
Command-line client for the BuyGit Open Index — search, get, alt, compare, trending, categories, license-compat (with --fail-on for CI gating), audit, deep-audit, explain, stats, diff, init, doctor, watch, completion. CSV / Markdown / JSON output. Wraps t
Downloads
726
Maintainers
Readme
@buygit/cli
Terminal client for the BuyGit Open Index — search 78,094+ curated, license-tagged Git assets from any shell. No MCP client required.
Companion to
@buygit/mcp-server. Same underlying public REST API; this package is for terminal users instead of agents.
Install
# One-off
npx @buygit/cli search "image diff" --license MIT
# Or install globally
npm install -g @buygit/cli
buygit search "image diff" --license MITNo API key. No signup. Free forever.
Examples
# Search 78k catalog, MIT-only, with risk score on every result
buygit search "react form library" --license MIT --limit 5
# Compact mode — drops ~70% of response tokens
buygit search "image diff" --compact
# Full listing detail with 4-axis signals
buygit get next-saas-starter-pro
# License compatibility verdict (exit 0 = compatible, 1 = incompatible)
buygit license-compat GPL-3.0 MIT
buygit license-compat AGPL-3.0 Apache-2.0
# Audit any external GitHub repo (no need to be in our catalog)
buygit audit https://github.com/sindresorhus/is-online
# License-filtered alternatives
buygit alt vercel/next.js --license MIT
# Catalog stats + data freshness
buygit stats
# JSON output for piping into jq
buygit search "react" --license MIT --json | jq '.results[].slug'Why this exists
@buygit/mcp-server runs inside Claude Desktop / Cursor / Cline. @buygit/cli is the same answers from your shell. Useful for:
- CI scripts:
buygit license-compat GPL-3.0 MIT && buildfails if the dep is incompatible - Quick lookups without launching an agent
- Self-hosted instances (set
BUYGIT_BASE_URL=https://your-instance.example.com)
Environment
| Var | Effect |
|---|---|
| BUYGIT_BASE_URL | Override default https://buygit.com (for self-hosted) |
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | generic error (incompatible license, repo not found, …) |
| 2 | invalid arguments |
Pair license-compat with && in CI:
buygit license-compat $DEP_LICENSE MIT && npm install $PACKAGELicense
MIT.
