Syncing and deploying

The repo tracks the draft — the same object the browser editor edits. Everything below is about keeping the two in step.

Push and pull

konnecthub push [flow…]     # working tree → the draft
konnecthub pull [flow…]     # the draft → working tree

Both are three-way merges against the cached base, so an edit made in the browser and an edit made locally combine rather than overwriting each other.

A 409 on push while somebody is typing in the browser is normal: the CLI re-merges and retries. If a merge leaves conflict markers in a file, resolve them and run:

konnecthub push --resolved

Throwing work away

Two commands destroy local work, so both list what they would lose and then ask. --discard answers; without a TTY they exit 2 rather than guessing.

konnecthub reset [flow…]      # tree ← draft, discarding local edits (--remote deletes the draft too)
konnecthub checkout <n>       # draft ← published version n, on the server and in the tree

Binary files do not merge

Static assets sync as bytes. When the same asset changed on both sides there is nothing to merge, so push refuses and pull takes the remote copy, keeping yours alongside as .<name>.mine.

Every sync lists which paths it handled as bytes, so this is never a surprise. Source is capped at 2 MB and an asset at 15 MB; a file too large to be source can be marked static in the editor.

Deploying

konnecthub deploy [flow…]

One command, four steps: push the working tree, publish it, wait for the bundle to reach READY, and activate. It exits non-zero if any step fails, which is what makes it usable as a CI step.

konnecthub rollback <n>     # make an earlier published version active again

Watching what happened

konnecthub runs                 # recent executions of this project's flows
konnecthub inspect <run>        # why a run did what it did — summary first
konnecthub logs <run> --follow  # a run's log lines, with --tail and --follow

inspect leads with the summary — which step failed and why — rather than making you page through a successful prefix.

Working offline, and escape hatches

konnecthub check      # validate locally: entry files, inputs.json, imports, skills. No network
konnecthub types      # refresh the cached SDK declarations
konnecthub libs       # mirror published workspace libraries so lib: imports resolve

check works when everything else refuses, which makes it the first thing to run when a deploy fails for a reason you cannot see.

For anything without a first-class command:

konnecthub routes [pattern]              # what routes exist, from the live OpenAPI document
konnecthub routes --show <method> <path> # one route's parameters and body shape
konnecthub api <method> <path>           # call it

The API describes itself at /api/docs.json, unauthenticated and complete. Resolve a route rather than guessing its shape.

Next