Quick Reference
Use this skill to run the gator CLI from the repo and to choose the correct command/flags for delegation workflows.
CLI Overview
- Binary name:
gator
- Default profile:
default
- Config path:
~/.gator-cli/permissions.json (or ~/.gator-cli/profiles/<profile-name>.json)
- Delegations local cache:
~/.gator-cli/delegations/<profile-name>.json when 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"
}
delegationStorage is optional; when missing, delegations are stored locally.
rpcUrl is required for on-chain actions.
- If you need a storage API key, tag
@osobotai on X.
Commands
init
Generate a private key and save config. Errors if the profile already exists.
gator init [--chain <chain>] [--profile <profile-name>]
--chain values: base, sepolia (default: base)
--profile default: 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 <profile-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 <profile-name>]
status
Check config and on-chain account status.
gator status [--profile <profile-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 <address>] [--profile <profile-name>]
- If
--tokenAddress is provided, prints ERC-20 balance and decimals-derived units.
grant
Create, sign, and store a delegation with a predefined scope.
gator grant --to <to-address> --scope <type> [scope flags] [--profile <profile-name>]
Scope flags:
- Token scopes:
--tokenAddress <token-address>, --maxAmount <amount>, --tokenId <id>
- Periodic scopes:
--periodAmount <amount>, --periodDuration <seconds>, --startDate <timestamp>
- Streaming scopes:
--amountPerSecond <amount>, --initialAmount <amount>, --startTime <timestamp>
- Function call scope:
--targets <addresses>, --selectors <sigs>
- Ownership transfer:
--contractAddress <contract-address>
- Additional:
--valueLte <ether> for functionCall
Supported scopes:
erc20TransferAmount
erc20PeriodTransfer
erc20Streaming
erc721Transfer
nativeTokenTransferAmount
nativeTokenPeriodTransfer
nativeTokenStreaming
functionCall
ownershipTransfer
Grant flags per scope:
| Scope |
Required Flags |
erc20TransferAmount |
--tokenAddress, --maxAmount |
erc20PeriodTransfer |
--tokenAddress, --periodAmount, --periodDuration |
erc20Streaming |
--tokenAddress, --amountPerSecond, --initialAmount, --maxAmount |
erc721Transfer |
--tokenAddress, --tokenId |
nativeTokenTransferAmount |
--maxAmount |
nativeTokenPeriodTransfer |
--periodAmount, --periodDuration |
nativeTokenStreaming |
--amountPerSecond, --initialAmount, --maxAmount |
functionCall |
--targets, --selectors |
ownershipTransfer |
--contractAddress |
redeem
Redeem a stored delegation using a specific action type.
gator redeem --from <from-address> --action <type> [action flags] [--profile <profile-name>]
Supported action types: erc20Transfer, erc721Transfer, nativeTransfer, functionCall, ownershipTransfer, raw
Action-specific flags:
erc20Transfer: --tokenAddress, --to, --amount
erc721Transfer: --tokenAddress, --to, --tokenId
nativeTransfer: --to, --amount
functionCall: --target, --function, --args, --value
ownershipTransfer: --contractAddress, --to
raw: --target, --callData, --value
revoke
Revoke a delegation on-chain. Revokes the first matching delegation.
gator revoke --to <to-address> [--profile <profile-name>]
inspect
Inspect delegations for your account.
gator inspect [--from <from-address>] [--to <to-address>] [--profile <profile-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 <profile-name>
gator create --profile <profile-name>
Grant an ERC-20 transfer delegation:
gator grant --profile <profile-name> --to <to-address> --scope erc20TransferAmount \
--tokenAddress <token-address> --maxAmount 50
Redeem an ERC-20 transfer:
gator redeem --profile <profile-name> --from <from-address> --action erc20Transfer \
--tokenAddress <token-address> --to <to-address> --amount 10
Redeem a native transfer:
gator redeem --profile <profile-name> --from <from-address> --action nativeTransfer \
--to <to-address> --amount 0.5
Redeem in raw mode:
gator redeem --profile <profile-name> --from <from-address> --action raw \
--target <contract-address> --callData 0xa9059cbb...
Inspect delegations:
gator inspect --profile <profile-name>
gator inspect --profile <profile-name> --from <from-address>
gator inspect --profile <profile-name> --to <to-address>
Revoke a delegation:
gator revoke --profile <profile-name> --to <to-address>
Operational Notes
--from refers to the delegator address; --to refers to the delegate/recipient.
--targets and --selectors are comma-separated lists.
--function accepts a signature string like "approve(address,uint256)".
--action is required for redeem and must be one of: erc20Transfer, erc721Transfer, nativeTransfer, functionCall, ownershipTransfer, raw.
1---2name: gator-cli3description: 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 inspect balances and delegations. Covers commands, required flags, grant scopes, redeem action types, configuration locations, and common usage flows.4---56## Quick Reference78Use this skill to run the gator CLI from the repo and to choose the correct command/flags for delegation workflows.910## CLI Overview1112- Binary name: `gator`13- Default profile: `default`14- Config path: `~/.gator-cli/permissions.json` (or `~/.gator-cli/profiles/<profile-name>.json`)15- Delegations local cache: `~/.gator-cli/delegations/<profile-name>.json` when storage not configured1617## Configuration Requirements1819Edit the profile config after `gator init`:2021```json22{23 "delegationStorage": {24 "apiKey": "your-api-key",25 "apiKeyId": "your-api-key-id"26 },27 "rpcUrl": "https://your-rpc-url.com"28}29```3031- `delegationStorage` is optional; when missing, delegations are stored locally.32- `rpcUrl` is required for on-chain actions.33- If you need a storage API key, tag `@osobotai` on X.3435## Commands3637### init3839Generate a private key and save config. Errors if the profile already exists.4041- `gator init [--chain <chain>] [--profile <profile-name>]`42- `--chain` values: `base`, `sepolia` (default: `base`)43- `--profile` default: `default`44- Prints: address, chain, and config file path.4546### create4748Upgrade an EOA to an EIP-7702 smart account. Uses the chain in your profile config.4950- `gator create [--profile <profile-name>]`51- Requires the account to be funded with native token first.52- Prints: address, chain, and the upgrade transaction hash.5354### show5556Display the EOA address for a profile.5758- `gator show [--profile <profile-name>]`5960### status6162Check config and on-chain account status.6364- `gator status [--profile <profile-name>]`65- Prints: address, chain, config upgrade status, on-chain code presence, storage and RPC URL config.6667### balance6869Show native balance and optional ERC-20 balance.7071- `gator balance [--tokenAddress <address>] [--profile <profile-name>]`72- If `--tokenAddress` is provided, prints ERC-20 balance and decimals-derived units.7374### grant7576Create, sign, and store a delegation with a predefined scope.7778- `gator grant --to <to-address> --scope <type> [scope flags] [--profile <profile-name>]`7980Scope flags:8182- Token scopes: `--tokenAddress <token-address>`, `--maxAmount <amount>`, `--tokenId <id>`83- Periodic scopes: `--periodAmount <amount>`, `--periodDuration <seconds>`, `--startDate <timestamp>`84- Streaming scopes: `--amountPerSecond <amount>`, `--initialAmount <amount>`, `--startTime <timestamp>`85- Function call scope: `--targets <addresses>`, `--selectors <sigs>`86- Ownership transfer: `--contractAddress <contract-address>`87- Additional: `--valueLte <ether>` for `functionCall`8889Supported scopes:9091- `erc20TransferAmount`92- `erc20PeriodTransfer`93- `erc20Streaming`94- `erc721Transfer`95- `nativeTokenTransferAmount`96- `nativeTokenPeriodTransfer`97- `nativeTokenStreaming`98- `functionCall`99- `ownershipTransfer`100101Grant flags per scope:102103| Scope | Required Flags |104| --------------------------- | ----------------------------------------------------------------------- |105| `erc20TransferAmount` | `--tokenAddress`, `--maxAmount` |106| `erc20PeriodTransfer` | `--tokenAddress`, `--periodAmount`, `--periodDuration` |107| `erc20Streaming` | `--tokenAddress`, `--amountPerSecond`, `--initialAmount`, `--maxAmount` |108| `erc721Transfer` | `--tokenAddress`, `--tokenId` |109| `nativeTokenTransferAmount` | `--maxAmount` |110| `nativeTokenPeriodTransfer` | `--periodAmount`, `--periodDuration` |111| `nativeTokenStreaming` | `--amountPerSecond`, `--initialAmount`, `--maxAmount` |112| `functionCall` | `--targets`, `--selectors` |113| `ownershipTransfer` | `--contractAddress` |114115### redeem116117Redeem a stored delegation using a specific action type.118119- `gator redeem --from <from-address> --action <type> [action flags] [--profile <profile-name>]`120121Supported action types: `erc20Transfer`, `erc721Transfer`, `nativeTransfer`, `functionCall`, `ownershipTransfer`, `raw`122123Action-specific flags:124125- `erc20Transfer`: `--tokenAddress`, `--to`, `--amount`126- `erc721Transfer`: `--tokenAddress`, `--to`, `--tokenId`127- `nativeTransfer`: `--to`, `--amount`128- `functionCall`: `--target`, `--function`, `--args`, `--value`129- `ownershipTransfer`: `--contractAddress`, `--to`130- `raw`: `--target`, `--callData`, `--value`131132### revoke133134Revoke a delegation on-chain. Revokes the first matching delegation.135136- `gator revoke --to <to-address> [--profile <profile-name>]`137138### inspect139140Inspect delegations for your account.141142- `gator inspect [--from <from-address>] [--to <to-address>] [--profile <profile-name>]`143- With no filters, prints both Given and Received.144- Printed fields: From, To, Authority, Caveats count, Signed flag.145146## Redeem Flags per Action147148| Action | Required Flags |149| ------------------- | ------------------------------------- |150| `erc20Transfer` | `--tokenAddress`, `--to`, `--amount` |151| `erc721Transfer` | `--tokenAddress`, `--to`, `--tokenId` |152| `nativeTransfer` | `--to`, `--amount` |153| `functionCall` | `--target`, `--function`, `--args` |154| `ownershipTransfer` | `--contractAddress`, `--to` |155| `raw` | `--target`, `--callData` |156157## Example Flows158159Initialize and upgrade:160161```bash162gator init --profile <profile-name>163gator create --profile <profile-name>164```165166Grant an ERC-20 transfer delegation:167168```bash169gator grant --profile <profile-name> --to <to-address> --scope erc20TransferAmount \170 --tokenAddress <token-address> --maxAmount 50171```172173Redeem an ERC-20 transfer:174175```bash176gator redeem --profile <profile-name> --from <from-address> --action erc20Transfer \177 --tokenAddress <token-address> --to <to-address> --amount 10178```179180Redeem a native transfer:181182```bash183gator redeem --profile <profile-name> --from <from-address> --action nativeTransfer \184 --to <to-address> --amount 0.5185```186187Redeem in raw mode:188189```bash190gator redeem --profile <profile-name> --from <from-address> --action raw \191 --target <contract-address> --callData 0xa9059cbb...192```193194Inspect delegations:195196```bash197gator inspect --profile <profile-name>198gator inspect --profile <profile-name> --from <from-address>199gator inspect --profile <profile-name> --to <to-address>200```201202Revoke a delegation:203204```bash205gator revoke --profile <profile-name> --to <to-address>206```207208## Operational Notes209210- `--from` refers to the delegator address; `--to` refers to the delegate/recipient.211- `--targets` and `--selectors` are comma-separated lists.212- `--function` accepts a signature string like `"approve(address,uint256)"`.213- `--action` is required for `redeem` and must be one of: `erc20Transfer`, `erc721Transfer`, `nativeTransfer`, `functionCall`, `ownershipTransfer`, `raw`.