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
+41-13Lines changed: 41 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,21 +39,23 @@ alchemy completions fish > ~/.config/fish/completions/alchemy.fish
39
39
40
40
### Authentication Quick Start
41
41
42
-
Authentication is required before making requests. Configure auth first, then run commands.
43
-
44
-
If you are using the CLI as a human in an interactive terminal, the easiest path is:
42
+
Authentication is required before making requests. The recommended path is browser login:
45
43
46
44
```bash
47
-
alchemy
45
+
alchemy auth
48
46
```
49
47
50
-
Then follow the setup flow in the terminal UI to configure auth.
48
+
This opens a browser to link your Alchemy account, then prompts you to select an app. The selected app's API key is saved to your config automatically. Pass `-y` to skip the confirmation prompt.
49
+
50
+
If you run `alchemy` with no command and no auth configured, the CLI will guide you through browser login automatically.
51
+
52
+
If you have an auth token but haven't selected an app yet, the CLI will prompt you to pick one before running any command that requires an API key. Teams with many apps can type to search by name.
51
53
52
-
Know which auth method does what:
54
+
Other auth methods are available for specific use cases:
53
55
54
-
-**API key**- direct auth for blockchain queries (`balance`, `tx`, `block`, `nfts`, `tokens`, `rpc`)
55
-
-**Access key**- Admin/API app management; app setup/selection can also provide API key auth for blockchain queries
56
-
-**x402 wallet auth**- wallet-authenticated, pay-per-request model for supported blockchain queries
56
+
-**API key**— direct auth for blockchain queries (`balance`, `tx`, `block`, `nfts`, `tokens`, `rpc`)
57
+
-**Access key**— AdminAPI app management; app setup/selection can also provide API key auth for blockchain queries
58
+
-**x402 wallet auth**— wallet-authenticated, pay-per-request model for supported blockchain queries
57
59
58
60
If you use Notify webhooks, add webhook auth on top via `alchemy config set webhook-api-key <key>`, `--webhook-api-key`, or `ALCHEMY_WEBHOOK_API_KEY`.
59
61
@@ -165,6 +167,9 @@ Use `alchemy help` or `alchemy help <command>` for generated command help.
- API key for blockchain queries (`balance`, `tx`, `block`, `nfts`, `tokens`, `rpc`)
264
-
- Access key for Admin API operations (`apps`, `chains`, configured network lookups`) and app setup/selection, which can also supply the API key used by blockchain query commands
265
-
- x402 wallet key for wallet-authenticated blockchain queries in a pay-per-request model
269
+
-**Browser login** (recommended) — log in via `alchemy auth`, then select an app to automatically configure your API key
270
+
-**API key** — direct auth for blockchain queries (`balance`, `tx`, `block`, `nfts`, `tokens`, `rpc`)
271
+
-**Access key** — Admin API operations (`apps`, `chains`, configured network lookups`) and app setup/selection, which can also supply the API key used by blockchain query commands
272
+
-**x402 wallet key** — wallet-authenticated blockchain queries in a pay-per-request model
266
273
267
274
Notify/webhook commands use a webhook API key with resolution order:
Get API/access keys at [alchemy.com](https://dashboard.alchemy.com/).
271
278
279
+
#### Browser login (recommended)
280
+
281
+
```bash
282
+
# Interactive login — opens browser to link your Alchemy account
283
+
alchemy auth
284
+
285
+
# Skip the confirmation prompt
286
+
alchemy auth -y
287
+
288
+
# Force re-authentication
289
+
alchemy auth login --force
290
+
291
+
# Check auth status
292
+
alchemy auth status
293
+
294
+
# Log out
295
+
alchemy auth logout
296
+
```
297
+
298
+
After login, the CLI prompts you to select an app. The app's API key is saved to config and used for all subsequent commands. If you skip app selection during login, the CLI will prompt you to pick one before running any command that needs an API key.
0 commit comments