Skip to main content

arc blocklet

arc blocklet covers the blocklet package and instance lifecycle: scaffold, build, check, list, deploy a single blocklet, or deploy a whole fleet.

arc blocklet covers a blocklet's whole lifecycle: scaffolding a new package, building it, validating it, and deploying it, either on its own or as part of a fleet.

Captured against arc 2.0.0-beta.50 (commit a99fb2c37, main, 2026-09-11). Run arc --version before you copy dumps; the commit is what pins the command surface.

bash
arc blocklet <subcommand> [options]

Global flags (see Overview): --json, --view, --instance / -i (which local ARC instance; omit for default), and --home (instance root; to pick which instance, use --instance).

Scaffold

arc blocklet create

Scaffold a new blocklet package. Aliased as arc blocklet init (kept for backwards compatibility).

Usage

bash
arc blocklet create [dir] [options]
  • [dir] (optional, default cwd): blocklet directory
  • --name <name>: blocklet name (default: directory name)
  • --recipe <name> (alias --template): scaffold recipe, one of basic, blank, blog, agent, minimal-app, agent-workspace, support-community (default basic)

--name must derive a legal blocklet identifier — checked, and rejected, before anything is written to disk:

bash
$ arc blocklet create bad-dir --name "Not A Valid Name!"
ERROR: Error: Cannot derive a blocklet DID from --name "Not A Valid Name!": a blocklet identifier allows alphanumeric, hyphen, underscore only. Pass a valid identifier instead, e.g. --name Not-A-Valid-Name.

No bad-dir directory gets created. A valid name scaffolds normally, and prints a Next: hint for the next step in the pipeline:

bash
$ arc blocklet create my-app --recipe basic
Created blocklet.yaml with did: "did:blocklet:my-app"
Next: arc blocklet build /path/to/my-app

The Next: chain follows the recipe's own capabilities: a DSL-bearing recipe (minimal-app, agent-workspace, support-community, agent, blog) inserts arc dsl validate before the build step, a manifest-only recipe (basic, blank) does not:

bash
$ arc blocklet create my-agent --recipe minimal-app
Created minimal app blocklet "my-agent" with 18 file(s).
Next: arc dsl validate /path/to/my-agent

$ arc dsl validate /path/to/my-agent
Passed DSL validation
  path: /path/to/my-agent
  files: 16
Next: arc blocklet build /path/to/my-agent

$ arc blocklet build /path/to/my-agent
Published 20 file(s) → /path/to/my-agent/dist
  .afs/manifest.json  (http-mount protocol)
  blocklet.dist.json  (flat manifest)
  instance: requires /instance DID Space

Next: arc blocklet run /path/to/my-agent

Deploy to CF Pages:
  arc blocklet deploy /path/to/my-agent --project <project-name>

The Next: hint after a DSL-bearing scaffold is arc dsl validate, and that command does exit 0 on a fresh minimal-app. The rest of the DSL check chain is not uniformly green. With zero edits after arc blocklet create . --recipe minimal-app:

bash
$ arc dsl lint .
Passed DSL lint
  path: /path/to/my-agent
  files: 16

$ arc dsl format --check .
Would format 0 file(s) (dry-run) — nothing to change
  path: /path/to/my-agent
  files: 5

$ arc dsl generate --check .
ERROR: Failed DSL generate (dry-run) — would change 4 file(s)
  path: /path/to/my-agent
  files: 11
  changed: .aup/app.json, .aup/pages/agent.json, .aup/pages/home.json, .aup/wrapper.json

  WARNING missing_man_coverage .aup/man/home.yaml: page "home" declares node-bound action(s) but has no .aup/man/home.yaml coverage
  ERROR generated_changed .aup/app.json: Generated artifact is stale. Run arc dsl generate --write.
  ERROR generated_changed .aup/pages/agent.json: Generated artifact is stale. Run arc dsl generate --write.
  ERROR generated_changed .aup/pages/home.json: Generated artifact is stale. Run arc dsl generate --write.
  ERROR generated_changed .aup/wrapper.json: Generated artifact is stale. Run arc dsl generate --write.

$ arc dsl doctor .
ERROR: Failed DSL doctor
  path: /path/to/my-agent
  decompile step: failed (0 files, 0 changed)

lint and format --check exit 0; generate --check and doctor currently exit 5. This is the CLI's current behavior on a zero-edit scaffold, not a documentation workaround — do not treat those two gates as green just because validate passed.

arc blocklet recipe

Discover the available scaffold recipes.

bash
arc blocklet recipe <subcommand>
  • arc blocklet recipe list: list scaffold recipes
  • arc blocklet recipe explain <name>: explain one recipe

Example

bash
$ arc blocklet recipe list
Blocklet scaffold recipes:
  basic
    Create only a blocklet manifest.
    capabilities: manifest
    generated files: 1
  ...
  minimal-app
    Create a tiny complete app with one web page, one AUP app, one agent, and generated settings.
    capabilities: web, aup, agent, settings
    generated files: 18
    source files: 14
  ...

$ arc blocklet recipe explain basic
Recipe: basic
  Create only a blocklet manifest.
  capabilities: manifest
  generated files:
    blocklet.yaml
  AFS data:
    blocklet.yaml
  checks:
    arc blocklet check <dir>

Build and validate

This repo's own build-and-check pattern (bun .claude/verify/config.ts) is arc blocklet check then arc blocklet build, run against blocklets/arcblock.

arc blocklet build

Build a Pages-ready dist/, copies files and writes .afs/manifest.json plus a flat manifest.

Usage

bash
arc blocklet build [dir] [options]
  • [dir] (optional, default cwd): blocklet directory
  • --output <dir>: output directory (default <dir>/dist)
  • --dry-run: compute the manifest without copying files or writing to disk
  • --clean: clean the output directory before writing (default true)

On success it also prints a Next: arc blocklet run <dir> hint plus a Deploy to CF Pages: hint — see the full chain under arc blocklet create above.

arc blocklet check

Validate a blocklet against a recipe/profile contract. Aliased as arc blocklet validate.

Usage

bash
arc blocklet check [dir] [options]
  • [dir] (optional, default cwd): blocklet directory
  • --profile <name>: validation profile, one of basic, minimal-app, agent-workspace, support-community (default basic)

Unlike create and build, check does not print a Next: hint on success.

arc blocklet dev

Scan blocklet directory conventions and report the results, a lint pass over the directory shape rather than the DSL content (that's arc dsl lint).

bash
arc blocklet dev [dir]

Inspect

arc blocklet list

List local blocklet packages: discovers blocklet.yaml, reports publish status.

bash
arc blocklet list [dir]

arc blocklet inspect

Show the manifest and file list for a local blocklet package.

bash
arc blocklet inspect <ref>
  • ref (required): path to a blocklet directory

Run and deploy

arc blocklet run

Serve a single blocklet on the daemon and print its access URLs.

Usage

bash
arc blocklet run <path> [options]
  • path (required): path to the blocklet directory to serve

To keep a source across daemon restarts, record it on a named instance: arc service start --instance <name> --blocklet <path>. See arc service.

arc blocklet deploy

Publish a blocklet locally, then deploy it to Cloudflare Pages, in one step.

Usage

bash
arc blocklet deploy [dir] [options]
  • [dir] (optional, default cwd): blocklet directory
  • --project <name>: Pages project name (default: blocklet id); multiple blocklets deployed to the same project share a single aggregated http-mount tree
  • --domain <domain>: domain to bind the instance to
  • --cloud <cf|none>: cf pushes to Cloudflare Pages, none is staging only (default cf)
  • --branch <name>: git branch label for the deploy (default main)
  • --staging-root <dir>: staging dir root (default ~/.afs/blocklets-staging)
  • --cf-account-id <id> / --cf-api-token <token>: forwarded to wrangler
  • --verify: after --cloud=cf with --domain, verify the package, diagnostics, and live routes (default true)
  • --routes <list>: space/comma-separated live routes to verify (default /)
  • --compare-local: also fetch matching local routes and compare status/health
  • --local-port <n>: local Arc port used with --compare-local (omit to use the instance registry)
  • --timeout-ms <n>: per-request verification timeout in milliseconds (default 10000)

arc blocklet instance

Manage blocklet instances, i.e. deployments.

bash
arc blocklet instance <subcommand> [options]
  • arc blocklet instance deploy <ref>: deploy a published dist/ to local Pages and bind a domain. --cloud <fs|cf|none> picks the target (default fs); --pages-root <dir> sets the local Pages store root for --cloud=fs (default ~/.arc/pages)
  • arc blocklet instance list: list deployed instances, i.e. Pages projects
  • arc blocklet instance inspect <id>: show details for a deployed instance
  • arc blocklet instance destroy <id>: tear down a deployed instance, removes all deployments and domains; requires --force to confirm
  • arc blocklet instance logs <id>: show deploy history for a Pages instance (no runtime logs available — Pages has no runtime log stream). --follow was removed (it used to be accepted and immediately error "not supported"; now it's rejected outright as an unknown argument, exit 5)

Fleet

arc blocklet fleet deploys a group of blocklets as one aggregate Pages project, this is how a multi-domain site fleet (like this one) gets deployed together.

bash
arc blocklet fleet <subcommand> [dir] [options]

Shared options across the fleet subcommands: --blocklets <list> (overrides --fleet), --fleet <yaml> (defaults to <dir>/site-fleet.yaml or <dir>/fleet.yaml), --deployment <id> (resolves the fleet manifest path from instances.json, mutually exclusive with --fleet), --project <name> (default afsd-blocklets), --domain-root <domain> (default afsd.io).

--deployment/--fleet is a declared, enforced conflict on all four subcommands (not just prose):

bash
$ arc blocklet fleet deploy --deployment foo --fleet bar.yaml
ERROR: Arguments deployment and fleet are mutually exclusive
...

Passing only one of the two flags clears this specific check — it then fails later for a different, expected reason (no such fleet manifest here), which is how you tell the guard discriminates rather than rejecting everything:

bash
$ arc blocklet fleet deploy --fleet bar.yaml
ERROR: Error: Fleet manifest not found: /path/to/bar.yaml
  • arc blocklet fleet deploy [dir]: publish and deploy multiple blocklets with aliases, Web Provider assets, and smoke checks. --publish runs arc blocklet build for every blocklet before staging (default true); --web-library stages Web Provider themes/widgets into /web/.library (default true); --web-library-dir <dir> picks the Web Provider package dir to stage from (default providers/runtime/web-device)
  • arc blocklet fleet verify [dir]: verify a deployed fleet without publishing or pushing changes
  • arc blocklet fleet doctor [dir]: check local prerequisites for a fleet deploy (wrangler availability when --cloud cf, staging root, etc.)
  • arc blocklet fleet rollback <deploymentId> [dir]: roll a Cloudflare Pages fleet project back to a previous deployment