MotherDuck CLI
CLI for the MotherDuck REST API.
Important: This is a personal project. I am not affiliated with MotherDuck.
Install
Recommended:
|
Pre-built binaries are available for Linux and macOS via Python (uv). Windows users should install via cargo or use macOS/Linux.
uv:
cargo:
Either option will install the md command globally. You can use uvx to run it without installing:
Authentication
Set a MotherDuck API token via environment variable:
Token resolution order (first non-empty wins):
--tokenflag (pass-to read from stdin)motherduck_tokenMOTHERDUCK_TOKENmotherduck_api_keyMOTHERDUCK_API_KEY
Usage
md [--output text|json] [--token TOKEN] [--yes] <command>
Global flags
| Flag | Short | Description |
|---|---|---|
--output |
-o |
Output format: text (default) or json |
--token |
API token (overrides env vars; - reads from stdin) |
|
--yes |
-y |
Skip confirmation prompts |
service-account
# Create a service account
# Delete a service account (prompts for confirmation)
token
# List tokens for a user
# Create a new token
# Delete a token (prompts for confirmation)
--ttl: time-to-live in seconds (300–31536000). Omit for no expiration.
--token-type: read-write (default) or read-scaling.
duckling
# Get current duckling config
# Set duckling config (at least one override required)
Instance sizes: pulse, standard, jumbo, mega, giga.
Flock size: 0–64. duckling set fetches the current config and merges your overrides, so you only need to specify what you're changing.
account
# List active accounts and their ducklings