Gator CLI
/install gator-cli
Quick Reference
Use this skill to run the gator CLI from the repo and to choose the correct command/flags for delegation workflows.
Installation
npm install -g @metamask/gator-cli
CLI Overview
- Binary name:
gator - Default profile:
default - Config path:
~/.gator-cli/permissions.json(or~/.gator-cli/profiles/\x3Cprofile-name>.json) - Delegations local cache:
~/.gator-cli/delegations/\x3Cprofile-name>.jsonwhen storage not configured
Configuration Requirements
Edit the profile config after gator init:
{
"delegationStorage": {
"apiKey": "your-api-key",
"apiKeyId": "your-api-key-id"
},
"rpcUrl": "https://your-rpc-url.com"
}
delegationStorageis optional; when missing, delegations are stored locally.rpcUrlis required for on-chain actions.
Commands
init
Generate a private key and save config. Errors if the profile already exists.
gator init [--chain \x3Cchain>] [--profile \x3Cprofile-name>]--chainvalues:base(default),baseSepolia,sepolia--profiledefault:default- Prints: address, chain, and config file path.
create
Upgrade an EOA to an EIP-7702 smart account. Uses the chain in your profile config.
gator create [--profile \x3Cprofile-name>]- Requires the account to be funded with native token first.
- Prints: address, chain, and the upgrade transaction hash.
show
Display the EOA address for a profile.
gator show [--profile \x3Cprofile-name>]
status
Check config and on-chain account status.
gator status [--profile \x3Cprofile-name>]- Prints: address, chain, config upgrade status, on-chain code presence, storage and RPC URL config.
balance
Show native balance and optional ERC-20 balance.
gator balance [--tokenAddress \x3Caddress>] [--profile \x3Cprofile-name>]- If
--tokenAddressis provided, prints ERC-20 balance and decimals-derived units.
grant
Create, sign, and store a delegation with a predefined scope.
gator grant --to \x3Cto-address> --scope \x3Ctype> [scope flags] [--profile \x3Cprofile-name>]
Scope flags:
- Token scopes:
--tokenAddress \x3Ctoken-address>,--maxAmount \x3Camount>,--tokenId \x3Cid> - Periodic scopes:
--periodAmount \x3Camount>,--periodDuration \x3Cseconds>,--startDate \x3Ctimestamp> - Streaming scopes:
--amountPerSecond \x3Camount>,--initialAmount \x3Camount>,--startTime \x3Ctimestamp> - Function call scope:
--targets \x3Caddresses>,--selectors \x3Csigs>,--valueLte \x3Cether> - Ownership transfer:
--contractAddress \x3Ccontract-address>
Supported scopes:
erc20TransferAmounterc20PeriodTransfererc20Streamingerc721TransfernativeTokenTransferAmountnativeTokenPeriodTransfernativeTokenStreamingfunctionCallownershipTransfer
Grant flags per scope:
| Scope | Required Flags | Optional Flags |
|---|---|---|
erc20TransferAmount |
--tokenAddress, --maxAmount |
|
erc20PeriodTransfer |
--tokenAddress, --periodAmount, --periodDuration |
--startDate |
erc20Streaming |
--tokenAddress, --amountPerSecond, --initialAmount, --maxAmount |
--startTime |
erc721Transfer |
--tokenAddress, --tokenId |
|
nativeTokenTransferAmount |
--maxAmount |
|
nativeTokenPeriodTransfer |
--periodAmount, --periodDuration |
--startDate |
nativeTokenStreaming |
--amountPerSecond, --initialAmount, --maxAmount |
--startTime |
functionCall |
--targets, --selectors |
--valueLte |
ownershipTransfer |
--contractAddress |
--startDateand--startTimedefault to the current time (unix seconds) when omitted.--valueLtesets the max native token value per call forfunctionCallscopes.
redeem
Redeem a stored delegation using a specific action type.
gator redeem --from \x3Cfrom-address> --action \x3Ctype> [action flags] [--profile \x3Cprofile-name>]
Supported action types: erc20Transfer, erc721Transfer, nativeTransfer, functionCall, ownershipTransfer, raw
Action-specific flags:
erc20Transfer:--tokenAddress,--to,--amounterc721Transfer:--tokenAddress,--to,--tokenIdnativeTransfer:--to,--amountfunctionCall:--target,--function,--args,--valueownershipTransfer:--contractAddress,--toraw:--target,--callData,--value
revoke
Revoke a delegation on-chain. Revokes the first matching delegation.
gator revoke --to \x3Cto-address> [--profile \x3Cprofile-name>]
inspect
Inspect delegations for your account.
gator inspect [--from \x3Cfrom-address>] [--to \x3Cto-address>] [--profile \x3Cprofile-name>]- With no filters, prints both Given and Received.
- Printed fields: From, To, Authority, Caveats count, Signed flag.
Redeem Flags per Action
| Action | Required Flags |
|---|---|
erc20Transfer |
--tokenAddress, --to, --amount |
erc721Transfer |
--tokenAddress, --to, --tokenId |
nativeTransfer |
--to, --amount |
functionCall |
--target, --function, --args |
ownershipTransfer |
--contractAddress, --to |
raw |
--target, --callData |
Example Flows
Initialize and upgrade:
gator init --profile \x3Cprofile-name>
gator create --profile \x3Cprofile-name>
Grant an ERC-20 transfer delegation:
gator grant --profile \x3Cprofile-name> --to \x3Cto-address> --scope erc20TransferAmount \
--tokenAddress \x3Ctoken-address> --maxAmount 50
Redeem an ERC-20 transfer:
gator redeem --profile \x3Cprofile-name> --from \x3Cfrom-address> --action erc20Transfer \
--tokenAddress \x3Ctoken-address> --to \x3Cto-address> --amount 10
Redeem a native transfer:
gator redeem --profile \x3Cprofile-name> --from \x3Cfrom-address> --action nativeTransfer \
--to \x3Cto-address> --amount 0.5
Redeem in raw mode:
gator redeem --profile \x3Cprofile-name> --from \x3Cfrom-address> --action raw \
--target \x3Ccontract-address> --callData 0xa9059cbb...
Inspect delegations:
gator inspect --profile \x3Cprofile-name>
gator inspect --profile \x3Cprofile-name> --from \x3Cfrom-address>
gator inspect --profile \x3Cprofile-name> --to \x3Cto-address>
Revoke a delegation:
gator revoke --profile \x3Cprofile-name> --to \x3Cto-address>
Operational Notes
- Private key security: This is alpha version. Private keys are stored in plaintext JSON. Never use accounts with significant funds.
--fromrefers to the delegator address;--torefers to the delegate/recipient.--targetsand--selectorsare comma-separated lists.--functionaccepts a human-readable Solidity function signature like"approve(address,uint256)". Do not pass a 4-byte selector (e.g.0x095ea7b3) — the CLI derives the selector from the signature automatically.--startDateand--startTimeaccept unix timestamps in seconds. When omitted, they default to the current time.--actionis required forredeemand must be one of:erc20Transfer,erc721Transfer,nativeTransfer,functionCall,ownershipTransfer,raw.- Supported chains for
--chainingator init:base(default),baseSepolia,sepolia.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install gator-cli - After installation, invoke the skill by name or use
/gator-cli - Provide required inputs per the skill's parameter spec and get structured output
What is Gator CLI?
Use when you need to operate the @metamask/gator-cli to initialize profiles, upgrade EOA to EIP-7702, grant, redeem, and revoke ERC-7710 delegations, or insp... It is an AI Agent Skill for Claude Code / OpenClaw, with 631 downloads so far.
How do I install Gator CLI?
Run "/install gator-cli" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Gator CLI free?
Yes, Gator CLI is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Gator CLI support?
Gator CLI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Gator CLI?
It is built and maintained by AyushBherwani1998 (@ayushbherwani1998); the current version is v1.0.1.