Skip to main content

CLI Overview

The CLI is installed as duckstring, with ds as a shorter alias. Every command prints its own help with --help.

duckstring --version # print the installed version
duckstring --install-completion # enable shell completion
CommandPurpose
statusEvery Pond's state, freshness and recurring Refreshes.
runsRecent Pond Runs and their Ripple Runs, with errors.
queryRead-only SQL across the catalog, or a table's first rows.
getDownload a table's files or an Object.
refreshRefresh a Pond now, every N, at set times, continuously, or when it's queried (Taps).
windowWhen an Inlet can produce new data.
controlWake, force, rebuild, repair, sleep, kill, clear, reset, wipe and retry budgets, for one Pond or many.
dataList, expose and delete tables and Objects, and their lineage.
pondScaffold, test locally, deploy, promote and remove Ponds.
catchmentCreate, register, start and manage Catchments; ducts between them.
duckPer-Pond compute and Duck pools.
spoutDeliver tables to external systems.
secretThe Catchment's write-only secret store.
alertFailure and freshness notifications.
appAn App's instances, output and scaling, and its data across major versions.
installPostgreSQL, DuckDB's extensions and Duckstring's extras for this machine.

Tables and Objects are named POND.NAME, as in the Python API, for example reports.monthly_summary.

Choosing a Catchment​

Commands that talk to a Catchment take --catchment / -c with a registered name. Without it, they use the default Catchment, or the only registered one if there is exactly one. Registrations live in ~/.duckstring/config.toml, which is created with 0600 permissions since it may hold API keys.

Choosing a major version​

Commands that act on one Pond take:

OptionDescription
--major, -mThe major version line to act on. Defaults to the highest deployed major.
--version, -vA full version such as 1.2.0. Selects its major line, and must be that line's currently deployed version, otherwise the command fails.

control also accepts several Ponds, each as name or name@major.

Following a request​

refresh now, control wake and control force follow the request they send. In a terminal they open the live status view and close it once the Pond settles (idle, failed, killed or blocked); refresh add opens it and leaves it open until you press Ctrl+C, and the recurring Refresh keeps going after the view closes.

When the output isn't a terminal (a script, a pipe, an agent), the one-shot commands wait for the outcome instead, as with --wait, and refresh add and status print once and exit.

OptionDescription
--silentSend the request and return.
--watchKeep the view open after the Pond settles (one-shot commands only).
--waitWait until the Pond has done what was asked and settled, then exit with its outcome (below).
--timeoutWith --wait: give up after this duration, such as 10m. Without it, waiting has no limit.
--viewOpen the live status view even when the output isn't a terminal.

control rebuild and pond deploy also take --wait and --timeout. They change what the next Run does rather than starting one, so they wait for that Run: something has to ask for it, such as a recurring Refresh or a refresh now.

A command that waits exits with:

CodeMeaning
0The Pond reached what was asked, and every Run it caused, upstream included, succeeded. It prints the Pond's new freshness.
1A Run it caused failed, or the Pond is failed, killed or blocked. It prints each failed Run's Pond, freshness, Ripple and error.
2--timeout passed first.

duckstring runs POND --ripples then shows the Runs in detail.

Access levels​

Against a Catchment using built-in API keys, each command needs a minimum key level. Read commands (status, queries, lineage) need read; Refreshes need demand; everything that changes configuration, runs or data needs full. See HTTP API.