For the complete documentation index, see llms.txt. This page is also available as Markdown.

MOSS CLI

Command-line access to a MOSS account — scoped delegated keys, transfers, contract calls, and automation from the terminal.

The MOSS CLI (mega) brings MOSS account access to the terminal: connect a passkey account, create scoped delegated keys, inspect live permissions, and submit reads or writes from a shell or automation workflow. Every write runs through a delegated key bounded by spend limits, allowed calls, and expiry — the same Smart Approvals session-key model the SDK uses.

Source: megaeth-labs/wallet-cli.

Install

curl -fsSL https://account.megaeth.com/install | sh

The installer verifies the release checksum, installs the mega command, and installs the bundled agent skill. Pin a specific release with sh -- --version v0.1.0. To build from source (requires Node.js 22+ and pnpm):

git clone https://github.com/megaeth-labs/wallet-cli
cd wallet-cli
pnpm install
pnpm build
./scripts/install.sh

Update later with mega moss update (use --check to check without installing).

Account and Key Model

The CLI is not a root wallet or passkey manager — your passkey stays in MegaETH Wallet. mega moss login opens account.megaeth.com and stores a local account profile; it does not create a write-capable key. The CLI only stores delegated session-key material after you approve it in the browser.

Delegated keys are bounded by:

  • expiry

  • token/native spend limits

  • allowed contract calls

  • account and relay enforcement

This is the same permission shape as mega.grantPermissions(): --allow-call maps to the canonical { to, signature } call matcher and --spend-limit to scoped spend caps. See Smart Approvals (Policy Engine) for the model.

Commands

Command
Purpose

login / logout

Connect this machine to your MOSS account / delete the local profile and key material.

whoami

Show the connected account and active delegated key.

list

List delegated keys (--show-inactive includes revoked keys).

permissions <addr>

Show approved scope and live on-chain spend remaining.

switch <addr>

Select the active delegated key.

label <addr> "<name>"

Label a key.

create-key

Create a scoped delegated key with spend limits and call permissions.

revoke <addr>

Revoke a delegated key on-chain (after browser confirmation).

call

Read-only contract call (raw or ABI mode).

execute

Submit a write / transaction (single or batched).

transfer

Transfer native ETH or an ERC-20 token.

fund

Open the account funding flow.

debug

Inspect local profile health without printing key material.

update

Update the CLI and bundled agent skill.

Run mega moss --help or mega moss <command> --help for full flags.

Quick Start

Each --spend-limit is <token>:<amount>:<period> — use 0x0000000000000000000000000000000000000000 for native ETH; period is minute, hour, day, week, month, or year. Each --allow-call is <contract>:<signature>; write keys must declare explicit call scope. For native ETH transfer targets, scope the no-calldata selector 0xe0e0e0e0.

Reads and Writes

Spend permission is not call permission — select or create a key whose spend limits and call scopes both cover the operation.

Scripting and Agents

Human-readable output is the default. For scripts, CI, and agents, use machine output:

--json returns structured data (authorizedKey.permissions.spend is the stored request; spendInfos[].remaining is the live remaining capacity); --terse is compact tab-delimited. The installer also ships a bundled agent skill, so coding agents can drive the CLI directly.

Last updated