MOSS CLI
Command-line access to a MOSS account — scoped delegated keys, transfers, contract calls, and automation from the terminal.
Last updated
# Connect this machine to your MOSS account
mega moss login
# Confirm the connected account and active key
mega moss whoami
# Create a scoped key: 25 USDm/week, only the transfer() call
mega moss create-key \
--spend-limit 0xfafddbb3fc7688494971a79cc65dca3ef82079e7:25:week \
--allow-call '0xfafddbb3fc7688494971a79cc65dca3ef82079e7:transfer(address,uint256)' \
--label usdm-transfer
# Send through the active delegated key
mega moss transfer \
--token 0xfafddbb3fc7688494971a79cc65dca3ef82079e7 \
--to 0xRecipient \
--amount 1# Read-only call (no write key needed)
mega moss call --to 0xContract --abi ./erc20.json --function balanceOf --args '["0xUser"]'
# Single write
mega moss execute --to 0xContract --data 0x --value 0
# Batched writes from a file, through a specific key
mega moss execute --key 0xKEY_OR_ACCESS_ADDRESS --calls ./calls.jsonmega moss whoami --json
mega moss list --json
mega moss permissions 0xKEY_OR_ACCESS_ADDRESS --terse