Lolly Beta
Launch App

AutomateURL and CLI automation

lw CLI: administer Lolly Work

Note: Lolly Work

This guide covers the optional organisation service. Configuration, console and API paths refer to your Lolly Work instance. The packaged console keeps its release-matched copy of this guide.

lw runs a Lolly Work instance from a terminal: people and invitations, asset sources, the catalog, renders and delivery, audit and governance. It calls the same API as the console, so the two stay in step, and anything an admin does in the console can go in a script. To render artwork from a terminal, use the lolly command instead (the Lolly CLI).

Install and sign in

Run lw from a Lolly Work checkout as pnpm run cli <args> or node cli/lw.ts. Run npm link once in the checkout to get the plain lw the examples use.

Note: Run lw from a checkout

lw is not in the container image or the Helm pod, so you cannot run lw from inside the deployment.

export LW_BASE=https://lolly.example.com    # or pass --base <url>
lw login                                    # device code: confirm it in a signed-in browser
lw summary
lw --json audit head                        # machine output

Plain lw login prints a short code and the instance's /activate URL. Open that URL in any browser where you are already signed in, type the code and approve; the CLI collects an ordinary session on its next poll. Codes are database rows, so any replica can answer, and the flow works on every deployment. The session is stored at ~/.config/lolly-work/session (mode 0600).

lw login --cookie 'lw_session=…'            # paste a browser session (works everywhere)
lw login --email admin@example.test         # the dev provider (dev.enabled only)

Command map

You want toCommandsMore
See who you are, what is connected and whether the audit chain holdswhoami, summary, fleet, instance, links, audit, previewReading
Host the signed instance packinstance pack, instance pack-rmHosting the instance pack
Let people sign ininvite add, invite ls, invite rmInvitations
Give automation its own identitytokensService tokens
Connect an agent with a service tokenmcp configMCP settings
Choose the tool for a visual intentintent resolveVisual intents
Render and recover rendersrenders, render-batchesRecoverable renders
See approval requests and get a reviewed fileapprovals, approvals artifactApproval files
Send finished files to a destinationdestinations, deliveriesOrganization delivery
Manage grants and policy as codegrants, export, applyGovernance
Provision people from an identity providerscim tokenSCIM provisioning tokens
Apply retention and handle accountsretention run, usersData lifecycle
Connect and leave asset sourcesprovidersCatalog providers
Add and review catalog assetscatalog submit, catalog queue, catalog approve, catalog returnCatalog submit
Send a large fileuploadResumable uploads
Edit metadata, collections and versionscatalog fields, catalog meta, catalog collection, catalog versionsOrg-defined metadata
Post a message to membersmsg sendMessaging
Review design-system sources or a projectbrand, projects transfer-previewDesign-system sources
Run database and signing setupmigrate, audit retire-key, c2pa initLocal infrastructure
Run partner programmes: companies, people, domains, folders, templates and licencesprogrammes, companies, people, domains, folders, templates, catalog rightsPartner programmes
Put a CDN in front of the instanceedgePut a CDN in front of Lolly Work

Reading

lw whoami
lw summary            # telemetry rollups
lw fleet              # which shells/engines are connected (and this deploy's engine pin)
lw fleet installs     # registered installs - devices that spoke install/<id> while signed in
lw instance           # the public instance manifest - what a fresh app reads first
lw links [--all]
lw links revoke <id>
lw audit verify       # exits 2 if the chain is broken
lw audit head         # seq · hash · count · intact  (exits 2 if broken)
                      # "intact (N rows signed with a retired key before …)" after a rotation
lw preview --groups marketing,contractors   # what such a member receives

lw links create <toolId> [key=value …] mints a link to a render of that tool with those params. --kind is embed (the default), share or download; --format and --hours <n> set the format and the lifetime. --open lets recipients change the params: each new set they put on the link renders a new asset, within the tool's policy. An open link needs export.server for the tool as well as link.create (open links).

lw links create qr-code url=https://example.com --kind share --open

Hosting the instance pack

lw instance pack dist-packs/acme.lolly   # host the signed pack (owner) - served at /connect/pack.lolly
lw instance pack-rm                      # stop hosting it

The pack is cut in the OSS repo (node scripts/build-instance-pack.ts --brand <name> --keyfile …) with this deployment as its instance base; the upload refuses a pack that points anywhere else. An unsigned pack is hosted but labelled dev-only - a key-pinned app build will refuse that engine version.

Lolly Work treats the pack as a signed byte artifact, not as a second token processor. It does not parse, rewrite or filter tokens.json: the shell-reserved lolly.foundation and lolly.ui namespaces (including aliases between them) download exactly as the OSS builder produced them.

Invitations

lw invite add ana@example.com bo@example.com --group team --group brand   # admin or owner
lw invite add cy@partner.example --expires 2026-11-01T00:00:00Z
lw invite ls                 # open invitations: id, email, status, groups, expiry
lw invite ls --all           # revoked ones too
lw invite rm <id>            # revoke

add prints each address as one of:

It then prints the sign-in address to share. Nothing is emailed. --group repeats, and a comma-separated value also works. An invited person joins the groups at their first sign-in. Groups must already exist as local groups, and the caller needs grant.edit as well. See identity.

Service tokens

lw tokens create --label ci --scopes render,files --tools qr-code   # owner; the secret prints once - store it now
lw tokens create --label sync --role admin  # no scopes: all that the role can reach
lw tokens                                   # list (label, role, scopes, tools, last used, revoked)
lw tokens revoke <id>
LW_TOKEN=lwt_… lw export --out governance.json    # any command, authenticated as the automation

A token outranks a stored session cookie when both are present - automation acts as the automation, never as whoever last signed in on the machine. Tokens drive the action-gated API (export/apply, providers, fleet, audit); the member-workflow commands refuse them. A scoped token reaches only what its scopes open, and other commands answer 403 TOKEN_SCOPE. The scopes are in the automation guide.

Naming --scopes without --role gives the token the automation role, which carries what the scopes need without an admin's other authority; that role always needs scopes. A --tools list needs the render or documents scope. --days <n> sets the lifetime. lw tokens limits <id> shows a token's calls a minute and renders a day and a month, and --calls-per-minute, --renders-per-day and --renders-per-month set each to a number, none or default. With --programme <id>, create, revoke, limits and the list act on a partner programme's agent tokens (partners' agents).

MCP settings

lw mcp config --base https://work.example.com
lw mcp config --name brand --token-env WORK_TOKEN --json

This prints settings for an MCP client to reach the organisation MCP endpoint. The command makes no request. The settings name an environment variable (LW_TOKEN unless you pass --token-env) and never hold the token.

Visual intents

lw intent resolve intent.json
lw intent resolve - --json < intent.json

This sends a visual intent to POST /api/v1/intents/resolve and prints the tool chosen for each surface, what is missing and what went unused. It renders nothing. It exits 0 when every surface is ready and 4 otherwise, with the full answer either way. The answer covers only the tools this caller can render on this instance. A refused request exits 1.

Recoverable renders

lw renders submit render.json --idempotency-key campaign-v1 --json
lw renders list --json
lw renders show <renderId> --json
lw renders output <renderId> --out artwork.svg
lw renders evidence <renderId> --out evidence.json
lw renders cancel <renderId>
lw renders retry <renderId> --idempotency-key campaign-v1-retry
lw renders deliver <renderId> --destination <id> --name "Launch poster" --idempotency-key poster-v1

The render resource guide explains the request JSON, persisted status, restart recovery and retained output. Retrying creates a new resource linked to the original. Output and evidence downloads require an explicit file path. Execution evidence records observed source, context and asset digests with explicit coverage limits. For new outputs the evidence file also holds the render identity. Add --callback-url <url> to submit to be told when it finishes. deliver sends the finished output to an organisation destination.

For multiple rows with individual recovery and output receipts:

lw render-batches submit batch.json --idempotency-key campaign-v1 --json
lw render-batches show <batchId> --json
lw render-batches manifest <batchId> --out manifest.json
lw render-batches archive <batchId> --out outputs.zip
lw render-batches cancel <batchId>
lw render-batches retry <batchId> --idempotency-key campaign-v1-retry --json

The batch guide defines shared inputs and row keys. Retry creates a new parent and replaces only unsuccessful rows; successful children keep their original output. archive downloads a finished batch as one ZIP with a manifest of every row, or download each child through lw renders output <childRenderId> --out <file>. A request file can name a data source with bind in place of rows, and submit takes --callback-url <url> here too.

Approval files

lw approvals                                # your requests and inbox
lw approvals artifact <id> --out card.png   # the file an export review carries
lw approvals artifact <id> --out card.png --reviewed   # the bytes as reviewed

artifact works for an eligible reviewer, for someone who acted on the request, and for the requester once the request is approved. It checks the whole file against its recorded digest before writing anything, and says whether the approval is recorded in that file. These commands need a person's session from lw login. A service token cannot read approvals, because a decision about a file is a person's act. Decide in the console, where the file is on screen. See review an exported file.

Brand pages

lw brand-pages puts a brand page folder at a public address on this instance. Host a brand page has the details.

lw brand-pages publish ./brand-page               # check the folder here, then send and publish the page
lw brand-pages list
lw brand-pages history <id>
lw brand-pages unpublish <id> [--remove-files]    # the address then answers 410

publish checks the digests here first, and it sends only the files brand.json lists. A link in the folder is refused. Run the same command again after an interruption and it sends only the missing parts. With a chain set, the revision waits for a person's approval, and only a person can publish.

Moving from a hosted render API

lw render-api reads a Bannerbear or Placid account, keeps references, checks a mapping and measures a render against a reference. Move from a hosted render API has the stages.

Warning: sample spends vendor credits

sample spends credits on your vendor account and refuses to run without --spend-credits.

lw render-api inventory --from placid --token-env PLACID_KEY --out ./move
lw render-api sample --from placid --template <id> --token-env PLACID_KEY --values request.json --out ./refs --spend-credits
lw render-api check --mapping mapping.json
lw render-api compare --from placid --mapping mapping.json --template <id> --reference ./refs/<id>.png --values request.json

inventory and sample need no Work server.

A vendor key is read from the variable given to --token-env and is never printed. check and compare exit 2 when a template cannot run or a render differs.

Organization delivery

lw destinations
lw deliveries
lw deliveries show <deliveryId>
lw deliveries retry <deliveryId>
lw deliveries publish <completedRenderJobId> \
  --destination campaign-archive --name "Launch poster" \
  --idempotency-key campaign-42-poster-v1

destinations prints only the safe descriptors available to the current principal: label, kind, formats, byte ceiling and public/private result visibility. It cannot read or edit an endpoint, bucket, prefix or credential. deliveries publish sends a job id and destination id, not the output bytes: Lolly Work consumes that principal's retained render result directly, checks its digest and Content Credential again, and records the relationship on the receipt. An optional --format is an equality assertion against the completed render, never a conversion or override. See outbound delivery.

Governance

lw grants list
lw grants add <principal> <action> [<resource>] --effect allow|deny
lw grants rm  <principal> <action> [<resource>] --effect allow|deny

lw export [--out governance.json]           # canonical governance document
lw apply governance.json [--dry-run] [--prune]

apply prints a per-category diff (+create ~update -delete (=unchanged)) and the document hash. --dry-run changes nothing; --prune also deletes store-only entries. See governance.

SCIM provisioning tokens

lw scim token create --idp keycloak   # prints the secret ONCE - paste it into the IdP connector
lw scim token list                    # metadata only; never the secret
lw scim token revoke <id>

Owner-only (scim.manage).

Warning: Copy the secret at once

The secret is stored only as its hash and is unrecoverable, so the mint is the one moment you can copy the bearer.

The IdP then drives /scim/v2 with that bearer. See SCIM provisioning.

Data lifecycle

lw retention run            # apply the stated retention policy now (trims telemetry + audit, purges old deleted documents, sweeps expired uploads, removes approval files past retention)
lw users erase <id>         # erasure: delete the person's row + de-attribute their telemetry

Account offboarding and subject export have their own commands, all owner-only and documented in account lifecycle:

lw users erase-preview <id>       # read-only reference counts and erasure scope
lw users subject-export <id>      # one bounded page of the account's metadata (--category, --cursor, --limit)
lw users offboard-preview <id>    # direct issuance counts and what remains to review
lw users offboard <id>            # disable, end sessions, revoke direct issuance (content is kept)

retention run also runs daily on a long-lived server; on serverless, cron it with a service token (LW_TOKEN=… lw retention run). It also removes unfinished project-file uploads more than an hour past their expiry, and expired scoped uploads, and reports how many as swept; the long-lived server does that at boot and daily even with no retention policy. users erase is owner-only and answers a data-subject request - the person's projects must be archived first, and the audit chain keeps its opaque user id (the mapping to a person is what is removed). See operations.

Catalog providers

lw providers list
lw providers preview --kind <kind> [--options '{…}'] [--mapping '{…}'] [--exposure '{…}'] [--json]
lw providers preview --kind <kind> --shape [--remote-id <id>] [--json]
lw providers add <id> --kind <kind> --label "…" \
    [--options '{…}'] [--mapping '{…}'] [--exposure '{…}']
lw providers credential <id> [--expires 2026-12-01]   # prompts, hidden - never argv; --expires states the vendor's schedule
lw providers auth <id>            # the OAuth kinds with a registered consent flow
lw providers enable|disable <id>  # owner-only
lw providers sync|health <id>
lw providers drift <id>
lw providers materialize <id> [--remote-id <id> | --section <name>]
lw providers cutover <id>         # owner-only
lw providers publish <id> --in <export-file> [--name <name>]   # owner-grantable publish-out
lw providers rm <id>

Every kind, what each supports and how to connect one is in Connect an asset source, including how to read a preview. The first-connection walkthrough is install section 9, and the catalog side is in catalog.

Reading drift output
$ lw providers drift acme-canto
acme-canto: 2 drifted of 118 compared (118 materialized asset(s) in all)
  image:AB12C                  was 2026-06-01T00:00:00.000Z  now 2026-08-01T12:00:00.000Z  inst/9f2c…
  image:DE34F                  was 2026-05-04T09:11:00.000Z  now 2026-08-14T16:02:00.000Z  inst/1ab7…
never materialized (3): image:GH56I, image:JK78L, video:MN90P
remedy: lw providers materialize acme-canto --remote-id <remoteId> - idempotent per (provider, remoteId), so a re-run resumes rather than duplicates.

It compares the sourceUpdatedAt stamped on each copy with the updatedAt the source carries now. A copy taken when the source carried no timestamp is compared with its materializedAt instead. It stores nothing and re-materializes nothing.

compared counts only the copies that got a real answer. Every other copy is counted and printed under its own reason:

not compared: 4 copy(ies) whose upstream record carries no change stamp the driver can read - check this kind's UPDATED_AT_KEYS against its live-verify runbook.
not compared: 2 copy(ies) whose change stamp would not parse as a date (shape NNNNNNNNNN) - drift detection is inoperative for those until the driver reads that format.
not compared: 1 copy(ies) whose remote id is no longer in the listing at all.
read with care: 3 comparison(s) used a stamp that names no timezone (shape NN/NN/NNNN NN:NN) - it was read in THIS server's timezone, so those answers can be off by its UTC offset.

The stamp shapes are printed, never the stamps: digits become N and letters A (NNNNNNNNNN is an epoch integer, NN/NN/NNNN NN:NN a local date and time with no zone), so a line tells a driver fix the format without leaking an upstream value.

Catalog submit

Put a local file into this instance's catalog, and work the review queue (catalog):

lw catalog submit ./hero.png --name "Campaign Hero" [--tags campaign,hero] [--type icon] \
                             [--groups design] [--label "Q4 hero"]
lw catalog queue [--all]
lw catalog edit    inst/ab12cd34 --name "Campaign Hero 2026" --tags campaign,hero
lw catalog approve inst/ab12cd34
lw catalog return  inst/ab12cd34 --body "wrong logo lockup"

submit needs the catalog.submit action (the author role carries that action). With no policy.submit.chain configured the asset is live on return; with one, it prints the state as submitted and waits for approve or return. Identical bytes are reported as a duplicate and nothing is stored a second time:

already in the catalog as inst/ab12cd34 (identical bytes; nothing stored)

queue lists what is waiting, tagged mine or inbox depending on whether it is your own submission or one your groups may act on; --all includes what has already been published or returned. edit corrects a pending submission's declared metadata before it goes out - name, type, tags, description and the org's own fields, never the bytes or the exposure - and is audited with its before and after. approve and return go through the approvals engine, so you cannot decide your own submission.

Resumable uploads

Send a large file in 1 MiB parts that survive a dropped connection or a restart (resumable uploads):

lw upload ./keynote.mp4 --project prj_ab12        # a shared file in a project (signed in as a person)
lw upload ./master.tif --scope catalog-submission  # an original to submit to the catalog
lw upload ./brochure.pdf --scope automation-input  # bytes for /api/v1/inspect or /api/v1/optimize
lw upload ./photo.jpg --scope file                 # a file reference you can also read back

--name sets the file name (the file's own by default) and --content-type its media type, which is otherwise guessed from the extension. The command reads the file one part at a time and keeps the upload id under ~/.config/lolly-work/uploads/ until the upload finishes. If it stops, run the same command again: it asks which parts arrived and sends only the rest. An upload left for more than 15 minutes expires, and the next run starts it again. A scoped upload prints the id and checksum to name it by, for example POST /api/v1/catalog/submit?name=…&uploadId=…&checksum=…. A service token (LW_TOKEN) may use --scope; a project file needs a signed-in person. --scope needs an instance that turns on policy.uploads.enabled; until then it answers uploads are off.

Org-defined metadata

The fields an org defines for itself, on assets it already serves (catalog):

lw catalog fields                                            # what this instance defines
lw catalog meta lolly/logo/primary --field region=EMEA --field campaign="Autumn Launch"
lw catalog meta inst/ab12cd34 --field region= --name "Campaign Hero 2026" --tags campaign,hero

--field is repeatable and takes fieldId=value; an empty value (--field region=) clears one. meta needs catalog.edit. --name, --tags and --label apply to an instance-owned inst/* asset only - a federated asset keeps the name its source gives it, and a pack asset is a file on disk - while --field applies to any asset you can see. Defining the fields themselves is policy.edit and belongs to the governance document (governance), not to this command.

Collections

Named, ordered, group-visible sets of catalog assets (catalog):

lw catalog collections                                       # every set, with its size and audience
lw catalog collection launch-kit --name "Launch kit" \
    --members inst/ab12cd34,ext/brandfolder/a1,lolly/logo/mono \
    --groups design,sales --label "Everything for the spring launch."
lw catalog collection launch-kit --members inst/ab12cd34      # replaces the member list whole
lw catalog collection launch-kit --rm

--members is comma-separated and the order you type is the order the set keeps; passing it replaces the whole list rather than appending, so the command is idempotent. --groups takes group names or * for everyone, and --label is the description. Both need catalog.collection.manage, and a save is refused if it identifies an asset you cannot see.

Versions and supersession

New bytes for an asset that is already in the catalog, and the two moves that change what it serves (catalog):

lw catalog submit ./hero-2027.png --asset inst/ab12cd34 --note "reshot in studio"
lw catalog versions inst/ab12cd34        # the history, newest first; * marks what serves
lw catalog rollback inst/ab12cd34 1      # point the head at version 1
lw catalog version-rm inst/ab12cd34 2    # delete a stored version (never the served one)
lw catalog supersede inst/ab12cd34 inst/ef56ab78    # retire in favour of another asset
lw catalog supersede inst/ab12cd34 --rm             # and undo that

--asset turns submit into a new version rather than a new asset, the id and URL stay put and the prior bytes stay readable at ?v=N. It needs catalog.edit (replacing published bytes is curation, not contribution), and the descriptive flags are refused with it - use lw catalog meta for those. version-rm answers 409 for the served version and for a held asset. supersede writes replacedBy, which is advice to consumers and not a takedown.

Messaging

lw msg send --title "Update by Aug 15" \
    [--body "…"] [--kind …] [--severity action] \
    [--groups marketing,legal] [--shells tauri] [--max-engine 1.52.99] \
    [--starts 2026-12-07T09:00:00Z] [--ends 2026-12-14T17:00:00+01:00]

--starts is when the message begins to show and --ends when it stops. Each takes a date and time with its zone (Z or an offset), so the moment is the same wherever lw runs. lw refuses an --ends in the past, and one that is not later than --starts.

Warning: A sent message cannot be ended

Set --ends to give a message its last day.

Design-system sources and project transfer

lw brand                                             # design-system sources and your permissions
lw brand preview <action> <source-id> [--replacement <id>] > review.json   # review an impact as JSON
lw brand apply review.json                           # apply that reviewed revision
lw projects transfer-preview <id> [--json] [--out file.json]   # read-only project inventory

See design-system administration and project transfer preview.

Local infrastructure commands

These talk to something other than the API base:

lw migrate [--check]          # needs a local DATABASE_URL; --check exits 1 if pending
lw audit retire-key --reason "secret rotation 2026-10-04" [--expect-head <seq>:<hash>] [--dry-run]   # needs DATABASE_URL and LW_SESSION_SECRET
lw c2pa init [--org "Acme"] [--out ./c2pa] [--days 365]

lw audit retire-key records a retired-key boundary in the audit log after LW_SESSION_SECRET was rotated, so the rows signed under the old value read as retired rather than as a broken chain. It runs with the server's own environment: the container image carries it as node scripts/audit-retire-key.ts. Pass the head you recorded before the rotation with --expect-head. It refuses (exit 2, nothing written) when the rows do not look like a key change; --allow-interleaved and --no-witness override two of those checks, and the audit boundary records the rotation. See audit.

lw c2pa init mints a self-contained signing identity (root + leaf) so exports can be signed with zero corporate PKI, and prints exactly what to wire where. If you have a corporate CA, skip it and use your own chain. See c2pa.

Global flags

FlagMeaning
--base <url> / LW_BASEwhich deploy to talk to (default http://localhost:8787)
--token <token> / LW_TOKENact as a service token; takes precedence over a stored session
--jsonmachine-readable output

Exit codes: 1 on any API error or usage mistake (including migrate --check with a pending schema), 2 specifically for a broken audit chain or a failing provider health check - so both are usable as monitoring checks.

A few commands add their own: intent resolve exits 4 when a surface is not ready, render-api check and compare exit 2 when a template cannot run or a render differs, and audit retire-key exits 2 when it refuses.