aomi command ships inside the @aomi-labs/client npm package. You use it to chat with an Aomi backend, keep a session across runs, inspect wallet requests, sign and submit transactions, and manage per session secrets.
The package is published as @aomi-labs/client and registers one binary named aomi.
Install
- Run once with npx
- Global
- pnpm
aomi for brevity. To run a command once without installing, prefix it with npx @aomi-labs/client.
Two ways to run it
The root command has two modes plus a set of noun verb subcommands.Interactive REPL
Run
aomi with no arguments to open a prompt. Type messages, or use slash commands like /app, /model, and /key. Requires a TTY.Single message and scripting
Run
aomi --prompt "..." to send a single message and exit, or use a subcommand such as aomi tx sign or aomi secret add for non interactive flows.Interactive REPL
--prompt instead.
Slash commands available inside the REPL:
Single prompt
--show-tool to print tool output while running in prompt or REPL mode.
You can save a bring your own key provider key before the prompt runs:
Commands
chat
Send one message and print the response, then exit.--verbose (or -v) streams agent responses, tool calls, and events live. Without it, only the final agent message prints.
tx
Manage the transactions the backend hands back as wallet requests.tx simulate and tx sign take zero or more transaction IDs as positional arguments. See Transaction flow and Signing modes below.
session
The CLI is not a long running process. Each command starts, runs, and exits. Session state lives locally between runs so the next command continues the same conversation.model
Discover and switch backend models for the active session.aomi model set persists the selected model in local session state after the backend confirms the change. aomi chat --model ... applies the model before sending and updates that persisted state too.
app
There is no
aomi app use or aomi app set command. Switch apps with the --app <name> flag on a command, the AOMI_APP environment variable, or /app <name> inside the REPL.chain
--chain <id> on that command, or set AOMI_CHAIN_ID to share a chain across several commands. Run aomi chain list to see the chains your backend accepts.
wallet
config
secret
Ingest per session secrets so the backend uses opaque handles instead of raw values.--new-session:
Transaction flow
The backend builds transactions. The CLI persists them locally, then signs and submits them when you choose.1
Chat and queue a request
tx-1. The CLI prints the destination, value, and chain.2
Inspect pending transactions
3
Sign and submit
aomi tx list with kind eip712_sign. The same aomi tx sign command handles both kinds.
Signing modes
By defaultaomi tx sign tries account abstraction first and falls back to direct EOA signing if AA is unavailable or fails. You can force a mode.
You can also constrain the AA provider and mode:
--aa and --eoa are mutually exclusive. --aa-provider and --aa-mode cannot be combined with --eoa.
For Solana sign requests, pass a Solana keypair with
--solana-private-key (a base58 secret key, or a JSON byte array), or set SOLANA_PRIVATE_KEY.Flags and environment variables
These global flags work on the root command and on the subcommands. Flags take priority over environment variables.
Root command only flags:
--verbose (-v) is available on aomi chat to stream tool calls and responses live.
If you pass both
--public-key and --private-key, the CLI checks that the public key matches the address derived from the private key and exits if they disagree. If you pass only --private-key, it derives the public key for you.Wallet connection
Pass--public-key so the agent knows your address. This lets it build transactions and read your balances. The address is saved in state, so later commands in the same session do not need it again.
Fresh sessions
Use--new-session when a command should start a fresh backend and local session instead of reusing the active one.
How state works
The CLI is not a daemon. Each command starts, runs, and exits. Conversation history lives on the backend. Between runs, the CLI persists local state underAOMI_STATE_DIR, or ~/.aomi by default.
Individual session files live under
<state dir>/sessions/, with a pointer to the active session stored in the state root.
Common tasks
A few flows you will reach for often. Each uses the commands documented above.Chat with your App locally
Sanity check a preamble or a new tool before you deploy. The CLI talks to your App as deployed on the backend, so deploy a change first, then check it here.--verbose to watch which tools the model calls and what they return. Run aomi session log to read the whole exchange back, tool results included.
Compare models
Run the same prompt across models without starting over.Debug a tool call
When the model does not call the tool you expect, run the chat in verbose mode to see the tool calls, their arguments, and the raw results live.Simulate before you sign
When a chat asks the agent to act onchain, the transaction is queued locally. Simulate it before signing so no funds move until you are happy with the result. See Transaction flow for the full walkthrough.Inspect or resume a session
Each conversation is a session, kept locally so you can pick it up later.Next steps
Trade on Aomi
How the agent turns a prompt into a simulated, signed onchain trade.
The builder toolchain
The Rust toolchain for building and shipping Apps:
aomi-build, aomi-run, aomi-git.