flowctl — the agent's command line
flowctl is a small dependency-free utility that ships with the skill. It validates flows before saving, ships changes, and reads run logs — the things an agent does most often — in a single call instead of hand-rolled GraphQL requests.
Installation and environment
The binaries live in the skill: https://dynapi.ru/cms/agent-skill/cli/.
Download the file for your system — that is all, the utility needs no
installation:
| System | File |
|---|---|
| Linux | flowctl-linux-amd64 |
| Windows | flowctl-windows-amd64.exe |
| macOS (Apple Silicon) | flowctl-darwin-arm64 |
| macOS (Intel) | flowctl-darwin-amd64 |
The address and the key are set via environment variables once per session.
Linux and macOS:
export DYNAPI_URL="https://dynapi.ru/cms/graphql"
export DYNAPI_APIKEY="dca_…"
Windows (PowerShell):
$env:DYNAPI_URL = "https://dynapi.ru/cms/graphql"
$env:DYNAPI_APIKEY = "dca_…"
Every network command picks them up automatically; the --url and --key
flags override the environment when you need to work with a different
project.
If a command “does not exist”, your binary is old: the command set grows
with every release. flowctl version prints the build; the fresh file
lives at the same address (the endpoint never changes, only the utility).
Commands
Validation
| Command | What it does |
|---|---|
flowctl validate <flow.json> |
Locally: parse the flow document, graph invariants, Liquid syntax in every node. Sends nothing to the server. |
flowctl dryrun <flow.json> |
A dry run of an unsaved flow on the server (dryRunFlow): prints steps, fired conditions, and errors. |
flowctl runs <slug> |
The health of a live flow as text: how many times each node fired, average duration, the last error. |
Publishing
| Command | What it does |
|---|---|
flowctl save <flow.json> |
Save a flow as a draft. Never publishes. |
flowctl publish <slug> |
Roll the flow draft out to the main address. |
flowctl apply <export.json> |
Full import of an export: handle + flow + templates + routes. --publish publishes right away. |
flowctl flow list / flow get-doc <slug> |
The scenario list; the live flow document as JSON (--out writes a file) — the honest answer to “what does this scenario actually do”. |
flowctl site publish |
The full site publication: template, static and query-library drafts promoted, routes and queries merged (tombstones honored, newer live writes kept), sitemap rebuilt. Prints what moved. |
After saving, verification happens on the preview host
(https://preview-<subdomain>.dynapi.ru): it always executes drafts;
visitors of the main address never see them.
Site material
| Command | What it does |
|---|---|
flowctl files push <path…> |
Upload templates and statics from disk (a directory — recursively). --publish publishes right away. |
flowctl template list / static list |
The site file inventory: every path and its state — live (published), draft (an unpublished new file), live+draft (an unpublished change on top of a published file). |
flowctl files delete <path> |
Remove a file from BOTH copies — the draft first (it is what would resurrect the file at the next full publish), then the live one. --publish follows with a full publish so every replica drops its cache. |
flowctl route <list|save|publish|delete> |
Routes: list, draft, publish, delete. |
flowctl query <list|save|publish|delete> |
The query library. Deletion goes through a draft TOMBSTONE (query delete): a live entry deleted without one resurrects at the next full publish. |
flowctl subdomain [name] [--set] |
The current subdomain and URLs; an availability check; --set claims it. |
Content
| Command | What it does |
|---|---|
flowctl entity <types|schema|items|get|create|update|delete|delete-type|count> |
Content types and records without hand-rolled GraphQL: list types, schema, record pages, create/edit/delete. |
flowctl entity count <type> |
The honest row total (with --where/--search) — useful when a paged listing runs into the 100-row cap. |
flowctl entity delete-type <type> |
Drop a type AND every record of it (one cascading transaction, irreversible). Prints what exactly disappears first and asks for confirmation; --yes for scripts. |
flowctl media push <file…> |
Upload files to the media library; prints each file’s id and url. |
flowctl media refs <id> |
Where a file is used — the pre-delete safety check. |
flowctl secret <set|list|delete> |
Project secrets for secret:// references in flows. The value is fed via stdin; a stored secret cannot be read back. |
Capturing a record id: flowctl entity create|update … -quiet prints the bare id — that is what goes into a variable. The decorated line like ✓ create … id=… is prose for humans; inside a variable it breaks record references. When the id immediately feeds another record’s field (say, a page’s seo), re-read that record afterwards and confirm the reference resolved.
Bulk work needs pacing. The platform caps management operations per
minute: a wizard-scale install or a site-wide files push is legal
call-by-call yet trips the cap on its tail — usually the final publish.
Split large jobs into batches with pauses, and after a 429 wait out
retry_after.
A sample session
# environment
export DYNAPI_URL="https://dynapi.ru/cms/graphql"
export DYNAPI_APIKEY="dca_…"
# validate the flow locally and on the server
flowctl validate katalog.json
flowctl dryrun katalog.json
# save as a draft, check on preview, publish
flowctl save katalog.json --slug katalog
curl -s https://preview-<subdomain>.dynapi.ru/katalog
flowctl publish katalog
# make sure the live flow is healthy and the site files are in order
flowctl runs katalog
flowctl route list
flowctl template list