Install
hardbasis is the HardBasis command line, for people who work in a terminal and for AI agents. Pick one of three ways to install it.
Installer
curl -fsSL https://raw.githubusercontent.com/HardBasis/hardbasis-cli/main/scripts/install.sh | shThe installer picks the build for your OS and architecture, checks it against the release's SHA256SUMS, and installs ~/.local/bin/hardbasis. Builds exist for darwin-arm64, darwin-x64, linux-x64, linux-arm64 and windows-x64.
Pin a release with -s -- --version v0.1.0. Add a short hb alias with -s -- --alias hb:
curl -fsSL https://raw.githubusercontent.com/HardBasis/hardbasis-cli/main/scripts/install.sh | sh -s -- --alias hbnpm
npm i -g @hardbasis/clinpm needs Node 22 or later.
Source checkout
git clone https://github.com/HardBasis/hardbasis-cli && cd hardbasis-cli
pnpm install && pnpm run build:localRun from source
From a checkout, without building a binary:
pnpm install
pnpm hardbasis markets list
pnpm hardbasis auth loginalias hardbasis='pnpm --silent --dir ~/project/hardbasis-cli hardbasis' runs the checkout from anywhere. For one executable instead, build:local uses the same bun flags as a release, needs bun, writes dist/hardbasis and prints the line to install it:
pnpm run build:local
mkdir -p ~/.local/bin && cp dist/hardbasis ~/.local/bin/Verify
- Checksums. The installer refuses a binary whose hash is not in the release's
SHA256SUMS. For a manual download, check it yourself withshasum -a 256 -c SHA256SUMSbeside the asset. - Provenance attestation (from the first public release): every release asset carries a GitHub build provenance attestation.
gh attestation verify ~/.local/bin/hardbasis --repo HardBasis/hardbasis-cliLog in on testnet
hardbasis auth loginOn testnet this signs up, takes the faucet grant, mints a read,trade delegate key and stores only the delegate in ~/.config/hardbasis/config.toml (mode 0600). The master key is printed once on stderr and never written, unless you pass --keep-master. --scopes a,b picks the delegate's scopes; a set that includes withdraw prints a warning that the key can move funds.
hardbasis auth whoami reads the key's scopes back from the venue, never from the config file.
What --version tells you
hardbasis --versionprints four things:
| part | meaning |
|---|---|
| package version | the @hardbasis/cli release, for example 0.1.0 |
git | the commit the binary was built from |
spec | the SHA-256 of the OpenAPI spec the commands were generated from |
gateway | the build of the gateway that spec was fetched from |
If a command looks different from this site's REST reference, compare the spec value: the CLI is pinned to one spec and is repinned deliberately.
First commands
hardbasis markets list
hardbasis account get
hardbasis orders create --market btc-usd --side buy --type limit \
--limit-price 65000.00 --contracts 10 --dry-runDrop --dry-run to place the order for real, on testnet. Next: connect an agent over MCP.