@layerhop/cli

LayerHop from your terminal. Quote swaps, track orders, print deep links, scaffold a project and run
a local mock API.
Never holds keys. The CLI quotes, builds links and tracks orders. It never signs or sends
transactions; your wallet does that.
Install
npm install -g @layerhop/cli
layerhop --help
Node 20+. The package is a single file with no runtime dependencies.
Commands
layerhop chains
layerhop tokens base
layerhop quote 100 USDC base SOL solana --sender 0x… --recipient 9WzD…
layerhop quote 100000000 USDC base SOL solana --base-units --sender 0x… --recipient 9WzD… --json
layerhop status relay 0x… --watch
layerhop link 100 USDC base SOL solana --ref x
layerhop link 100 USDC arbitrum USDC base --embed --theme light --lock-dst
layerhop init next my-app
layerhop devnet
quote takes the amount in human units (100 = 100 USDC) and converts it to base units from
the built-in token list. For tokens that aren't on the list, pass base units with --base-units.
Options: --slippage-bps, --integrator.
status --watch prints each state change. It exits 0 on filled and 1 on refunded / failed.
link follows the URL contract: amounts in human
units, plus --recipient, --slippage-bps, --ref, --integrator. With --embed you can also
pass --theme, --accent, --radius, --lock-src, --lock-dst and --hide-history.
init [node|next] <dir> writes a minimal project that uses @layerhop/sdk. It refuses a
non-empty directory unless you pass --force.
devnet, run inside the LayerHop monorepo, starts @layerhop/api with
LAYERHOP_ENABLE_MOCK=1 PROVIDERS=mock. Point clients at it with
LAYERHOP_API_URL=http://localhost:8787. Mock transactions are dummies: never broadcast them.
Global options: --api-url (env LAYERHOP_API_URL, default https://api.layerhop.com), --api-key
(env LAYERHOP_API_KEY), --json, --help, --version.
Exit codes: 0 ok, 1 API or order failure (error: CODE: message, plus a docs link), 2 usage error.
License
MIT