MotherDuck CLI
CLI for the MotherDuck REST API.
Important: This is a personal project. I am not affiliated with MotherDuck.
Install
Recommended:
curl -LsSf https://dkdc.sh/md-cli/install.sh | sh
Pre-built binaries are available for Linux and macOS via Python (uv). Windows users should install via cargo or use macOS/Linux.
uv:
uv tool install dkdc-md-cli
cargo:
cargo install dkdc-md-cli
Verify installation:
md --version
You can use uvx to run it without installing:
uvx --from dkdc-md-cli md
Authentication
Set a MotherDuck API token via environment variable:
export MOTHERDUCK_TOKEN="your-token-here"
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
md service-account create <username>
# Delete a service account (prompts for confirmation)
md service-account delete <username>
token
# List tokens for a user
md token list <username>
# Create a new token
md token create <username> --name <name> [--ttl <seconds>] [--token-type <type>]
# Delete a token (prompts for confirmation)
md token delete <username> <token_id>
--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
md duckling get <username>
# Set duckling config (at least one override required)
md duckling set <username> [--rw-size <size>] [--rs-size <size>] [--flock-size <n>]
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
md account list-active
Metadata
Release files for dkdc-md-cli 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dkdc_md_cli-0.2.2.tar.gz | 17.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ x86-64 | Details |
| dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_aarch64.whl | CPython 3.11 | abi3 | Linux glibc 2.34+ ARM64 | Details |
| dkdc_md_cli-0.2.2-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| dkdc_md_cli-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl | CPython 3.11 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.9 MB
Release files / dkdc_md_cli-0.2.2.tar.gz
| Download URL | dkdc_md_cli-0.2.2.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c16ef15f6ef27025da2283542cc0ed0a1d1b1c9f0e5769ed71cf2240683bdf0d
|
|
BLAKE2b-256 checksum How to use checksums |
5bdccb7c4a437bdae768c70798d682ae407ec48f2147180a58bbd5090ef01430
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logRelease files / dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_x86_64.whl
| Download URL | dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a2cc83ce112658843dfb94779b4fa86baa8568e838f924c30e5d74b832cd3f48
|
|
BLAKE2b-256 checksum How to use checksums |
355a5d23b9cf0da705ccb94af09edc62bd54c5a33d3ef797c0b01f8f24b977ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logRelease files / dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_aarch64.whl
| Download URL | dkdc_md_cli-0.2.2-cp311-abi3-manylinux_2_34_aarch64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Linux glibc 2.34+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
07c050aad71991ac5e85a4e6f6c372ec796ee30fd285c0baa23e7edf4d7e14ab
|
|
BLAKE2b-256 checksum How to use checksums |
8a942741d7a8d7bfc5425d2e2ac0f23c56039d98aa685716c555f35850196b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logRelease files / dkdc_md_cli-0.2.2-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | dkdc_md_cli-0.2.2-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d67e26049825d1f81f0ba73d51d3aa207bdb7811fb209afd585f104d48a0d1d4
|
|
BLAKE2b-256 checksum How to use checksums |
ff6a1c9703316e2241685453cfbc64470f71ef5486b3538462b3ccd0d83a5d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency logRelease files / dkdc_md_cli-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl
| Download URL | dkdc_md_cli-0.2.2-cp311-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.11 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
573f49ce31d426bf62337895e3c7197a9fd609a2eec91fa0b38552928c4474e2
|
|
BLAKE2b-256 checksum How to use checksums |
155df6121441689c9a5a5e8a356f18d450cafe4186aff7e32300144387d79ebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 13, 2026.
Transparency log