Alchemy Cli 标志

Alchemy Cli

组织
alchemyplatform
alchemy-cli

使用 Alchemy CLI(`@alchemy/cli`)获取实时区块链数据、查询交易、查询 NFT/Token/投资组合、进行模拟、追踪/调试、读取/写入合约、通过钱包签名发送交易、兑换和跨链桥接、使用 Solana RPC/DAS 以及钱包发送功能、管理 webhook,并管理 Alchemy 应用。当本地已安装 CLI 时,或 CLI 与 MCP 均可用时,这是执行实时智能体任务(查询、管理、本地自动化)的首选运行方式。如果两者都未安装,请使用 `npm i -g @alchemy/cli` 安装 CLI。用于在当前会话中执行实时智能体任务,不用于构建将部署到生产环境的应用代码。编写应用代码时,请使用 `alchemy-api` 技能(需要 API 密钥)或 `agentic-gateway` 技能(无需 API 密钥)。

概览

发布者alchemyplatform
代码仓库skills
技能名称alchemy-cli
星标数
55
复刻数
26
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 alchemyplatform 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Alchemy Cli AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/alchemyplatform/skills/tree/main/plugins/alchemy/skills/alchemy-cli
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alchemyplatform/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/alchemy/skills/alchemy-cli .claude/skills/alchemy-cli
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Alchemy Cli,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Alchemy Cli。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Alchemy Cli 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Alchemy CLI

Use the Alchemy CLI (@alchemy/cli) for live blockchain queries, admin work, transaction signing, and local automation from the terminal. The CLI groups commands by chain (evm, solana, xchain) and by product area (wallet, app, webhook, auth, config), each with structured JSON output.

When to use this skill

Use alchemy-cli when all of the following are true:

  • The user wants live agent work — live querying, analysis, admin work, or local automation that the agent runs now in this session
  • @alchemy/cli is installed locally, or both the CLI and an MCP server are available, or neither is available (in which case install the CLI — see Install)

The CLI is the preferred local fallback runtime path for live agent work. When in doubt about CLI vs MCP, prefer the CLI.

When to use a different skill

SituationUse this skill instead
MCP is already wired into your client and the CLI is not installed locallyalchemy-mcp
Building application code that runs outside this agent session, with an Alchemy API keyalchemy-api
Building application code without an API key, or as an autonomous agent that needs to pay for itself, or you explicitly want x402/MPPagentic-gateway

Do not use this skill to write production application code — CLI commands are for live agent work, not for embedding into shipped software.

Install

bash
npm i -g @alchemy/cli

If the CLI is not installed and the user wants live agent work, install it. Do not fall back to raw curl/HTTP calls — those are the API-key path covered by alchemy-api.

Bootstrap

Run this at the start of any session to get the full command contract (every command, flag, auth method, error code, and example):

bash
alchemy --json --no-interactive agent-prompt

For wallet-scoped agent work, use the narrower contract that lists only wallet, EVM, Solana, and cross-chain commands plus the session-signer capability set:

bash
alchemy --json --no-interactive agent-prompt --scope wallet

When the CLI is not installed yet but the agent needs the same contract, the unauthenticated npx variant works:

bash
npx -y @alchemy/cli@latest --json --no-interactive agent-prompt --scope wallet

Execution rules

  • ALWAYS pass --json --no-interactive on every command
  • Parse stdout as JSON on exit code 0
  • Parse stderr as JSON on nonzero exit code
  • NEVER run bare alchemy without --json --no-interactive
  • NEVER use curl or raw HTTP when an alchemy CLI command exists for the task — that's the alchemy-api (API-key) path, not this skill
  • NEVER use the CLI to generate production application code; hand off to alchemy-api or agentic-gateway for shipped code
  • For onchain actions (evm send, evm contract call, evm approve, evm swap, xchain bridge, solana send), run alchemy --json --no-interactive wallet status --verify first to confirm the session is still valid, then prefer --dry-run before broadcast. Treat sponsorship policies (--gas-policy-id, --fee-policy-id) as fee controls, not wallet spend limits.

Preflight

Before the first command, run both of these checks:

bash
alchemy --json --no-interactive doctor
alchemy --json --no-interactive evm gas

doctor (alias: alchemy config status) reports what's configured plus a nextCommands list of remediation steps. Do not rely on its top-level OK alone — there is a known false positive where it reports the session is set up but RPC commands still fail with AUTH_REQUIRED because no API key has been derived from the auth token.

evm gas is a lightweight RPC smoke test that catches this. If it returns {"gasPrice": "0x...", ...}, RPC is wired up correctly. If it returns {"error": {"code": "AUTH_REQUIRED", ...}}, run alchemy auth login (which fetches and saves the API key) or alchemy config set api-key <key>, then re-run evm gas to confirm.

If doctor reports missing config, follow its nextCommands first, then run evm gas to verify.

Auth setup

The fastest way to authenticate is via browser login:

bash
alchemy auth login

For headless environments (SSH, GitHub Codespaces, CI, sandboxes) where the browser can't reach the CLI's localhost callback, force the OAuth 2.0 Device Authorization Grant flow:

bash
alchemy auth login --device-code

Plain alchemy auth auto-detects non-interactive sessions and switches to device-code mode automatically. Requires @alchemy/cli 0.18.0 or later.

This opens a browser, completes the OAuth flow, and configures both the API key (for RPC/Data) and the Admin API access internally. There is no separate access key step anymore — admin commands (alchemy app ...) work straight after alchemy auth login.

To check auth status: alchemy auth status To log out: alchemy auth logout

Alternative auth methods

MethodConfig commandEnv varUsed by
Browser loginalchemy auth login (add --device-code for headless)--All commands (covers both RPC/Data and Admin)
API keyalchemy config set api-key <key>ALCHEMY_API_KEYRPC/Data commands (evm rpc, evm data, evm tx, solana rpc, etc.)
Webhook keyalchemy config set webhook-api-key <key>ALCHEMY_WEBHOOK_API_KEYwebhook
Agent wallet sessionalchemy wallet connect --mode session --instance-name <label> (approve in dashboard)--evm send, evm contract call, evm approve, evm swap, xchain bridge, evm status, solana send, solana status, solana delegate
Local walletalchemy wallet connect --mode local (--import <path> for EVM key)--Same wallet-signed commands as session, with --signer local override
x402 gateway auth (Alchemy API path)alchemy wallet connect --mode local --chain evm then alchemy config set x402 trueALCHEMY_WALLET_KEYRPC and Data commands when --x402 is active. This is Alchemy API auth via wallet, distinct from alchemy x402 request (see below).
x402 payments (third-party APIs)alchemy wallet connect --mode local — a signer configured for x402 payments--alchemy x402 request <url>, alchemy x402 balance (pays third-party APIs in USDC per RFC 402)

alchemy evm network list / alchemy solana network list and alchemy version / update-check need no auth.

Selecting a default app

Many app subcommands operate on a "default app." If you see APP_REQUIRED in an error response, select one:

bash
alchemy --json --no-interactive app select <id>
# or equivalently
alchemy --json --no-interactive config set app <id>

Get an Alchemy account at dashboard.alchemy.com.

Task-to-command map

EVM — onchain reads

TaskCommand
Native balance (ETH, MATIC, ...)alchemy evm data balance <address>
Transaction detailsalchemy evm tx <hash>
Transaction receiptalchemy evm receipt <hash>
Block detailsalchemy evm block <number|latest>
Gas pricesalchemy evm gas
Event logsalchemy evm logs --address <addr> --from-block <n> --to-block <n>
Raw JSON-RPCalchemy evm rpc <method> [params...]
Trace methodsalchemy evm trace <method> [params...]
Debug methodsalchemy evm debug <method> [params...]
Contract view/pure callalchemy evm contract read <address> <function> [--args ...] [--abi-file <path>]

EVM — Data API

TaskCommand
ERC-20 balancesalchemy evm data tokens balances <address>
ERC-20 balances (formatted)alchemy evm data tokens balances <address> --metadata
Token metadataalchemy evm data tokens metadata <contract>
Token allowancealchemy evm data tokens allowance --owner <addr> --spender <addr> --contract <addr>
List owned NFTsalchemy evm data nfts <address> [--limit <n>] [--page-key <key>]
NFT metadataalchemy evm data nfts metadata --contract <addr> --token-id <id>
NFT contract metadataalchemy evm data nfts contract <address>
Asset transfer historyalchemy evm data history <address> [--from-block <n>] [--to-block <n>] [--max-count <n>] [--page-key <key>]
Spot prices by symbolalchemy evm data price symbol ETH,USDC
Spot prices by addressalchemy evm data price address --addresses '<json>'
Historical pricesalchemy evm data price historical --body '<json>'
Cross-network token portfolioalchemy evm data portfolio tokens --body '<json>'
Token balances by address/network pairsalchemy evm data portfolio token-balances --body '<json>'
Cross-network NFT portfolioalchemy evm data portfolio nfts --body '<json>'
NFT contracts by address/network pairsalchemy evm data portfolio nft-contracts --body '<json>'

EVM — Simulation

TaskCommand
Simulate single tx (asset deltas)alchemy evm simulate asset-changes --tx '<json>' [--block-tag <tag>]
Simulate single tx (execution trace)alchemy evm simulate execution --tx '<json>' [--block-tag <tag>]
Simulate bundle (asset deltas)alchemy evm simulate asset-changes-bundle --txs '<json-array>' [--block-tag <tag>]
Simulate bundle (execution trace)alchemy evm simulate execution-bundle --txs '<json-array>' [--block-tag <tag>]

EVM — wallet-signed transactions

Wallet-signed EVM actions return a smart wallet call ID. Use alchemy evm status <call-id-or-tx-hash> to check either value. Use --gas-sponsored and --gas-policy-id <id> on supported actions to request gas sponsorship; set defaults with alchemy config set evm-gas-sponsored true and alchemy config set evm-gas-policy-id <id>.

TaskCommand
Send native tokenalchemy evm send <to> <amount> [-n <network>]
Send ERC-20alchemy evm send <to> <amount> --token <token-address>
Execute a contract functionalchemy evm contract call <address> <function> [--args ...] [--abi-file <path>|--abi '<json>'] [--value <wei>]
Approve / revoke / reset ERC-20 allowancealchemy evm approve <spender-address> --token-address <addr> [--amount <n>|--unlimited|--revoke]
Quote same-chain swapalchemy evm swap quote --from <token> --to <token> --amount <n>
Execute same-chain swapalchemy evm swap execute --from <token> --to <token> --amount <n>
Check call / tx statusalchemy evm status <call-id-or-tx-hash>

Native token address for swaps: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE.

Most wallet-signed EVM commands accept --signer session|local to override the active signer for that invocation. When both signers are configured and no active one is chosen, the CLI defaults to session and prints a warning.

Solana

Solana transaction commands use a local Solana wallet (alchemy wallet connect --mode local --chain solana). Use --fee-sponsored and --fee-policy-id <id> on supported actions to request fee sponsorship; persist defaults with alchemy config set solana-fee-sponsored true / alchemy config set solana-fee-policy-id <id>.

TaskCommand
Solana JSON-RPCalchemy solana rpc <method> [params...]
Solana DAS (NFTs/assets)alchemy solana das <method> '<json>'
Send native SOLalchemy solana send <to> <amount> [-n solana-mainnet]
Approve SPL token delegatealchemy solana delegate approve --token-account <addr> --mint <addr> --delegate <addr> --amount <n> --decimals <n>
Revoke SPL token delegatealchemy solana delegate revoke --token-account <addr>
Check Solana tx statusalchemy solana status <signature>
List program accountsalchemy solana program accounts <program-id> [--filters '<json>'] [--encoding <enc>] [--limit <n>]
Show Solana accountalchemy solana program account <address>
Show Solana program metadataalchemy solana program show <program-id>
List Solana network IDsalchemy solana network list

alchemy solana swap is reserved for future support and is not implemented.

Cross-chain

Bridge supports EVM mainnets. For same-chain token exchanges, use alchemy evm swap.

TaskCommand
Quote a bridgealchemy xchain bridge quote --from <token> --to <token> --amount <n> --to-network <network>
Execute a bridgealchemy xchain bridge execute --from <token> --to <token> --amount <n> --to-network <network>

Source network comes from -n, --network.

Wallets and signing

A wallet session is a CLI-bound signer that the user approves in the Agent Wallets dashboard. The agent never sees the private key. Sessions expire automatically and can be revoked from the CLI or the dashboard. Session signing capabilities the server may grant: evm.signMessage, evm.signTypedData, evm.signAuthorization, evm.prepareCalls, evm.sendCalls, solana.signTransaction. The session signer does not support raw EVM transaction signing — use the action commands (evm send, evm contract call, evm approve, evm swap, xchain bridge, solana send), which execute through Alchemy smart-wallet calls.

Run alchemy --json --no-interactive wallet status --verify before any state-changing wallet action — it returns the active signer, expiry, chain-specific session metadata, backend status, and enabled signer capabilities.

TaskCommand
Connect a wallet (session)alchemy wallet connect --mode session --instance-name <label>
Connect local EVM wallet (import private key file)alchemy wallet connect --mode local --chain evm --import <path>
Connect local Solana walletalchemy wallet connect --mode local --chain solana
Show wallet statusalchemy wallet status [--verify]
Show configured wallet addressesalchemy wallet address
Render an address as a QR codealchemy wallet qr
Pick active signer for EVM txnsalchemy wallet use <session|local>
Disconnect / revoke walletalchemy wallet disconnect
Per-command signer overrideappend --signer session|local

Webhook (Notify)

TaskCommand
List webhooksalchemy webhook list
Create webhookalchemy webhook create --body '<json>' [--dry-run]
Update webhookalchemy webhook update --body '<json>' [--dry-run]
Delete webhookalchemy webhook delete <id> [--yes] [--dry-run]
Get address-activity webhook addressesalchemy webhook addresses <id>
Get NFT-activity webhook filtersalchemy webhook nft-filters <id>

App management (Admin API)

TaskCommand
List appsalchemy app list [--cursor <c>] [--limit <n>] [--all] [--search <q>] [--id <appId>]
Get app detailsalchemy app get <id>
Create appalchemy app create --name "My App" --networks eth-mainnet [--description <desc>] [--products <ids>] [--dry-run]
Update app metadataalchemy app update <id> --name "New Name" [--description <desc>] [--dry-run]
Update app network allowlistalchemy app networks <id> --networks eth-mainnet,base-mainnet [--dry-run]
Update app address allowlistalchemy app address-allowlist <id> --addresses 0xAA,0xBB [--dry-run]
Update app origin allowlistalchemy app origin-allowlist <id> --origins https://a.com,https://b.com [--dry-run]
Update app IP allowlistalchemy app ip-allowlist <id> --ips 1.2.3.4,5.6.7.8 [--dry-run]
Delete appalchemy app delete <id> [--yes] [--dry-run]
Select default appalchemy app select <id> (equivalent to alchemy config set app <id>)
List networks configured for an appalchemy app configured-networks [--app-id <id>]
List Admin API chain identifiers (for app create/update)alchemy app chains
List EVM RPC network slugs (for --network)alchemy evm network list [--mainnet-only] [--testnet-only] [--search <term>]

The CLI's app and usage commands are thin wrappers over Alchemy's public Admin API (api.g.alchemy.com/admin-api/v1/...). Apps and Chains endpoints are public and self-serve; Usage endpoints are also self-serve for app-scoped queries. See references/operational-admin-api.md for the REST surface, auth model (x-alchemy-token bearer or the CLI's browser session), and endpoint enumeration.

Usage and metering

TaskCommand
Summary of usage over a rangealchemy usage summary --start-date <YYYY-MM-DD> --end-date <YYYY-MM-DD> [--app-ids <ids>] [--networks <slugs>] [--metrics amount,usd]
Timeseries of usage over a rangealchemy usage timeseries --start-date <YYYY-MM-DD> --end-date <YYYY-MM-DD> [--granularity minute|hour|day|month] [--products <ids>] [--metrics amount] [--app-ids <ids>] [--networks <slugs>] [--methods <names>] [--request-types <types>] [--group-by <field>]
Timeseries (alias)alchemy usage time-series ...

Range limits on timeseries queries (as of 2026-07-02):

  • Free plan: 7 days maximum lookback.
  • Pay-as-you-go: 30 days maximum lookback.
  • Longer ranges: contact sales.

If the requested range exceeds the plan limit, the CLI does NOT error — it returns the allowed range and surfaces both the requested and returned range in the response so you can detect the truncation.

--metrics semantics differ by endpoint:

  • alchemy usage timeseries accepts only amount. The usd metric is not valid on time-series responses (removed 2026-08-13 per API-side change); pass --metrics amount or omit the flag.
  • alchemy usage summary accepts both amount and usd (comma-separated) on summary responses.

Auth: same browser session as alchemy app (Admin API access).

x402 payments (third-party APIs)

alchemy x402 request and alchemy x402 balance pay third-party APIs in USDC per RFC 402. This is a separate axis from --x402 / alchemy config set x402 true (which handles Alchemy-API auth for Alchemy's own gateway). Requires @alchemy/cli 0.22.0 or later.

TaskCommand
Make an x402-paid requestalchemy x402 request <url> [--dry-run] [--estimate] [--max-payment <usdc>] [--yes]
Show current x402 wallet balancealchemy x402 balance
  • Pass --max-payment <usdc> in non-interactive mode; without it the CLI exits 9 (non-interactive without cap).
  • Combining --yes with no --max-payment exits 2 (yes without cap).
  • Uses Circle Gateway batched nanopayments or direct EIP-3009 settlement depending on the third-party server.
  • Live example endpoint: https://nano.blockrun.ai (returns HTTP 402 on the first hit, then completes after the client-signed payment).

CLI admin and utilities

TaskCommand
Check for CLI updatesalchemy update-check
View configalchemy config list
Reset configalchemy config reset --yes
CLI versionalchemy version
Install MCP / Skills for a clientalchemy install mcp / alchemy install skills
Shell completionsalchemy completions <bash|zsh|fish>

Global flags

FlagDescription
--jsonForce JSON output (auto-enabled when piped)
--no-interactiveDisable prompts and REPL
-n, --network <network>Target network (default: eth-mainnet, env: ALCHEMY_NETWORK)
--api-key <key>Override API key per command (env: ALCHEMY_API_KEY)
--x402Use x402 wallet-based gateway auth for this command
--wallet-key-file <path>Path to an EVM wallet private key file (for x402)
--solana-wallet-key-file <path>Path to a Solana wallet key file
--timeout <ms>Request timeout in milliseconds
-q, --quietSuppress non-essential output
--verboseLog request/response details to stderr
--debugEnable debug diagnostics
--no-colorDisable color output
--revealShow secrets in plain text (use with care; intended for explicit reveal flows)

Error handling

Errors return structured JSON on stderr. Each error has a code, an exitCode (1–9), a retryable boolean, and a recovery hint. Key codes (from agent-prompt):

CodeExitRetryableRecovery
AUTH_REQUIRED3NoRun alchemy auth login, or set ALCHEMY_API_KEY / alchemy config set api-key <key>
INVALID_API_KEY3NoCheck the API key; set a valid one with alchemy config set api-key <key>
APP_REQUIRED3NoSelect a default app: alchemy app select <id> (or alchemy config set app <id>)
NETWORK_NOT_ENABLED3NoEnable the target network for your app at dashboard.alchemy.com
SETUP_REQUIRED3NoRun alchemy --json doctor and follow nextCommands
PAYMENT_REQUIRED9NoFund x402 wallet or switch to API key auth
RATE_LIMITED5YesWait and retry with backoff; consider upgrading your plan
NETWORK_ERROR6YesCheck connection and retry
RPC_ERROR7NoCheck method, params, and network; verify API key has access
ADMIN_API_ERROR8NoCheck the error message; admin commands require an authenticated browser session
NOT_FOUND4NoVerify the resource identifier (address, hash, id) is correct
INVALID_ARGS2NoCheck command usage via alchemy --json help <command>
INTERNAL_ERROR1NoUnexpected error; retry or report a bug

Get the full canonical list any time with alchemy --json --no-interactive agent-prompt.

Handing off to other skills

The user wants to...Hand off to
Wire Alchemy into application code that ships to production, with an API keyalchemy-api
Wire Alchemy into application code without an API key, or pay-per-request as an autonomous agentagentic-gateway
Run live work but the CLI isn't installed and they prefer not to install it (MCP is wired in)alchemy-mcp

Bridging into the alchemy-api flow (extract an API key)

If the user is starting an app-code project and $ALCHEMY_API_KEY isn't set in their shell, use the CLI to fetch a key from their Alchemy account, persist it to the project's .env so it survives across terminal sessions, and export it for the current shell so the agent can use it immediately.

Security: NEVER echo, print, or otherwise surface the extracted API key value in conversation output. Refer to it only as $ALCHEMY_API_KEY after exporting. Treat it the same as a password.

bash
# 1. Try to read a cached key from CLI config (read-only, safe non-interactive).
KEY="$(alchemy --no-interactive --json --reveal config get api-key 2>/dev/null | jq -r .value)"

# 2. If empty/null, run the interactive flow.
#    Note: auth login opens a browser and app select shows a picker, so do NOT
#    pass --no-interactive here. If you already know the app id, pass it
#    explicitly to skip the picker: `alchemy --no-interactive --json app select <id>`.
if [ -z "$KEY" ] || [ "$KEY" = "null" ]; then
  alchemy auth login              # opens browser; sets up account credentials
  alchemy --json app select       # interactive picker (omit --no-interactive so it can render)
  KEY="$(alchemy --no-interactive --json --reveal config get api-key | jq -r .value)"
fi

# 3. Persist to the project's .env (standard practice — survives terminal restarts
#    and gets loaded by dotenv / framework env loaders at runtime).
#    Use .env.local if the project's framework expects that (e.g. Next.js).
ENV_FILE=".env"
touch "$ENV_FILE"
if grep -q '^ALCHEMY_API_KEY=' "$ENV_FILE"; then
  sed -i.bak "s|^ALCHEMY_API_KEY=.*|ALCHEMY_API_KEY=$KEY|" "$ENV_FILE" && rm "$ENV_FILE.bak"
else
  echo "ALCHEMY_API_KEY=$KEY" >> "$ENV_FILE"
fi
grep -qxF "$ENV_FILE" .gitignore 2>/dev/null || echo "$ENV_FILE" >> .gitignore

# 4. Export to the current shell so the agent can call the API immediately.
export ALCHEMY_API_KEY="$KEY"

Hand off to the alchemy-api skill once .env has the key and ALCHEMY_API_KEY is exported.

Official links

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Alchemy Cli AI 技能有什么作用?

使用 Alchemy CLI(`@alchemy/cli`)获取实时区块链数据、查询交易、查询 NFT/Token/投资组合、进行模拟、追踪/调试、读取/写入合约、通过钱包签名发送交易、兑换和跨链桥接、使用 Solana RPC/DAS 以及钱包发送功能、管理 webhook,并管理 Alchemy 应用。当本地已安装 CLI 时,或 CLI 与 MCP 均可用时,这是执行实时智能体任务(查询、管理、本地自动化)的首选运行方式。如果两者都未安装,请使用 `npm i -g @alchemy/cli` 安装 CLI。用于在当前会话中执行实时智能体任务,不用于构建将部署到生产环境的应用代码。编写应用代码时,请使用 `alchemy-api` 技能(需要 API 密钥)或 `agentic-gateway` 技能(无需 API 密钥)。

为什么在 TypingMind 中使用 Alchemy Cli?

因为您只需安装一次,就能搭配任何模型使用。Alchemy Cli 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Alchemy Cli?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/alchemyplatform/skills/tree/main/plugins/alchemy/skills/alchemy-cli。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Alchemy Cli?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Alchemy Cli 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Alchemy Cli 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Alchemy Cli AI 技能免费吗?

是的。alchemyplatform 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇