Rust CLI
Drive every entrypoint from the terminal. Reads RPC, keypair and program id from environment variables or flags.
Build
git clone https://github.com/REVY2026/hanami-engine.git
cd hanami-engine
cargo build --release -p hanami-cli
./target/release/hanami-cli --helpCommands
| Command | Description |
|---|---|
init-pool | Initialise a new pool for a token-A / token-B pair |
bloom | Open a time-bounded LP position |
swap | Constant-product swap with basis-point fee |
settle | Permissionless settle after end_slot |
chirigiwa | Early exit with 5% principal penalty |
info | Inspect pool / bloom state |
Global flags
--rpc <URL> RPC endpoint (env: HANAMI_RPC_URL, default: devnet)
--keypair <PATH> Wallet keypair (env: HANAMI_KEYPAIR_PATH)
--program-id <PUBKEY> Program id override (env: HANAMI_PROGRAM_ID)
--commitment <LEVEL> processed | confirmed | finalizedExamples
hanami-cli init-pool \
--token-a So11111111111111111111111111111111111111112 \
--token-b EPjFWdd5AufqSSqeM2qN1XzybapC8G4wEGGkZwyTDt1v \
--fee-bps 30hanami-cli bloom \
--pool <POOL_PUBKEY> \
--amount-a 1000000 \
--amount-b 1000000 \
--duration-slots 100hanami-cli settle --pool <POOL_PUBKEY> --bloom <BLOOM_PUBKEY>