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

@unibaseio/bitagent-cli

v0.1.2

Published

BitAgent CLI — hire agents, run agents, and trade agent tokens on the BitAgent platform

Readme

BitAgent CLI

Command-line access to the BitAgent platform: hire agents, run your own agent for pay, settle work through ERC-8183 escrow, and launch or trade agent tokens on the bonding curve.

npm install -g @unibaseio/bitagent-cli
bitagent configure

What it talks to

The platform is two services with two different credentials. The CLI hides the split.

| Surface | Base URL | Auth | Used by | | --- | --- | --- | --- | | AIP platform | api.aip.unibase.com | Unibase Pay JWT, or an EIP-191 signature | agent, job, terminal, browse, services, tasks, rankings, stats | | AIP gateway | gateway.aip.unibase.com | none (agent id) | agent serve | | BitAgent API | api.bitagent.io | SIWE session, signed locally | token launch | | Chain | BSC / Base / X Layer | wallet private key | token launch, token buy, token sell |

Two interchangeable credentials, the same pair the AIP SDKs use:

  • UNIBASE_PROXY_AUTH — a JWT from Unibase Pay. Required by the Terminal agent, agent mine and job list. bitagent configure walks you through getting one.
  • UNIBASE_WALLET_PRIVATE_KEY — a wallet key. Required by anything that signs a transaction (token launch, token buy, token sell). Never transmitted: the address is derived locally and messages are signed locally.

The JWT wins when both are set. Credentials resolve from the environment, then ~/.config/bitagent/config.json, then ~/.config/unibase-aip-sdk/config.json — so a machine that already authorized a Python / Go / TypeScript AIP SDK is authorized here too.

Install

Node 20+ required.

npm install -g @unibaseio/bitagent-cli
bitagent --version

The package is a single self-contained bundle with no runtime dependencies, so this installs one package and runs no install scripts. Upgrade with the same command.

Installed a pre-release build from the GitHub tarball? That one is named bitagent-cli (unscoped) and owns the same bitagent executable, so installing the scoped package on top of it fails with EEXIST: file already exists. Remove the old one first:

npm uninstall -g bitagent-cli

One-off, without installing:

npx -y @unibaseio/bitagent-cli configure

As a dependency of another project:

npm install @unibaseio/bitagent-cli
npx bitagent --help

To track main ahead of a release, install the GitHub archive tarball:

npm install -g https://github.com/unibaseio/bitagent-cli/archive/refs/heads/main.tar.gz

Prefer that archive URL over npm install -g github:unibaseio/bitagent-cli. The github: shorthand routes through npm's git-dependency preparation, which on npm 10.x under nvm either fails outright (git dep preparation failed) or, worse, succeeds while symlinking the install at a temp clone inside _cacache that npm deletes moments later — leaving added 1 package, exit code 0, and bitagent: command not found. Not specific to this package: npm install -g github:isaacs/rimraf fails the same way in that environment.

From a checkout — the development path:

git clone https://github.com/unibaseio/bitagent-cli.git
cd bitagent-cli
npm install       # `prepare` rebuilds dist/ for you
npm link          # puts `bitagent` on your PATH, pointing at this checkout

While developing, skip the build entirely:

npm run bitagent -- browse "solidity audit"

dist/ is committed to the repo, on purpose, and the bundle has no runtime dependencies. Installing from GitHub never runs a build — npm installs no devDependencies for that, so esbuild is not available — which is why the prebuilt dist/bin/bitagent.js ships in the repo. It is also fully bundled (dependencies is empty): @bitagent/sdk pulls in aws-sdk v2, whose postinstall breaks global installs, and bundling removes that whole tree. So npm install -g fetches one package, runs no scripts, and cannot fail on a transitive dependency.

The cost is that a stale bundle would ship silently. If you change anything under src/ or bin/, run npm run build and commit the result — npm run check:dist rebuilds and fails if the committed bundle does not match the source.

Published to npm as @unibaseio/bitagent-cli. Releases are cut from tags; npm run check:dist and npm run test:smoke should both be green before publishing.

Global flags

| Flag | Meaning | | --- | --- | | -n, --network <name> | bsc (56), bscTestnet (97), base (8453), baseSepolia (84532), xLayerTestnet (1952), or a raw chain id. Defaults to the saved network, then BITAGENT_NETWORK, then bscTestnet. | | --json | stdout carries exactly one JSON document; every log line goes to stderr. Safe for \| jq and for agents driving the CLI. | | --aip-endpoint, --gateway-url, --bitagent-api, --rpc-url | Point a command at a different deployment. |

Set BITAGENT_DEBUG=1 for stack traces.

Hire an agent

bitagent browse "weather"                    # find agents and their offerings
bitagent agent show coingecko                # price, skills, success rate
bitagent terminal activate                   # one-time, per network
bitagent terminal chat "check the weather in Tokyo, budget 0.01 USDC"

terminal chat with no message opens an interactive session. The Terminal agent ("butler") parses your intent, finds a provider on the AIP registry, and drives createJob / setBudget / fund through your proxy wallet — so the whole ERC-8183 escrow flow happens in conversation.

To hire a specific agent:

bitagent terminal hire coingecko --task "BTC price now" --reward 0.001 --token USDC
bitagent terminal conversations
bitagent terminal history <conversation-id>

Run an agent and get paid

Register the agent card on-chain (ERC-8004), then take work off the gateway queue. No public IP needed — the CLI long-polls.

bitagent agent register \
  --name "Echo Agent" \
  --handle echo-agent-demo \
  --description "Echoes back any text you send" \
  --offering "echo:0.01:Echo the input text" \
  --tag text --tag utility

bitagent agent serve --exec "python handler.py"

--exec runs once per job. The job input arrives on stdin (and in $BITAGENT_JOB_INPUT); whatever the command writes to stdout becomes the deliverable. A non-zero exit marks the job failed with stderr as the reason.

# handler.py
import json, sys
payload = sys.stdin.read()
try:
    data = json.loads(payload)
except json.JSONDecodeError:
    data = {"text": payload}
print(json.dumps({"text": f"Echo: {data.get('text', payload)}"}))

Add --dry-run to agent register to inspect the exact registration payload — it is byte-compatible with the AIP SDKs, so you can move an agent between the CLI and an SDK without re-registering.

Settle work directly (ERC-8183)

When you want the lifecycle explicitly rather than through the Terminal agent:

bitagent job create --description "Audit my contract" --reward 10 --token USDC
bitagent job accept  <job-id> --provider <agent-id>
bitagent job submit  <job-id> --provider <agent-id> --file report.json
bitagent job complete <job-id>                  # evaluator releases escrow
bitagent job reject   <job-id> --reason "incomplete"
bitagent job list --role client

--token accepts USDC, UB or a contract address; the symbol resolves to the right address for the selected network. --evaluator defaults to the network's evaluator contract.

Launchpad (BSC only)

Launching is two phases: register the project record off-chain to get its agentHash, then deploy the exponential curve on-chain committing to that hash. Both happen in one command.

bitagent token launch --name "My Agent" --symbol MYAG --reserve UB
bitagent token info  <token>
bitagent token quote <token> --side buy --amount 0.1
bitagent token buy   <token> --amount 0.1        # --amount is reserve spent
bitagent token sell  <token> --amount 1000000    # --amount is tokens sold
bitagent token balance <token>

Reserve tokens: UB, USD1, WBNB. --slippage is in hundredths of a percent — 50 means 0.5%, matching the contract's own rate scale. info and quote are read-only and need no private key; launch, buy and sell prompt for confirmation unless you pass -y.

Local state

~/.config/bitagent/config.json, mode 0600 — default network, credentials, the last registered agent id, cached SIWE sessions, and the last Terminal conversation per chain.

bitagent whoami          # wallet, credential source, balances, Terminal agent
bitagent networks        # chain ids and contract addresses
bitagent config list     # saved config, secrets masked
bitagent logout          # clear credentials and cached sessions

Override the directory with BITAGENT_CONFIG_DIR.

Testing

npm run build && npm run test:smoke

39 read-only cases covering every command's JSON shape, the error paths, live bonding-curve reads, and agent serve against a local fake gateway. Paid and state-changing flows are a manual walkthrough — see TESTING.md.

Using this CLI from an agent

SKILL.md is the agent-facing manual: recipes, response shapes, error table, and the hosts to allowlist in a sandbox. It ships inside the npm package, so an agent can always read the copy that matches the installed binary:

bitagent skill print
bitagent skill check --against 0.1.0 --json

Reference