Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

The Dynamic CLI (dynamic) provides shell access to your Dynamic environment. It reads and writes settings via the Dashboard API, and for anything that requires the dashboard UI it returns a direct link to the right page and anchor. It’s also designed for AI agent consumption — all output is JSON, a machine-readable schema is available without auth, and compact mode reduces token usage.

Installation

The CLI lives in the cli package in the Dynamic monorepo. Build it and link it globally so dynamic is on your PATH:
cd cli
npm install
npm run build
npm run install:global   # builds + npm link
Or run it directly without linking:
node dist/cli.js <command>
Requirements: Node 18 or later.

Authentication

Generate a Dashboard API token from the Developer page in your dashboard, then store it with the auth command:
dynamic auth -t dyn_xxxx... -e <environment-uuid>
This writes DYNAMIC_TOKEN and DYNAMIC_ENVIRONMENT_ID to a .env file next to the CLI. You can also set them as environment variables directly (useful in CI):
export DYNAMIC_TOKEN=dyn_xxxx...
export DYNAMIC_ENVIRONMENT_ID=4e598b41-f388-489b-a0b3-d24064b1d1ed
VariableRequiredDescription
DYNAMIC_TOKENYesDashboard API token (dyn_ + 56 chars)
DYNAMIC_ENVIRONMENT_IDYesEnvironment UUID (v4)
DASHBOARD_API_BASE_URLNoDefaults to https://app.dynamic.xyz
The raw token is never stored or logged. It is hashed for rate limiting and audit purposes.

Commands

auth

Store credentials in .env. Does not require existing auth — run this once after creating an API token.
dynamic auth -t dyn_xxxx... -e 4e598b41-f388-489b-a0b3-d24064b1d1ed

# Specify a custom .env path
dynamic auth -t dyn_xxxx... -e <uuid> --credentials-file /path/to/.env

read

Read current state from the Dashboard API. Paths are relative to /api/v0; use the literal {environmentId} and the CLI substitutes your stored environment ID.
dynamic read /environments
dynamic read /environments/{environmentId}/origins
dynamic read /environments/{environmentId}/settings/providers
dynamic read /environments/{environmentId}/embeddedWalletVersions
Allowed paths:
PathReturns
/environments or /environments/{environmentId}Full environment — settings, chains, embedded wallets, CORS config
/environments/{environmentId}/originsCORS allowed origins
/environments/{environmentId}/settings/providersAuth providers and their config
/environments/{environmentId}/embeddedWalletVersionsEmbedded wallet versions (V1, V2, V3)
/environments/{environmentId}/settings/providers/urlsProvider URLs

set

Update a dashboard setting. The CLI looks up the setting name in its knowledge registry, GETs the current environment, sets the value at the correct body path, and PUTs it back.
dynamic set "gas sponsorship" true
dynamic set "create on sign up" false
dynamic set "default wallet version" '"V3"'
dynamic set "JWT expiration" '"PT2H"'

# Preview the change without writing
dynamic set "gas sponsorship" true --dry-run
  • setting — matched by keyword against the knowledge registry (same matching as how-to-change)
  • value — JSON-parsed (true, false, "V3", 42); falls back to raw string if not valid JSON
  • --dry-run — shows previousValue and newValue without executing the PUT
Only settings that map to PUT /environments/{environmentId} with a clean dotted body path are writable directly (~20 boolean/string toggles). For anything else, use how-to-change to get the dashboard link or a cURL template.

how-to-change

Look up guidance for changing a setting — dashboard URL, docs link, prerequisites, and optionally a cURL template.
dynamic how-to-change "gas sponsorship"
dynamic how-to-change "CORS" --curl
dynamic how-to-change "embedded wallet chains"
When a query matches multiple settings (e.g. EVM vs. Solana gas sponsorship), the CLI returns all matches so you can pick the right one.

enable / disable

Enable or disable a sign-in provider.
dynamic enable email
dynamic enable sms
dynamic enable google
dynamic disable discord
Supported providers: email, sms, google, apple, discord, twitter, github, facebook, linkedin, microsoft, telegram, farcaster, passkey.

config

Configure options for email or sms providers. At least one option is required.
dynamic config email --use-for-signup true --use-for-login true --required false --block-subaddresses true
dynamic config sms --use-for-signup true --required true
OptionEmailSMSDescription
--use-for-signup <bool>Collect this field at sign-up
--use-for-login <bool>Enable this provider for login
--required <bool>Require this field at sign-up
--block-subaddresses <bool>Block user+tag@domain style addresses
Values accept true/false, 1/0, or yes/no.

security origins

Manage CORS allowed origins.
dynamic security origins                              # list
dynamic security origins add https://example.com     # add
dynamic security origins remove https://example.com  # remove by URL or ID

security jwt

Set the JWT expiration duration.
dynamic security jwt 24 hours
dynamic security jwt 2 days
dynamic security jwt 30 minutes

Enable or disable mobile deeplink URLs.
dynamic security deeplink-urls true
dynamic security deeplink-urls false

chains list / chains enable / chains disable

List chains and their enabled state, or toggle a chain for your environment.
dynamic chains list
dynamic chains enable solana
dynamic chains enable bitcoin
dynamic chains disable ton
Supported chain names: evm, ethereum, solana, sol, sui, bitcoin, btc, ton, flow, stellar, xlm, aptos, cosmos, tron, aleo, algorand, eclipse.

docs

List or read built-in documentation topics.
dynamic docs                           # list all topics
dynamic docs embedded-wallets          # print as markdown
dynamic docs security --json           # print as JSON (for agents)
Available topics: usage, embedded-wallets, global-wallets, smart-wallets, log-in-methods, security, security-setup-assessment, chains-and-networks, developer-webhooks, developer-domains, developer-test-accounts, developer-events.

schema

Output a machine-readable schema (no auth required). Returns all commands with their arguments and options, plus the list of allowed read paths.
dynamic schema
dynamic --help-json  # alias

Output

All commands write JSON to stdout. Errors exit with code 1.
// Successful read
{
  "_source": "Dashboard API",
  "body": { ... },
  "status": 200
}

// Successful set
{
  "setting": "Gas sponsorship (Solana / embedded wallets)",
  "bodyPath": "sdk.embeddedWallets.svmGasSponsorshipEnabled",
  "previousValue": false,
  "newValue": true,
  "status": 200
}

// Error
{
  "error": "Rate limit exceeded",
  "retryAfter": 5
}
Set DYNAMIC_COMPACT=1 to output single-line JSON (no pretty-printing), which reduces token usage when the CLI is consumed by an AI agent.

Rate limits

OperationLimit
Reads100 requests / 10 seconds
Writes20 requests / 10 seconds
Rate limiting is per token, keyed by a hash (not plaintext). Set REDIS_URL to use Redis for distributed rate limiting across multiple instances; otherwise in-memory limits apply.

Agent integration

The CLI is designed to be called by AI agents via shell exec:
  • dynamic schema — discover all commands without auth or parsing help text
  • DYNAMIC_COMPACT=1 — single-line JSON output
  • dynamic docs <topic> --json — consistent JSON output for doc content
  • All responses are JSON-parseable
# Example tool definitions
tools:
  - name: dynamic_read
    command: dynamic read /environments
  - name: dynamic_set
    command: dynamic set "gas sponsorship" true
  - name: dynamic_how_to_change
    command: dynamic how-to-change "gas sponsorship"
  - name: dynamic_docs
    command: dynamic docs embedded-wallets
  - name: dynamic_schema
    command: dynamic schema