@crossmint/lobster-cli
v0.1.4
Published
Standalone CLI for lobster.cash Solana wallet operations. Agent-framework agnostic.
Readme
@crossmint/lobster-cli
Standalone CLI for lobster.cash Solana wallet operations. Agent-framework agnostic.
Manage smart wallets, check balances, send tokens, and create/approve transactions on Solana -- from any terminal or agent runtime.
Install
npm install @crossmint/lobster-cliQuick start
# 1. Set up a wallet (opens consent URL for human approval)
lobster setup
# 2. Check balance
lobster balance
# 3. Send USDC
lobster send --to <address> --amount 10Global options
| Flag | Description | Default |
| ---------------- | --------------------------------------- | -------------------------- |
| --server <url> | Server base URL | https://www.lobster.cash |
| --timeout <ms> | Request timeout | 15000 |
| --human | Human-readable output (default is JSON) | false |
Commands
setup
Generate a local keypair and start the consent flow. Run again after approval to finalize.
lobster setup [--agent-id <id>]balance
Check wallet balances.
lobster balance [--agent-id <id>]send
Send tokens in a single step (create + sign + approve).
lobster send --to <address> --amount <amount> [--token usdc] [--wait] [--timeout 60000] [--agent-id <id>]tx create
Create a transaction without approving it.
# Transfer
lobster tx create --type transfer --to <address> --amount <amount> [--token usdc]
# Serialized transaction
lobster tx create --type serialized --serialized-transaction <data>
# Contract calls
lobster tx create --type calls --calls '<json array>'tx approve
Approve a pending transaction by signing.
# Let the CLI sign the message from tx create
lobster tx approve --id <txId> --message <msg> [--encoding utf8]
# Or provide a pre-computed signature
lobster tx approve --id <txId> --signature <sig>Add --wait to block until the transaction reaches a terminal state.
tx status
Check transaction status.
lobster tx status --id <txId> [--wait] [--timeout 60000]wallet info
Show wallet details for an agent.
lobster wallet info [--agent-id <id>]wallet list
List all stored wallets.
lobster wallet listwallet delete
Delete a stored wallet.
lobster wallet delete --agent-id <id> [--yes]Multi-agent support
Every command accepts --agent-id <id> to operate on a specific agent's wallet. The default agent ID is "main". Each agent has its own keypair, tokens, and smart wallet.
Library usage
The package also exports all core functions for programmatic use:
import {
parseConfig,
getOrCreateWallet,
ensureAuthenticated,
withAuthenticatedApi,
getWalletBalance,
createTransaction,
approveTransaction,
runSetupFlow,
} from "@crossmint/lobster-cli";See src/index.ts for the full list of exports.
Storage
Wallets are stored at ~/.openclaw/lobster-cash/wallets.json (mode 0600). Override the directory with the LOBSTER_CASH_WALLETS_DIR environment variable.
Output
All commands output JSON by default for easy piping and scripting. Pass --human for formatted text output.
License
MIT
