Skip to content

Commit 98b1631

Browse files
authored
Merge branch 'release' into blake/status-command
2 parents a23eb66 + de8d3f2 commit 98b1631

26 files changed

+1605
-159
lines changed

MAINTAINERS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ This creates a file like `.changeset/cool-dogs-fly.md`:
8484
"@alchemy/cli": minor
8585
---
8686

87-
Add `alchemy portfolio transactions` command for portfolio transaction history.
87+
Add `alchemy data portfolio transactions` command for portfolio transaction history.
8888
```
8989

9090
Write a 1-2 sentence summary of the change from a user's perspective. Commit this file with your PR.

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Quick usage examples:
6767
alchemy
6868

6969
# Agent/script-friendly command
70-
alchemy balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --json --no-interactive
70+
alchemy data balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --json --no-interactive
7171

7272
# Agent checks whether a newer CLI version is available
7373
alchemy update-check --json --no-interactive
@@ -95,7 +95,6 @@ Use `alchemy help` or `alchemy help <command>` for generated command help.
9595

9696
| Command | What it does | Example |
9797
|---|---|---|
98-
| `balance [address]` (`bal [address]`) | Gets ETH balance for an address | `alchemy bal 0x...` |
9998
| `tx [hash]` | Gets transaction + receipt by hash | `alchemy tx 0x...` |
10099
| `receipt [hash]` | Gets transaction receipt (status, gas, logs) | `alchemy receipt 0x...` |
101100
| `block <number>` | Gets block details (`latest`, decimal, or hex) | `alchemy block latest` |
@@ -109,21 +108,22 @@ Use `alchemy help` or `alchemy help <command>` for generated command help.
109108

110109
| Command | What it does | Example |
111110
|---|---|---|
112-
| `tokens [address]` | Lists ERC-20 balances for an address | `alchemy tokens 0x...` |
113-
| `tokens metadata <contract>` | Gets ERC-20 metadata | `alchemy tokens metadata 0x...` |
114-
| `tokens allowance --owner --spender --contract` | Gets ERC-20 allowance | `alchemy tokens allowance --owner 0x... --spender 0x... --contract 0x...` |
115-
| `nfts [address]` | Lists NFTs owned by an address | `alchemy nfts 0x...` |
116-
| `nfts metadata --contract <addr> --token-id <id>` | Gets NFT metadata by contract/token | `alchemy nfts metadata --contract 0x... --token-id 1` |
117-
| `nfts contract <address>` | Gets NFT contract metadata | `alchemy nfts contract 0x...` |
118-
| `transfers [address]` | Gets transfer history (`alchemy_getAssetTransfers`) | `alchemy transfers 0x... --category erc20,erc721` |
119-
| `prices symbol <symbols>` | Gets current token prices by symbol | `alchemy prices symbol ETH,USDC` |
120-
| `prices address --addresses <json>` | Gets current token prices by address/network pairs | `alchemy prices address --addresses '[{"network":"eth-mainnet","address":"0x..."}]'` |
121-
| `prices historical --body <json>` | Gets historical prices | `alchemy prices historical --body '{"symbol":"ETH","startTime":"...","endTime":"..."}'` |
122-
| `portfolio tokens --body <json>` | Gets token portfolio data | `alchemy portfolio tokens --body '{...}'` |
123-
| `portfolio token-balances --body <json>` | Gets token balance snapshots | `alchemy portfolio token-balances --body '{...}'` |
124-
| `portfolio nfts --body <json>` | Gets NFT portfolio data | `alchemy portfolio nfts --body '{...}'` |
125-
| `portfolio nft-contracts --body <json>` | Gets NFT contract portfolio data | `alchemy portfolio nft-contracts --body '{...}'` |
126-
| `portfolio transactions --body <json>` | Gets portfolio transaction history | `alchemy portfolio transactions --body '{...}'` |
111+
| `data balance [address]` | Gets native token balance for an address | `alchemy data balance 0x...` |
112+
| `data tokens balances [address]` | Lists ERC-20 balances for an address | `alchemy data tokens balances 0x...` |
113+
| `data tokens metadata <contract>` | Gets ERC-20 metadata | `alchemy data tokens metadata 0x...` |
114+
| `data tokens allowance --owner --spender --contract` | Gets ERC-20 allowance | `alchemy data tokens allowance --owner 0x... --spender 0x... --contract 0x...` |
115+
| `data nfts [address]` | Lists NFTs owned by an address | `alchemy data nfts 0x...` |
116+
| `data nfts metadata --contract <addr> --token-id <id>` | Gets NFT metadata by contract/token | `alchemy data nfts metadata --contract 0x... --token-id 1` |
117+
| `data nfts contract <address>` | Gets NFT contract metadata | `alchemy data nfts contract 0x...` |
118+
| `data history [address]` | Gets transfer history (`alchemy_getAssetTransfers`) | `alchemy data history 0x... --category erc20,erc721` |
119+
| `data price symbol <symbols>` | Gets current token prices by symbol | `alchemy data price symbol ETH,USDC` |
120+
| `data price address --addresses <json>` | Gets current token prices by address/network pairs | `alchemy data price address --addresses '[{"network":"eth-mainnet","address":"0x..."}]'` |
121+
| `data price historical --body <json>` | Gets historical prices | `alchemy data price historical --body '{"symbol":"ETH","startTime":"...","endTime":"..."}'` |
122+
| `data portfolio tokens --body <json>` | Gets token portfolio data | `alchemy data portfolio tokens --body '{...}'` |
123+
| `data portfolio token-balances --body <json>` | Gets token balance snapshots | `alchemy data portfolio token-balances --body '{...}'` |
124+
| `data portfolio nfts --body <json>` | Gets NFT portfolio data | `alchemy data portfolio nfts --body '{...}'` |
125+
| `data portfolio nft-contracts --body <json>` | Gets NFT contract portfolio data | `alchemy data portfolio nft-contracts --body '{...}'` |
126+
| `data portfolio transactions --body <json>` | Gets portfolio transaction history | `alchemy data portfolio transactions --body '{...}'` |
127127
| `simulate asset-changes --tx <json>` | Simulates asset changes | `alchemy simulate asset-changes --tx '{"from":"0x...","to":"0x..."}'` |
128128
| `simulate execution --tx <json>` | Simulates execution traces | `alchemy simulate execution --tx '{"from":"0x...","to":"0x..."}'` |
129129
| `simulate asset-changes-bundle --txs <json>` | Simulates bundle asset changes | `alchemy simulate asset-changes-bundle --txs '[{...}]'` |

src/commands/agent-prompt.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,12 @@ function buildAgentPrompt(program: Command): AgentPrompt {
141141
flag: "--api-key <key>",
142142
configKey: "api-key",
143143
commandFamilies: [
144-
"balance",
144+
"data",
145145
"tx",
146146
"block",
147147
"rpc",
148148
"trace",
149149
"debug",
150-
"tokens",
151-
"nfts",
152-
"transfers",
153-
"prices",
154-
"portfolio",
155150
"simulate",
156151
"solana",
157152
],
@@ -176,15 +171,12 @@ function buildAgentPrompt(program: Command): AgentPrompt {
176171
flag: "--x402 --wallet-key-file <path>",
177172
configKey: "x402",
178173
commandFamilies: [
179-
"balance",
174+
"data",
180175
"tx",
181176
"block",
182177
"rpc",
183178
"trace",
184179
"debug",
185-
"tokens",
186-
"nfts",
187-
"transfers",
188180
],
189181
},
190182
],
@@ -193,7 +185,7 @@ function buildAgentPrompt(program: Command): AgentPrompt {
193185
examples: [
194186
"alchemy --json --no-interactive setup status",
195187
"alchemy --json --no-interactive update-check",
196-
"alchemy --json --no-interactive balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --api-key $ALCHEMY_API_KEY",
188+
"alchemy --json --no-interactive data balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --api-key $ALCHEMY_API_KEY",
197189
"alchemy --json --no-interactive apps list --access-key $ALCHEMY_ACCESS_KEY",
198190
"alchemy --json --no-interactive rpc eth_blockNumber --api-key $ALCHEMY_API_KEY",
199191
"alchemy --json --no-interactive network list",
@@ -258,7 +250,7 @@ export function registerAgentPrompt(program: Command) {
258250
program
259251
.command("agent-prompt")
260252
.description("Emit complete agent/automation usage instructions")
261-
.option("--commands <list>", "Filter to specific commands in JSON output (requires --json). Comma-separated (e.g. balance,tokens,gas)")
253+
.option("--commands <list>", "Filter to specific commands in JSON output (requires --json). Comma-separated (e.g. data,rpc,gas)")
262254
.action((opts: { commands?: string }) => {
263255
const payload = buildAgentPrompt(program);
264256
if (opts.commands) {

0 commit comments

Comments
 (0)