deploy is the command you run day to day: it compiles every bound component, uploads only the definitions
whose document actually changed, and runs the platform’s own check_definition against each workflow definition
it uploaded. Re-running it with nothing changed uploads nothing and says so.
It is build plus push plus
check, with one difference that matters at each step: it refreshes the import
allowlist live, it skips definitions that would upload identically, and it checks after every upload has
finished rather than between them.
Synopsis
What it does
- Resolves the blob and revision. This is a write: status
ready, phasedraftormanaged. - Refreshes the import allowlist live. It reads the blob’s
blobhub.compute.workflow.code_importswith the same key and rewrites the cache under~/.blobhub/cache/allowlist/, so a laterbuildverifies against something current. It never falls back to the cache: a403here isBLOB_NOT_ACCESSIBLE, since the key has just resolved the blob and its uploads would meet the same refusal.--dry-run, below, reads it the same way and writes no cache. - Lists the revision’s definitions in every category and matches the manifest against them.
- Checks every listener and every widget, then lists each widget whose permissions changed and, without
--yes, refuses to install it (below). A refusal here stops the deploy before any create, upload or rewrittensource. - For each entry: compiles every bound component into an in-memory copy of the document, applying the same
remote-edit gate and
--forceasbuild. - Compares that document against the remote one. Equal means skipped — no upload, and the local file is not rewritten either.
- Otherwise writes the built document to
source, creates the definition if its alias is absent, and uploads. - Once every entry above is done, and not before, runs
check_definitionagainst each workflow-category definition it uploaded.
unchanged line names a bare alias where every other line names category/alias; on a revision where one
alias legitimately names both a workflow and a playground definition, read it together with the lines above it.
Under --json the payload carries created, uploaded, unchanged, planned, skipped_check, checked, stale,
confirm, dry_run and drift, alongside the envelope’s schema_version. checked holds the checker’s own events
per definition, not just a status. stale lists each widget whose build directory packs to a different document than
its source, as {category, alias, source, rebuild}, rebuild being the command that rebuilds that widget alone, and
is empty when there is none. confirm lists each widget whose permissions changed, as
{category, alias, permissions, lines}: what --yes installed, or what a dry run would need --yes for. It is empty
when there is none (below).
Uploads and checks are two passes, on purpose
Every changed definition is uploaded before the first check runs. Compilation and upload do interleave — each definition is compiled and uploaded before the next one is read — but no check runs until the last upload has finished. The obvious alternative, checking each definition right after uploading it, is worse, and the reason is thatdeploy cannot roll back an upload.
Stopping at the first failing check would leave one definition on its new code and its sibling still on the old
one: a half-deployed revision. And it would leave that behind on top of an incomplete report, because the checks
for everything after the failure never ran. Finishing every upload first means a failing check is always
reported against a fully applied deploy.
A CHECK_FAILED from deploy therefore says the upload happened and the result does not pass, never the
upload was refused. The definition is on the revision. Fix it and deploy again.
Within the check pass itself, deploy reports the first failure and stops. To see every failing definition
at once, run blobhub workflow check, which collects them all.
Playgrounds are not checked
check_definition loads the workflow manifest unconditionally, so running it against a playground definition
checks it against the wrong manifest and produces meaningless findings. deploy skips it and says so on its own
output line rather than silently. A playground is still uploaded exactly like a workflow definition; only the
check is skipped.
Listeners go last and are validated first. Entries are written workflow, then widget, then playground, then
listener, so a listener’s workflow reference can name a workflow the same run created. Every listener body is checked
offline in pass one, before any write, and a changed one is uploaded as written with no check_definition, since the
upload runs the same validator. See listener entries.
Widgets are checked before any write and uploaded as they stand. In pass one, after the listeners, every widget
entry’s source must exist, else MANIFEST_INVALID hinting blobhub workflow build of that widget alone (pull of it
for an entry with no widget binding), and must pass the offline checks: the
document rules, its libraries against the catalog when it declares any, its entry module’s imports, and its size against
the blob’s served blobhub.compute.workflow.widget_definition_bytes. The catalog is read once per run, from
--library-catalog or https://blobhub.io/libs/catalog.json. deploy never packs a widget and never rewrites its
source: it uploads the committed document, so an install needs no Node and no build directory. When the entry’s build
directory still exists and packs to a different document, deploy warns WIDGET_SOURCE_STALE, prints
stale widget/<alias>: …; run blobhub workflow build -f <manifest> --definition <alias> on stdout so the warning
survives -q, lists the widget in stale, and uploads the source regardless. A build directory that exists but does
not pack stops the deploy before any write, since whether its source is stale cannot be told. A widget gets no
check_definition and no skipped_check entry: the offline checks and the upload’s own validation stand in.
What counts as unchanged
The comparison is the full serialized document, local against remote — not a hash of the code, not a timestamp. A definition is skipped only when everything about it matches: components, connections, ports, the compiledcontent[], and the attributes the compiler stamps.
Two consequences worth knowing:
- An unchanged definition leaves its local file untouched.
deploywritessourceonly for the definitions it uploads. In the ordinary case the file on disk already equals the built document, so there is nothing to write; if it does not, runbuildto bring the file itself up to date. - Someone else’s browser edit does not stop the upload. The remote-edit gate reads the code port in the
local definition file, which is all
buildhas to work with. A change made in the visual editor and never pulled is simply a document difference, sodeployuploads over it. On a revision other people edit in the browser, rundifffirst — it is the only command that reports the remote’s state.
source’s content_hash equals
the one on its listing row. A widget created but never uploaded has no hash on its row, so deploy uploads it.
Confirming what a widget may do
deploy never waits on input, so a terminal and a script behave the same. Whoever installs a widget confirms what it
may do by passing --yes (Trust at install).
After every check of pass one and before any create, upload or rewritten source, deploy lists, in manifest order,
each widget it will upload whose permissions grant something the deployed definition’s do not, or no longer grant
something they did. It compares what is granted, not the text: an empty executions or links list counts as absent,
and both lists compare as sets, so their order, or a workflow listed twice, changes nothing. A widget not deployed yet,
or created and never uploaded, grants nothing, so a new widget asking for no permission is not listed, and neither is
one whose hash is unchanged, since it is not uploaded.
For each widget it lists, deploy prints <alias> asks to: on stderr, then the widget’s lines indented by two spaces,
a list’s items indented beneath their line. For the permissions of the example under
Permissions:
An empty
executions or links list draws no line, and a widget left with no permission at all shows
This widget asks for no permissions.
Without --yes, deploy then refuses with WIDGET_NOT_CONFIRMED, naming every widget it listed:
source, so nothing is created, uploaded or rewritten, a
workflow in the same manifest included, and the revision and every source stay as they were. It exits 1. Its hint is
the command as run, with its own -f, each --definition, --force and --library-catalog, then --yes, and the
global --org and --profile before workflow when the run was given them; no other global option is repeated. Each
value in it is quoted for the shell, so a manifest path with a space pastes back as one argument. Read the lines, then
run that command: with --yes, deploy prints the same lines and installs. A deploy with no widget to list needs no
--yes.
The lines go to stderr and -q does not quiet them, since they are what --yes accepts. Under --json they are not
printed: the payload’s confirm carries them when the deploy installs, and the refusal’s error envelope carries them
as confirm.
--dry-run
Runs every step above that only reads, and stops where the deploy would first write. It resolves the target, reads
the allowlist live, checks every listener and widget, compiles every bound component in memory, and compares each
document with the deployed one, downloading each definition that has a row (a widget is compared by its row’s hash, as
above). Then it reports what the deploy would do and does none of it: no create, upload or check_definition, no
rewritten source, and no allowlist cache file.
would upload names exactly the definitions the deploy would upload, and unchanged the ones it would skip, in the
words the deploy prints, so a dry run and the deploy that follows it agree line for line on what changes. Under
--json, planned holds each {category, alias, action} and unchanged the aliases the deploy’s payload would list.
A dry run refuses what the deploy would refuse, before any write: a compile error, a remote edit without --force, an
import the live allowlist does not permit, a refused allowlist read, and a widget that fails a check. A remote edit’s
hint is the dry run again, with --force added and --dry-run and each --definition kept, so pasting it previews the
forced deploy rather than performing it. stale is reported as it would be. diff
reports what differs and how, a compile failure instead of stopping on it, and the remote’s own state.
The one refusal a dry run skips is the one for want of --yes: it prints on stdout, before the calls it plans, each
widget a deploy would need --yes for and its lines, and lists them in confirm:
Errors
IMPORT_UNAVAILABLE reads differently here than under build: deploy holds the live allowlist, so its message
appends what that allowlist currently permits. DEFINITION_SIZE_NEAR_LIMIT fires at 8 MB — 80% of the
platform’s 10 MB payload ceiling — so a definition that is growing tells you before an upload starts failing at
the gateway.
Every code above, with its remediation, is in Error codes.
See also
blobhub workflow diff— the same comparison, reported and never performed.blobhub workflow build— the compile step alone, offline.blobhub workflow check— every failing definition, wheredeployreports the first.- Check Definition — the operation behind the check pass.
- Custom Widgets — building a widget and deploying it to a playground.
- Workflow overview — where
deploysits among the ten commands.

