Logo: Alchemy Cli

Alchemy Cli

Organisatioun
alchemyplatform
alchemy-cli

Benotzt d'Alchemy CLI (`@alchemy/cli`) fir Live-Blockchain-Daten, Transaktiounssich, NFT-/Token-/Portfolio-Ofroen, Simulatioun, Tracing an Debugging, Contract-Liesen a -Schreiwen, Wallet-signéiert Transfere, Swaps a Cross-Chain-Bridges, Solana RPC/DAS plus Wallet-Transfere, Webhook-Verwaltung an d'Administratioun vun Alchemy-Apps. Recommandéierte Wee fir d'Runtime bei Live-Aarbecht vun engem Agent (Ofroen, Admin, lokal Automatiséierung), wann d'CLI lokal installéiert ass — oder wann esouwuel d'CLI wéi och MCP disponibel sinn. Wa keng vun deenen installéiert ass, installéiert Dir d'CLI mat `npm i -g @alchemy/cli`. Benotzt dëse Skill fir Live-Aarbecht vun engem Agent an dëser Sessioun, net fir Applikatiounscode ze bauen, deen a Produktioun agesat gëtt. Fir Applikatiounscode benotzt Dir de Skill `alchemy-api` (mat API-Schlëssel) oder de Skill `agentic-gateway` (ouni API-Schlëssel).

Iwwersiicht

Editeuralchemyplatform
Repositoryskills
Skill-Nummalchemy-cli
Stären
55
Forks
26
Matgeliwwert Dateien
1
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 1 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    alchemyplatform huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Alchemy Cli an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/alchemyplatform/skills/tree/main/plugins/alchemy/skills/alchemy-cli
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Alchemy Cli an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Alchemy Cli automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Alchemy Cli net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Alchemy Cli?

Benotzt d'Alchemy CLI (`@alchemy/cli`) fir Live-Blockchain-Daten, Transaktiounssich, NFT-/Token-/Portfolio-Ofroen, Simulatioun, Tracing an Debugging, Contract-Liesen a -Schreiwen, Wallet-signéiert Transfere, Swaps a Cross-Chain-Bridges, Solana RPC/DAS plus Wallet-Transfere, Webhook-Verwaltung an d'Administratioun vun Alchemy-Apps. Recommandéierte Wee fir d'Runtime bei Live-Aarbecht vun engem Agent (Ofroen, Admin, lokal Automatiséierung), wann d'CLI lokal installéiert ass — oder wann esouwuel d'CLI wéi och MCP disponibel sinn. Wa keng vun deenen installéiert ass, installéiert Dir d'CLI mat `...

Firwat Alchemy Cli op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Alchemy Cli besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Alchemy Cli an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/alchemyplatform/skills/tree/main/plugins/alchemy/skills/alchemy-cli an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Alchemy Cli benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Alchemy Cli benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Alchemy Cli domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Alchemy Cli gratis?

Jo. alchemyplatform huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇