The farmhands CLI
Every command and action of @farmhands/cli. It reads the chain and the public API, plans and encodes; it never holds a key, signs or sends.
npx -y @farmhands/cli@0.1.1 <command>It plays on BNB Smart Chain mainnet, where the valley is. Below, farmhands stands for the whole npx line.
| Option | What it does |
|---|---|
--json | Machine-readable output. Add it whenever an agent parses the result. |
--from <wallet> | Your own wallet address, for real gas estimates in plan (read-only) |
FARMHANDS_RPC=url1,url2 | Your own RPC list instead of the public ones (reads only) |
Contract addresses are pinned inside the package and are never taken from input or a server.
Commands
| Command | What it does |
|---|---|
status <name> | Ember, slots, orders, and when to come back |
plan <name> [--from <wallet>] [--strategy <file>] [--policy <file>] | The Session Plan, as transactions to preview. --from gives real gas estimates (read-only). |
encode <action> <args...> | One transaction { to, value, data } for baw contract-call |
decode <to> <data> [--value <wei>] | A transaction read back in words. Prints REFUSE for anything that isn't Farmhands, or that carries an unexpected amount of BNB. |
quote <item> <buy|sell> | Best price on the book and a limit 2% past it, on a valid tick |
hint <item> <bid|ask> <price BNB> | The neighbouring price levels a new limit order needs |
item <id|name> | An item and how it is made. Marks are item 1, counted in thousandths (1000 = 1 Mark). |
shop [name] | NPC prices, Pim's cart, decor and other fees, the event shop, Market Row rules. With a name: what's left today. |
upgrades <name> | Next work slot and Pack upgrades against what the farmhand has; storage and decor plots |
project [name] | The open Restoration bundle and what it still needs |
quest <id|key> [name] | A quest's steps, conditions and rewards |
receipt <txHash> | What a sent transaction did: Pack and Marks in and out, a new order's id, fills, rare finds, quests and badges. The wallet preview shows only BNB, so this is how a step is reported. |
contracts | The pinned contract addresses, to check against the contracts page |
Actions for encode
| Action | Arguments |
|---|---|
claim | <farmer|miner|woodcutter> |
work | <slot:c|s|cs[:item]>... [--value <wei>]: c collect, s start, cs both; the rare-find fee goes in --value |
eat | <food> <qty> |
equip | <tool> |
repair | <profession> |
golden-seed | <slot> |
craft | <recipe> <times> |
discard | <item> <qty> (permanent) |
deliver | <order slot> <item> <qty> |
reroll | <order slot> |
npc-buy, npc-sell | <item> <qty> |
pim-buy | <decor> |
event-shop | |
upgrade-slots, upgrade-pack | |
switch-profession | <profession> |
place-decor | <decor> <plot> |
remove-decor | <plot> |
stash, unstash | <item:qty>... |
donate | <item> <qty> (permanent) |
claim-tier | <project> |
claim-bundle | <bundle> |
poke | Moves a finished project along |
accept, submit, abandon | <quest> |
deliver-any | <quest> <item:qty>... |
settle | <character id>: lands rare finds whose rolls are ready |
buy | <item> <qty> <max price BNB> |
sell | <item> <qty> <min price BNB> |
limit | <item> <bid|ask> <price BNB> <qty> [--post-only] |
cancel | <order id> |
withdraw | Moves Market Row proceeds to the wallet |
Sending
The CLI's output goes to the agent wallet, never anywhere else:
farmhands decode <to> <data> --value <wei>
baw contract-call preview --binanceChainId 56 --from <address> --to <to> --value <wei> --inputData <data> --json
baw contract-call execute --requestId <requestId> --json
farmhands receipt <txHash>Decode first, preview second, and execute only when the preview matches the plan the Keeper approved. The full flow is in the skill.