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

@bitget-ai/bitget-agent-cli

v1.2.0

Published

bgc — the official Bitget shell CLI. Run any of 56+ Bitget API tools (spot, futures, margin, copy-trading, earn, broker, p2p, convert, account) from your terminal or shell-based AI assistant (Claude Code, Codex CLI, OpenClaw).

Readme

@bitget-ai/bitget-agent-cli — bgc

npm Node.js License

The shell surface of the Bitget Agent Hub — invoke any of 59 Bitget API tools straight from your terminal, or let your shell-based AI assistant (Claude Code, Codex CLI, OpenClaw) drive your Bitget account by writing bgc commands.

npm install -g @bitget-ai/bitget-agent-cli

The binary is bgc.

Why npm install -g and not npx? bgc is a persistent CLI — your AI assistant calls it dozens of times per session, so you want it on $PATH with zero per-call overhead. The other Bitget AI packages (@bitget-ai/bitget-agent-skill, @bitget-ai/bitget-signal, @bitget-ai/bitget-agent-mcp, @bitget-ai/bitget-agent-installer) are one-shot or subprocess-launched, so they use npx.

Prerequisites: Node.js ≥ 20. A Bitget API key, secret, and passphrase (create one).


Quick start

export BITGET_API_KEY=...
export BITGET_SECRET_KEY=...
export BITGET_PASSPHRASE=...

# Public market data — no auth needed
bgc spot spot_get_ticker --symbol BTCUSDT

# Authenticated read
bgc account account_get_balance

# Authenticated write — [CAUTION] real order
bgc spot spot_place_order --symbol BTCUSDT --side buy --orderType market --size 10

# Pretty-print JSON for human eyes
bgc --pretty futures futures_get_positions

Usage

Usage: bgc <module> <tool> [--param value ...]

Modules: spot, futures, account, margin, copytrading, convert, earn, p2p, broker

Options:
  --read-only       Only allow read/query tools (writes are stripped at load time)
  --paper-trading   Use Bitget Demo Trading environment (requires Demo API Key)
  --pretty          Pretty-print JSON output
  --help            Show this help
  --version         Show version

Auth (environment variables, required for private endpoints):
  BITGET_API_KEY, BITGET_SECRET_KEY, BITGET_PASSPHRASE

Run bgc --help for the full list at any time.


Why a shell CLI?

bgc exists so AI assistants that already live in your shell — Claude Code, Codex CLI, OpenClaw — can drive Bitget without any extra integration wiring. The LLM writes a bgc ... command, the shell runs it, the JSON comes back. No MCP host, no plugin, no proxy.

If your assistant speaks MCP instead (Claude Desktop, Cursor, Continue, ChatGPT Desktop, Windsurf), use @bitget-ai/bitget-agent-mcp — same 59 tools, MCP-shaped.

If you want Claude Code / Codex / OpenClaw to know when and how to use bgc semantically (without you teaching it each command in chat), install @bitget-ai/bitget-agent-skill on top.


Demo Trading (paper trading)

bgc supports Bitget's Demo (paper-trading) environment. Use a Bitget Demo API Key for BITGET_API_KEY and friends, then add --paper-trading:

bgc --paper-trading spot spot_place_order \
    --symbol BTCUSDT --side buy --orderType market --size 10

Recommended for any first-time setup or when an AI is making decisions on your behalf.


Read-only mode

For maximum safety when handing the CLI to an AI, run with --read-only:

bgc --read-only spot spot_get_ticker --symbol BTCUSDT
# OK

bgc --read-only spot spot_place_order --symbol BTCUSDT --side buy ...
# Error: spot_place_order is unavailable in --read-only mode

Write tools are stripped from the registry before the call ever leaves the process — there is no way for the AI to invoke them.


Modules at a glance

| Module | Tools | Default | Requires API key | |---|:---:|:---:|:---:| | spot | 13 | ✅ | partial (writes only) | | futures | 15 | ✅ | partial | | account | 8 | ✅ | yes | | margin | 7 | — | yes | | copytrading | 5 | — | yes | | convert | 3 | — | yes | | earn | 3 | — | yes | | p2p | 2 | — | yes | | broker | 3 | — | yes |

The full tool catalog with every parameter lives at agent-hub/docs/tools-reference.md.


Pair with the skill for natural-language trading

Once bgc is on your $PATH, install the Bitget Agent Skill so Claude Code / Codex / OpenClaw learns when to use it:

npx @bitget-ai/bitget-agent-skill

Then in your AI tool you can say things like "buy 0.1 BTC at market on Bitget" or "show my open futures positions" and it will compose the right bgc invocation.


How bgc is built

bgc is a thin shell wrapper around the Bitget Agent SDK:

bgc CLI
   │
   ▼
@bitget-ai/bitget-agent-sdk  (59 tools, REST client, signing, rate limiting)
   │
   ▼
Bitget REST API

Every command translates into a single signed HTTPS request. No telemetry, no proxy, no remote dependencies. Credentials live in your environment only.


Security

  • Credentials are read from environment variables only — never logged, never written to disk.
  • All authenticated requests are signed with HMAC-SHA256 in-process.
  • Client-side rate limiting protects against accidental AI loops hitting Bitget's API limits.
  • Write tools carry an explicit [CAUTION] flag in their description so AI assistants surface them clearly before executing.
  • --read-only and --paper-trading provide layered safety nets.

License

MIT


Part of the Bitget Agent Hub ecosystem · Trading Stack · Surface. Foundation: agent-sdk · Other surfaces: agent-mcp · agent-skill · Market signals: bitget-signal