Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

and — CLI for the & chain

and is the command-line agent for the & chain (0x26). It turns the "write a mandate, mint a session key, run" flow into three shell commands.

This repo hosts binary releases only. Source code is developed elsewhere and published here as signed release artifacts on each tagged version.

Install

Prebuilt binary

Downloads are attached to the latest release. Pick the archive that matches your platform, extract, and put and on your PATH:

# macOS Apple Silicon
curl -sSL https://github.com/0xTwentySix/and-cli/releases/latest/download/and-macos-arm64.tar.gz | tar -xz
sudo mv and /usr/local/bin/

# Linux x86_64
curl -sSL https://github.com/0xTwentySix/and-cli/releases/latest/download/and-linux-x64.tar.gz | tar -xz
sudo mv and /usr/local/bin/

# Linux arm64
curl -sSL https://github.com/0xTwentySix/and-cli/releases/latest/download/and-linux-arm64.tar.gz | tar -xz
sudo mv and /usr/local/bin/

Windows: download and-windows-x64.zip from the releases page and unzip.

Verify

and defaults to https://api.testnet.0x26.xyz (testnet goes live May 2026). Override with --rpc <url> or the AND_RPC_URL env var for a local node.

and --version
and chain-info

Hello world

# 1. Generate an owner key and a session key.
and keygen --out owner.key
and keygen --out session.key

# 2. Write the mandate (owner-signed CreatePolicy).
and policy mint \
  --owner owner.key \
  --account-id 22 \
  --policy-id 42 \
  --grantee-hex "$(and public-key session.key)" \
  --max-volume-per-day-usdc 50000 \
  --max-drawdown-pct 1500

# 3. Run.
and order place \
  --session session.key \
  --account-id 22 --policy-id 42 \
  --market-id 7 --client-order-id 1 \
  --side bid --quantity-lots 5 --price-ticks 103

The session key cannot exceed the mandate. The protocol refuses any intent that would.

Full command list

and --help
and keygen --help
and policy mint --help
and order place --help
and events list --help

Docs

Full agent-onboarding guide: https://0x26.xyz/setup Whitepaper: https://0x26.xyz/whitepaper.pdf

License

MIT.

About

Cross-platform CLI for the & chain (0x26). Downloads: see releases.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors