CLI Workflow
Quick Answer
Default flow lifecycle:
- Edit working copy (
pull/push/validate) - Verify runtime (
run) - Use
release/promote/installationsonly when you need explicit rollout governance
Default Reporting Step
If work is blocked by missing capability or unclear failures, report it before ending the task:
breyta feedback send \
--type issue \
--title "Short summary" \
--description "What failed, expected behavior, and workaround tried" \
--flow <slug> --workflow-id <id> --run-id <id> --agent
Use --type feature_request for missing product capability.
Canonical Commands
| Stage | Command |
|---|---|
| Inspect workspace flows and metadata | breyta flows search "<query>" --limit 5; breyta flows show <slug> for the nearest match; breyta flows list --limit 10 only when you need a workspace-wide list |
| Search workspace source/config literals | breyta flows grep "<pattern>" --surface definition,tools --limit 5 [--or <variant>] |
| Discover approved reusable templates to copy from | breyta flows templates search "<query>" --limit 5; breyta flows templates grep "<pattern>" --surface steps,tools --limit 5 |
| Reuse existing data/resources | breyta resources search "<query>" --limit 5; breyta resources read <resource-uri> --limit 5; breyta resources upload ./hero.png --print-uri |
| Browse public installable flows for this workspace | breyta flows discover list; breyta flows discover search "<query>" |
| Reuse/create/test connections (when external systems are involved) | breyta connections list; breyta connections create ...; breyta connections test <connection-id> |
| Pull local file | breyta flows pull <slug> --out ./tmp/flows/<slug>.clj |
| Push working copy | breyta flows push --file ./tmp/flows/<slug>.clj |
| Suggest config wiring | breyta flows configure suggest <slug> |
| Configure draft target (when required) | breyta flows configure <slug> --set api.conn=conn-123 --set activation.region=EU |
| Configure live target for a specific release (advanced) | breyta flows configure <slug> --target live --version <n|latest> --set api.conn=conn-123 |
| Promote current draft setup to live target (advanced) | breyta flows configure <slug> --target live --from-draft --version <n|latest> |
| Update installation activation inputs (advanced) | breyta flows installations configure <installation-id> --input '{"region":"EU"}' |
| Update marketplace visibility | breyta flows marketplace update <slug> --visible=true |
| Update public discover visibility | breyta flows discover update <slug> --public=true |
| Update grouping, discover card media, or display-icon metadata | breyta flows update <slug> --group-key billing --group-name "Billing"; breyta flows update <slug> --publish-media-type image --publish-media-source-kind https-url --publish-media-source https://...; breyta flows update <slug> --primary-display-connection-slot crm |
| Validate working copy | breyta flows validate <slug> |
| Run and wait | breyta flows run <slug> --input '{"n":41}' --wait; add --interface-id <id> only when selecting the declared manual interface explicitly |
| Inspect active incidents | breyta incidents list --status open; breyta incidents list --status open --mine; breyta incidents show <incident-id> |
| Inspect affected lanes/keys | breyta incidents lanes <incident-id> |
| Change operator disposition | breyta incidents acknowledge <incident-id>; breyta incidents snooze <incident-id> --for 2h; breyta incidents suppress <incident-id> |
| Inspect digest artifacts and delivery state | breyta digests list --kind scheduled --cadence monthly; breyta digests show <digest-id>; breyta digests deliveries <digest-id> |
| Change digest cadence | breyta digests cadence; breyta digests cadence set monthly |
Authoring Loop (Working Copy)
breyta flows pull <slug> --out ./tmp/flows/<slug>.clj- Edit file
breyta flows push --file ./tmp/flows/<slug>.clj- If the flow has required slots/inputs:
breyta flows configure <slug> ... breyta flows configure check <slug>
For large local source files, breyta flows push also expands explicit local include forms before upload:
:functions [#flow/include "flow-assets/functions/normalize-config.edn"]
:templates [#flow/include "flow-assets/templates/security-reviewer.edn"]
The include path is resolved relative to the flow file you push. Expansion happens only in the uploaded payload; your local source file keeps the include form.
connections test is a health/config check. It does not replace a real flow run against the target system.
If you are updating live after a slot change, use version-pinned live checks/applies:
breyta flows configure check <slug> --target live --version <n|latest>breyta flows configure <slug> --target live --version <n|latest> --set ...
For a brand-new flow with required slots, use --version latest on the live target before the first release. Otherwise flows release <slug> can fail with live_config_incomplete.
Optional checks:
breyta flows validate <slug>breyta flows show <slug>breyta flows diff <slug>
Public discover notes:
- Public discover is stored metadata, not just a UI interpretation of the flow file.
- Marketplace visibility is stored metadata. You can author
:marketplace {:visible true}in source or change it explicitly withbreyta flows marketplace update <slug> --visible=true. Ask for explicit flow-author approval and prove installable readiness before enabling it. - Paid app monetization can be saved from the flow Publish page or authored in
source with:marketplace {:app {... :monetization {:plans [...]}}}and
persisted on push. Legacy flow-level:marketplace {:monetization {...}}
remains supported for existing listings. - Paid public-flow monetization supports
:free,:one-time,:subscription,
:usage, and:subscription-usagepricing metadata. Usage pricing records
run allowances in metadata while run metering and Stripe usage invoicing are
rolled out. - Seat-based pricing is not implemented; use run quantities only for
usage-priced plans. - File-based authoring can set
:discover {:public true}directly in the.cljflow source. Do not push source that contains:discover {:public true}or:marketplace {:visible true}until the flow author has approved broad public access and installable readiness is proven. - File-based authoring can also set
:publish-mediadirectly in the.cljflow source. - Use
breyta flows discover list/breyta flows discover search <query>to inspect the public installable catalog that appears in the web app. These commands exclude flows owned by the current workspace by default because they show what this workspace can install. - Use
--include-ownonly when debugging whether your own public flow is indexed. Verify the buyer/install experience from another workspace. - Use
breyta flows discover update <slug> --public=truewhen you want to enable discover visibility explicitly after push. Ask for explicit flow-author approval and prove installable readiness before enabling it. - Public discover requires explicit public visibility and an active released version
with an installable interface. breyta flows templates search/grepis a different catalog: it returns approved reusable templates to inspect and copy from.
Public flow checklist for CLI/source work:
- If the flow is a new paid app, author
:marketplace {:app {... :monetization {:plans [...]}}}in source before
push. Keep:marketplace {:monetization {...}}only for an existing legacy
listing. - Add install-surface copy and discover card media when the public surface should be polished:
breyta flows update <slug> --publish-description-file ./publish-description.mdbreyta flows update <slug> --publish-media-type image --publish-media-source-kind https-url --publish-media-source https://...
- Choose one marketplace visibility path:
- Source-first: add
:marketplace {:visible true}to the flow definition before push only after explicit approval. - Explicit after push: push first, then run
breyta flows marketplace update <slug> --visible=trueonly after explicit approval.
- Source-first: add
- Choose one discover visibility path:
- Source-first: add
:discover {:public true}to the flow definition before push only after explicit approval. - Explicit after push: push first, then run
breyta flows discover update <slug> --public=trueonly after explicit approval.
- Source-first: add
- Push the flow with
breyta flows push --file .... - If you chose an explicit marketplace/discover path, run those update commands after push.
- Release/promote it so there is an installable live version.
- Verify the web Discover install path. For CLI indexing checks, use another
workspace or add--include-ownonly while debugging the owner workspace.
For the app-first paid-flow path, seller onboarding, and the dedicated Publish
page, see Paid Public Flows.
If a flow is public in source but not visible in Discover, the first things to check are:
breyta flows show <slug> --prettyincludesdiscover.public- the flow has an active released version that can be installed
Grouping notes:
breyta help flows updateshows the writable grouping fields and exact clear syntax.flows listexposesgroupKey,groupName,groupDescription, andgroupOrderwhen a flow is grouped.flows showalso exposesgroupFlows, which lists sibling flows in the same group.- Set explicit order with
breyta flows update <slug> --group-order <n>when grouped flows should render in execution order. - Lower
groupOrdervalues sort first. Use spaced values like10,20,30. - Clear only the order with
breyta flows update <slug> --group-order "". - Use the existing flow metadata update surface to maintain grouping metadata, then verify with
flows show <slug>. - Grouping metadata is mutable workspace metadata and does not round-trip through
flows pull/flows pushsource files. - For a focused grouped-flow guide with examples, see Flow Grouping.
Display icon notes:
primaryDisplayConnectionSlotchooses which connection/provider icon is shown anywhere the flow icon renders today.- In the UI this is labeled
Display icon. - Set it from the flow detail UI or with
breyta flows update <slug> --primary-display-connection-slot <selector>. - Clear it with
breyta flows update <slug> --primary-display-connection-slot ''. - Selectors come from declared
:requiresslots or normalized keys from:connections. - If unset or unmatched, rendering falls back to the first explicit
:connectionsicon, then the first inferred:requiresicon. flows show --prettyJSON responses includeprimaryDisplayConnectionSlotplus_hintswhenever the flow exposes connection metadata or a saved display selector.
Example:
{
"ok": true,
"data": {
"flow": {
"flowSlug": "customer-support",
"primaryDisplayConnectionSlot": "crm"
}
},
"_hints": [
"Inspect `requires`, `connections`, and `primaryDisplayConnectionSlot` with `breyta flows show customer-support --pretty`.",
"Set the rendered flow icon with `breyta flows update customer-support --primary-display-connection-slot <selector>`.",
"Clear it with `breyta flows update customer-support --primary-display-connection-slot ''`.",
"If unset or unmatched, the icon falls back to the first explicit `connections` icon, then the first inferred `requires` icon."
]
}
Discover card media notes:
- Use
breyta flows update <slug> --publish-media-type ...when public cards should show a curated image or video preview - Use
--publish-media-source-kind https-url|flow-resourceplus--publish-media-source <value>to set the hero asset - Use
--publish-media-poster-kindand--publish-media-posteronly for video media - Use
--clear-publish-mediato remove stored discover card media - If you keep discover card media in source control, author it as
:publish-mediain the flow file and push it - Use
breyta help flows updatefor the exact flag surface
Advanced Release + Install Operations
Use flows release / flows promote / flows installations ... only when you need explicit scopes, promotion control, or installation-specific webhooks.
| Task | Command |
|---|---|
| Inspect draft vs live source before release | breyta flows diff <slug> |
| Create release (default also promotes live and track-latest installations) | breyta flows release <slug> --release-note-file ./release-note.md |
| Create release without promoting end-user installations | breyta flows release <slug> --skip-promote-installations |
| Update a version release note later | breyta flows versions update <slug> --version <n> --release-note-file ./release-note.md |
| Promote live + track-latest installations explicitly | breyta flows promote <slug> |
| List installations | breyta flows installations list <flow-slug> |
| Inspect creator install stats/events | breyta flows installations stats <flow-slug>; breyta flows installations events <flow-slug> --limit 10 --since 7d |
| Create installation | breyta flows installations create <flow-slug> --name "My install" |
| Show installation | breyta flows installations get <installation-id> (includes installedVersion, latestAvailable, updateAvailable, policy) |
| Configure inputs | breyta flows installations configure <installation-id> --input '{"region":"EU"}' |
| Enable/disable installation runability | breyta flows installations enable <installation-id> / breyta flows installations disable <installation-id> |
| List callable interfaces and endpoints | breyta flows installations interfaces <installation-id> |
| Upload files to a webhook interface | breyta flows installations upload <installation-id> --file ./a.pdf |
New end-user installations follow the latest released version by default.
Zero-setup installations can auto-enable immediately; installations with setup
requirements stay disabled while setup is incomplete, then start only after the
installer enables them.
Disabling an installation is a global pause. It blocks manual runs, interface
calls, and schedules for that installation, but keeps the saved setup,
per-interface settings, and per-schedule settings so they can resume when the
installation is enabled again.
Release Defaults
breyta flows release <slug> always promotes the live target for the selected workspace and, by default, also promotes track-latest end-user installations.
Attach a markdown release note whenever you know what changed. It becomes part of the version metadata returned by flows show / flows versions list.
If the flow has required slots and no active version yet, configure the live target first with --target live --version latest before running flows release.
Runtime Verification
- Canonical:
breyta flows run <slug> --wait - Advanced explicit target:
breyta flows run <slug> --installation-id <installation-id> --wait - Inspect run:
breyta runs show <workflow-id> - Filter runs:
breyta runs list --query 'status:failed flow:<slug>'
Flow Health Delivery Timing
- Flow-health incident/digest commands are currently available to workspace
creators/admins. breyta digests cadenceupdates only your own delivery settings in the
current workspace.- Scheduled digests summarize surfaced incident changes from the selected
daily,weekly, ormonthlywindow. - If there are no surfaced incident changes in that window, no scheduled digest
is sent. - Urgent incident updates are delivered as soon as possible when your email
delivery mode includes urgent issues. - Urgent emails are not delayed to the next scheduled digest.
- Use
breyta digests cadenceorbreyta digests cadence set daily|weekly|monthlyto
inspect or change the scheduled cadence from the CLI.
flows run uses draft-target bindings/config by default, but the executed code version still comes from the active release unless you override it with --version.
runs list uses the same structured filter syntax as the web runs list. Use installation:<installation-id> for installation runs and version:<n> for the flow version active when the run started.
Post-Release Targeting
After breyta flows release <slug>, the live install is updated for the selected workspace by default. Track-latest end-user installations are also promoted unless you pass --skip-promote-installations. Default breyta flows run <slug> still uses draft-target bindings/config.
Use explicit flags when you want installation runtime behavior:
| Target | Command |
|---|---|
| Draft setup/config (default) | breyta flows run <slug> --wait |
| Installed live | breyta flows run <slug> --target live --wait |
| Specific installation | breyta flows run <slug> --installation-id <installation-id> --wait |
For new flows, declare per-run fields under :invocations, expose the author
run button through :interfaces :manual, and pass values with --input.
Older manual field shapes remain executable for compatibility, but new docs and
new source should use :invocations plus :interfaces :manual.
If you skipped end-user installation promotion during release (--skip-promote-installations), promote them later with:
breyta flows promote <slug>
Invocation Interfaces
Use :interfaces when a solution flow should be callable by a manual run form,
another program, HTTP client, webhook provider, or MCP/coding-agent tool. The
source contract normally lives in :invocations {:default ...}; :interfaces
only declares the call surface.
A flow should normally expose one public invocation for the solution, with at
most one manual adapter, one HTTP adapter, one webhook adapter, and one MCP
adapter. Use extra invocation ids only when an adapter needs a genuinely
different payload contract, not to turn one flow into several unrelated tools.
Author smoke loop:
breyta flows push --file ./flow.clj
breyta flows run <slug> --input '{"key":"value"}' --wait
breyta flows interfaces call <slug> <http-interface-id> --input '{"key":"value"}' --wait
breyta flows release <slug>
breyta flows interfaces list <slug> --target live
breyta flows interfaces show <slug> <http-interface-id> --target live
breyta flows interfaces curl <slug> <http-interface-id> --target live --input '{"key":"value"}'
breyta flows interfaces call <slug> <http-interface-id> --target live --input '{"key":"value"}' --wait
breyta flows metrics <slug> --source live
Consumer/installation loop:
breyta flows installations create <slug> --name "Client API"
breyta flows installations configure <installation-id> --input '{"setup":"value"}'
breyta flows installations enable <installation-id>
breyta flows installations interfaces <installation-id>
breyta flows interfaces call <slug> <http-interface-id> --installation-id <installation-id> --input '{"key":"value"}' --wait
breyta flows metrics <slug> --installation-id <installation-id>
Consumer composition recipe:
- Discover or choose the public flow to reuse.
- Create, configure, and enable an installation in the caller workspace.
- Inspect
breyta flows installations interfaces <installation-id>. - Use the installation-scoped HTTP or MCP interface from the wrapper flow,
coding agent, or external client.
Use installation-scoped endpoints for consumer calls:
/api/flows/{flow-slug}/installations/{installation-id}/interfaces/{interface-id}
/api/workspaces/{workspace-id}/flows/{flow-slug}/installations/{installation-id}/interfaces/{interface-id}
For MCP, connect to the installed Streamable HTTP interface with bearer auth,
then call initialize, tools/list, and tools/call. Paid public flows can
return entitlement errors such as billing_trial_ended; handle those as billing
state rather than interface-shape failures.
flows interfaces curl prints Authorization: Bearer ${BREYTA_TOKEN} as a
placeholder. Interface calls still require normal workspace/API authentication in
the current CLI path.
For async or long-running interfaces, the HTTP response includes data.statusUrl
when the run has a workflowId. That endpoint is scoped to the same interface
surface and can be polled by API clients. The CLI --wait flag handles this
polling for author smoke tests.
Use flows metrics to inspect aggregate invocation health for invocation-backed
client surfaces. Metrics are redacted counters and timings only; they do not
include raw request bodies, response bodies, tokens, headers, secrets, or
binding values. Use --source draft or --source live for author-owned
interface calls, and --installation-id <id> for installed consumer calls. The
returned interfaceScope keeps draft, live, and installation traffic separate
even when they use the same interface id. Use runs show <workflow-id> when you
need an individual run.
MCP interfaces need the same explicit authorization boundary. A coding agent
should connect to Breyta with a scoped workspace API credential for the
installation/interface surface, and tool discovery should generally return one
MCP tool for the installed solution flow. It should not expose non-interfaced or
unauthorized invocations. Unlike normal HTTP interface calls, MCP tools/call
requests wait for the backing flow run to complete up to a bounded 180-second
timeout and return the flow result to the tool caller, with Breyta run metadata
under _breyta.
Run Targeting Matrix
Use this matrix for breyta flows run <slug>.
| Scenario | Required flags | Why |
|---|---|---|
| Normal run with draft-target bindings/config | none | Slug-only is the default path; executed code still resolves from the active version unless --version is set. |
| Run installed live target (advanced) | --target live | Explicitly target installation runtime. |
| Run a specific installation (advanced) | --installation-id <id> | Deterministic explicit target selection. |
| Multiple matching installations | --installation-id <id> | Resolve ambiguity. |
| Override flow release version for this run | --version <n> | Force a specific release version for this invocation. |
| Provide invocation input payload | --input '{...}' | Pass per-run input to the flow. |
| Wait until terminal status | --wait (optional --timeout, --poll) | Block and stream final run result. |
Docs Lookup
| Task | Command |
|---|---|
| Check installed skill drift | breyta skills status --provider all |
| Search docs | breyta docs find "flows run" --limit 5 --format json |
| Open page | breyta docs show <slug> --section <heading> for focused reads; add --full only when needed |
| Offline corpus grep | breyta docs sync --out ./.breyta-docs --clean && rg -n "<query>" ./.breyta-docs/pages |
Compatibility Notes
Legacy command aliases remain executable for compatibility, but canonical
guidance uses only the commands in this page. New manual, HTTP, webhook, and MCP
ingress should be authored and inspected through interfaces.