10 releases

Uses new Rust 2024

0.1.4 Apr 2, 2026
0.1.3 Apr 1, 2026
0.1.2 Mar 31, 2026
0.0.5 Mar 28, 2026

#14 in #key-gen

Download history 538/week @ 2026-04-06 104/week @ 2026-04-13 148/week @ 2026-04-20 284/week @ 2026-04-27 139/week @ 2026-05-04 91/week @ 2026-05-11 94/week @ 2026-05-18 108/week @ 2026-05-25 96/week @ 2026-06-01

405 downloads per month

MIT license

190KB
4.5K SLoC

legend-cli

CLI binary and MCP server for Legend. Earn yield, trade RWAs, and more — without worrying about blockchains, bridges, or protocols.

This is the main entry point for the legend-cli workspace. For installation and getting started, see the top-level README.

Usage

legend-cli login                      # authenticate via Google SSO
legend-cli accounts list              # list sub-accounts
legend-cli accounts create --keygen   # create account with a new P256 key
legend-cli folio <account_id>         # view portfolio

legend-cli plan earn <id> --amount 1000 --asset usdc --network base --protocol aave_v3 --execute
legend-cli plan swap <id> --sell-asset usdc --buy-asset weth --sell-amount 500 --network base --execute
legend-cli plan transfer <id> --amount 100 --asset usdc --network base --recipient 0x... --execute

legend-cli mcp serve                  # run as MCP server (stdio)

Pass --execute to create, sign, and submit a plan in one step.

Configuration

Profiles are stored in ~/.legend/<env>/profiles/<name>.json. The CLI supports multiple environments (--dev, --stage, --prod) and named profiles (--profile <name>).

Global flags

Flag Description
--profile <name> Use a named profile (default: default)
--key <key> Override the query key
--dev / --stage / --prod Target environment
--json Force JSON output
--quiet Minimal output (IDs only)
-v / --verbose Log HTTP requests to stderr

License

MIT

Dependencies

~16–25MB
~427K SLoC