You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# MetaMask Agent CLI Skills
2
2
3
-
SKILLs for the MetaMask Agent CLI (`@metamask/agentic-cli`v2.0.0). These skills enable AI agents to authenticate, manage wallets, swap tokens, bridge across chains, trade perpetual futures, and more using the MetaMask Agent CLI.
3
+
SKILLs for the MetaMask Agent CLI (`@metamask/agentic-cli`v3.0.0). These skills enable AI agents to authenticate, manage wallets, swap tokens, bridge across chains, trade perpetual futures, and more using the MetaMask Agent CLI.
| Show CLI configuration |`mm config get`|[auth.md](references/auth.md)|
@@ -154,7 +153,7 @@ Run these checks before the first CLI operation in a session, in order.
154
153
155
154
### 1. Version compatibility
156
155
157
-
This skill is written for `@metamask/agentic-cli`**v2.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
156
+
This skill is written for `@metamask/agentic-cli`**v3.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
158
157
159
158
```bash
160
159
mm --version
@@ -168,7 +167,7 @@ npm view @metamask/agentic-cli version
168
167
169
168
If the installed `major.minor` differs from the pinned `cliVersion`, or the installed version is behind the latest release, warn the user once and continue:
170
169
171
-
> Version mismatch: installed CLI `<installed>`, this skill is pinned to `2.0.0`, latest release is `<latest>`. Command syntax in this skill may be inaccurate until they are aligned. Update the CLI with `npm install -g @metamask/agentic-cli@latest`, then re-install the skills with `npx skills add metaMask/agent-skills`.
170
+
> Version mismatch: installed CLI `<installed>`, this skill is pinned to `3.0.0`, latest release is `<latest>`. Command syntax in this skill may be inaccurate until they are aligned. Update the CLI with `npm install -g @metamask/agentic-cli@latest`, then re-install the skills with `npx skills add metaMask/agent-skills`.
172
171
173
172
Run this check once per session. Do not block operations on it.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/references/auth.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,12 +60,12 @@ mm init show
60
60
61
61
## `login` Command
62
62
63
-
Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (MetaMask Mobile QR, Google, or email). QR is recommended but not auto-selected.
63
+
Sign in to the CLI. On a TTY, bare `mm login` shows a method picker (MetaMask Mobile QRor browser). QR is recommended but not auto-selected. `mm login browser` covers both Google and Email — the user picks interactively in the browser.
mm login [qr |browser] [--token <token>] [--timeout <seconds>] [--no-wait]
69
69
```
70
70
71
71
### Supported Flags
@@ -79,19 +79,18 @@ mm login [qr | google | email] [--token <token>] [--timeout <seconds>] [--no-wai
79
79
### Example
80
80
81
81
```bash
82
-
mm login --no-wait
83
-
mm login google --no-wait
84
-
mm login email --no-wait
82
+
mm login browser --no-wait
85
83
mm login --token "cliToken:cliRefreshToken"
86
84
```
87
85
88
86
### Note
89
87
90
88
- If already authenticated, the CLI returns `ALREADY_AUTHENTICATED`. Run `mm logout` first, then log in again.
91
-
-`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat). On production it returns `COMING_SOON`; use Google or email sign-in instead.
89
+
-`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat). On production it returns `COMING_SOON`; use browser sign-in instead.
92
90
- Pairing codes tolerate `-` and whitespace separators (e.g. `608-225` is equivalent to `608225`).
93
-
- Use `mm login google --no-wait`or `mm login email --no-wait`for non-interactive/CI flows. Bare `mm login --no-wait` fails without a TTY because no method is selected.
91
+
- Use `mm login browser --no-wait` for non-interactive/CI flows. The command prints a sign-in URL; the user completes login in the browser (Google or Email). Bare `mm login --no-wait` fails without a TTY because no method is selected.
94
92
-`--no-wait` is not supported with QR login. Complete authentication later with `mm login --token`.
93
+
- After a successful login in server-wallet mode, the CLI automatically syncs existing wallets from the server. Run `mm wallet list` immediately — no need to re-run `mm init`. In BYOK mode, no sync occurs; run `mm init` to configure the wallet.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/login.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,19 @@ Reference command syntax in `references/auth.md`.
6
6
7
7
## Flow
8
8
9
-
1. Ask the user which login method they want: MetaMask Mobile QR, Google, or Email.
9
+
1. Ask the user which login method they want: MetaMask Mobile QR or browser (Google / Email).
10
10
2. Execute login.
11
11
3. Verify with token.
12
12
13
13
## Login
14
14
15
-
For non-interactive/CI flows, use Google or email with `--no-wait`:
15
+
For non-interactive/CI flows, use `mm login browser --no-wait`:
16
16
17
17
```bash
18
-
mm login google --no-wait
19
-
mm login email --no-wait
18
+
mm login browser --no-wait
20
19
```
21
20
22
-
The command prints a sign-in URL.
21
+
The command prints a sign-in URL. The user opens it in a browser and chooses Google or Email to complete sign-in.
23
22
24
23
`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`. QR login keeps the CLI attached to the relay, so it does not support `--no-wait`.
25
24
@@ -33,6 +32,8 @@ mm login --token "<TOKEN>"
33
32
34
33
## Confirm
35
34
35
+
Run `mm doctor` to verify the session is ready. It reports `authenticated` and `initialized` booleans. Do not proceed until both are `true`. If `initialized` is `false`, follow `workflows/onboarding.md` to run `mm init`.
Copy file name to clipboardExpand all lines: skills/metamask-agent-wallet/workflows/onboarding.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,15 @@ Then run the version compatibility check from the skill `Preflight` section: com
24
24
25
25
## Login Flow
26
26
27
-
Ask the user which login method they want to use: MetaMask Mobile QR, Google, or Email. QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to Google or email there.
27
+
Ask the user which login method they want to use: MetaMask Mobile QR or browser (Google or Email). QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to browser login there.
28
28
29
29
### Login
30
30
31
31
```bash
32
-
mm login google --no-wait
33
-
mm login email --no-wait
32
+
mm login browser --no-wait
34
33
```
35
34
36
-
Use `--no-wait` for non-interactive environments. The command prints a sign-in URL.
35
+
Use `--no-wait` for non-interactive environments. The command prints a sign-in URL; the user completes sign-in in the browser using Google or Email.
Copy file name to clipboardExpand all lines: skills/metamask-agent-workflows/SKILL.md
+16-7Lines changed: 16 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ description: Use when the user needs to perform multi-step operations with the M
4
4
license: MIT
5
5
metadata:
6
6
author: metamask
7
-
version: "3.0.0"
8
-
cliVersion: "2.0.0"
7
+
version: "4.0.0"
8
+
cliVersion: "3.0.0"
9
9
---
10
10
11
11
# MetaMask Agent Workflows
@@ -47,7 +47,7 @@ Run these checks before the first CLI operation in a session, in order.
47
47
48
48
### 1. Version compatibility
49
49
50
-
This skill is written for `@metamask/agentic-cli`**v2.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
50
+
This skill is written for `@metamask/agentic-cli`**v3.0.0** (see `cliVersion` in the frontmatter). Check the installed version:
51
51
52
52
```bash
53
53
mm --version
@@ -61,17 +61,26 @@ npm view @metamask/agentic-cli version
61
61
62
62
If the installed `major.minor` differs from the pinned `cliVersion`, or the installed version is behind the latest release, warn the user once and continue:
63
63
64
-
> Version mismatch: installed CLI `<installed>`, this skill is pinned to `2.0.0`, latest release is `<latest>`. Command syntax in this skill may be inaccurate until they are aligned. Update the CLI with `npm install -g @metamask/agentic-cli@latest`, then re-install the skills with `npx skills add metaMask/agent-skills`.
64
+
> Version mismatch: installed CLI `<installed>`, this skill is pinned to `3.0.0`, latest release is `<latest>`. Command syntax in this skill may be inaccurate until they are aligned. Update the CLI with `npm install -g @metamask/agentic-cli@latest`, then re-install the skills with `npx skills add metaMask/agent-skills`.
65
65
66
66
Run this check once per session. Do not block operations on it.
`mm doctor` is the single readiness check. Run it before the first CLI operation in a session:
69
71
70
72
```bash
71
-
mm auth status
73
+
mm doctor
72
74
```
73
75
74
-
If the user is not authenticated, follow `workflows/onboarding.md` for first time setup, or `workflows/login.md` for login.
76
+
It reports an `authenticated` boolean, an `initialized` boolean, and a list of `hints`. **Do not run any other command until `mm doctor` reports both `authenticated: true` and `initialized: true`.** Authentication and initialization are independent gates: a session can be authenticated while the project has no wallet mode selected, in which case any command that needs a wallet aborts before running with `NOT_INITIALIZED` — "Project not initialized." (hint: Run `mm init` to set up wallet and trading modes.).
77
+
78
+
A project counts as initialized only when a wallet mode is set — and, for `server-wallet`, a trading mode is set as well (`byok` needs only the wallet mode). Do not use `mm init show` as the check: it requires an initialized project and throws `NOT_INITIALIZED` on an uninitialized one rather than reporting state.
79
+
80
+
Remediate, then **re-run `mm doctor` and confirm a clean result before doing anything else**:
81
+
82
+
-`authenticated: false` → follow `workflows/login.md` (or `workflows/onboarding.md` for first-time setup) to run `mm login`.
83
+
-`authenticated: true` and `initialized: false` → follow `workflows/onboarding.md` to run `mm init` and select a wallet mode (and a trading mode for server-wallet).
Copy file name to clipboardExpand all lines: skills/metamask-agent-workflows/workflows/login.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,19 @@ Reference command syntax in `references/auth.md`.
6
6
7
7
## Flow
8
8
9
-
1. Ask the user which login method they want: MetaMask Mobile QR, Google, or Email.
9
+
1. Ask the user which login method they want: MetaMask Mobile QR or browser (Google / Email).
10
10
2. Execute login.
11
11
3. Verify with token.
12
12
13
13
## Login
14
14
15
-
For non-interactive/CI flows, use Google or email with `--no-wait`:
15
+
For non-interactive/CI flows, use `mm login browser --no-wait`:
16
16
17
17
```bash
18
-
mm login google --no-wait
19
-
mm login email --no-wait
18
+
mm login browser --no-wait
20
19
```
21
20
22
-
The command prints a sign-in URL.
21
+
The command prints a sign-in URL. The user opens it in a browser and chooses Google or Email to complete sign-in.
23
22
24
23
`mm login qr` (scan with MetaMask Mobile) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`. QR login keeps the CLI attached to the relay, so it does not support `--no-wait`.
25
24
@@ -36,3 +35,7 @@ mm login --token "<TOKEN>"
36
35
```bash
37
36
mm auth status
38
37
```
38
+
39
+
## After Login
40
+
41
+
In server-wallet mode, wallets are automatically synced after a successful login. Run `mm wallet list` to see them — no need to run `mm init` if wallets already exist. If no wallets are synced, run `mm init` to create one.
Copy file name to clipboardExpand all lines: skills/metamask-agent-workflows/workflows/onboarding.md
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Reference command syntax in `references/auth.md` and `references/wallet.md`.
9
9
1. Check CLI installation.
10
10
2. Login.
11
11
3. Initialize wallet mode.
12
-
4. Verify auth status.
12
+
4. Verify readiness.
13
13
5. Show wallet address.
14
14
15
15
## Check CLI Installation
@@ -24,16 +24,15 @@ Then run the version compatibility check from the skill `Preflight` section: com
24
24
25
25
## Login Flow
26
26
27
-
Ask the user which login method they want to use: MetaMask Mobile QR, Google, or Email. QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to Google or email there.
27
+
Ask the user which login method they want to use: MetaMask Mobile QR or browser (Google or Email). QR (`mm login qr`) is available on non-production builds (dev/uat); on production it returns `COMING_SOON`, so fall back to browser login there.
28
28
29
29
### Login
30
30
31
31
```bash
32
-
mm login google --no-wait
33
-
mm login email --no-wait
32
+
mm login browser --no-wait
34
33
```
35
34
36
-
Use `--no-wait` for non-interactive environments. The command prints a sign-in URL.
35
+
Use `--no-wait` for non-interactive environments. The command prints a sign-in URL; the user completes sign-in in the browser using Google or Email.
37
36
38
37
### Verify
39
38
@@ -45,13 +44,13 @@ mm login --token "<TOKEN>"
45
44
46
45
## Initialize Project
47
46
48
-
First check if the project is already initialized:
47
+
First check whether the project is already initialized with `mm doctor` (read its `initialized` boolean):
49
48
50
49
```bash
51
-
mm init show
50
+
mm doctor
52
51
```
53
52
54
-
If already initialized, skip this step.
53
+
If `initialized` is `true`, skip this step.
55
54
56
55
For server-wallet mode, if the account already has a remote wallet, `mm init` syncs it and reuses the existing trading mode — no trading-mode prompt.
57
56
@@ -94,13 +93,13 @@ mm wallet password set
94
93
95
94
Once the mnemonic is encrypted, all subsequent operations that need the private key require the `MM_PASSWORD` environment variable to be set. Never instruct the user to pass `--password` inline.
96
95
97
-
## Verify Auth Status
96
+
## Verify Readiness
98
97
99
98
```bash
100
-
mm auth status
99
+
mm doctor
101
100
```
102
101
103
-
Confirm the session is authenticated, the wallet mode is correct, and the token is valid.
102
+
Confirm `mm doctor` reports both `authenticated: true` and `initialized: true` with no blocking hints before proceeding. (`mm auth status` reports only authentication and does not reflect initialization, so it cannot confirm readiness on its own.)
0 commit comments