Weles/Docs

Reference

The arguments of the weles commands that take more than flags.

Argument tables for open and screenshot, onboarding, existing-data import and design export. The command list, exit statuses and environment variables are on the CLI reference.

Onboarding#

Arguments | Default | Description
ArgumentDefaultDescription
status | next | import | verify | resetJourney action: read the current screen, advance or skip optional import, adopt an existing export, cryptographically verify a real receipt, or reset progress.
--subject <stable-id>(host default)Stable operator/device scope for durable onboarding progress.
--state-dir <dir>(platform default)Override the durable onboarding state directory.
--receipt <file>(required for verify)Real terminal Weles service receipt JSON to verify.
--keys <file>(required for verify)JSON map of trusted receipt key IDs to PEM public keys; must be a non-empty object.

Existing-data import#

weles import is reusable outside onboarding. weles onboarding import calls the same operation from the optional existing-data step and records that step only after accepted destination state is returned. Any refused item makes the CLI exit nonzero while preserving the complete JSON result on stdout.

Arguments | Default | Description
ArgumentDefaultDescription
<trajectory-export.json>(required)Exact JSON response from the Weles trajectories list endpoint, or one bare trajectory detail response; at most 2 MiB.
--host <hostname>(required)Exact managed Weles worker OS hostname stored with every newly imported draft.
WELES_API_BASE(required)HTTPS destination deployment; plaintext HTTP is accepted only for loopback.
WISENT_ORGANIZATION_ID(required)Destination organization UUID, which must match every source tenant_id.
WELES_TOKEN(required)Organization-scoped bearer carrying trajectories:write.

Design export#

Run `weles design export-assets --provider figma --request export-request.json`. Every request field in the example is required. File paths resolve relative to that request, not the shell directory. Keep the request, inventory, scope declaration and signing key outside the managed figma directory. Example identities below are invented; use your registered workload and exact authorized credential selectors.

The inventory is one JSON object, not an inventory log. It requires teamId and a nonempty companyFiles array. Each entry has name and an HTTPS Figma url, for example {"teamId":"example-team","companyFiles":[{"name":"Example library","url":"https://www.figma.com/design/ExampleFileKey/library"}]}. Every entry is exported; no company-name filter runs. Duplicate file keys and unsupported URLs are refused before credential acquisition.

credential.endpoint is the Skarbiec origin selected through Stado's service directory. HTTPS and loopback HTTP are accepted. scopeFile declares consumer|item|field, and the authority must grant that exact scope to workloadId. signingKeyFile names the workload's existing private signing key; the acquisition reader checks ownership, permissions and symlinks. The Figma token is acquired in memory and cleared after the operation.

The checkout must already exist at its repository root, on the named branch, with a configured Git author and committer, exactly one push URL on the named remote, and an ignored .build/ directory. Its HEAD must match that remote branch. Dirty checkouts, ignored files inside figma, non-directory output paths and a preexisting figma directory without an export inventory are refused. The exporter does not clone, reset or remove the checkout and uses its configured Git authentication.

Documents are fetched into a fresh .build/weles-design-export-* directory for each run. Only after the full export succeeds does the command replace its managed figma directory. It commits only that directory, pushes without force and reads the remote branch back. The JSON result names status, checkout, remote, branch, commit and each file's counts. A supplied runner label, a local commit or a successful credential read alone is not proof of publication.

Git failures name the failed operation and checkout. If publication fails after output installation, the error names the retained workspace and previous-figma backup; the generated tree and Git state remain for inspection, and the command does not claim success. A checkout lock refuses overlapping exports. Normal completion releases it; an interrupted process can leave its lock and workspace, which must be inspected before the checkout is used again.

In GitHub Actions, open Figma design assets export and supply runner_label for the Stado-selected macOS ARM64 runner and request_file for the absolute request path on that runner. The same inputs work with `gh workflow run figma-design-assets-export.yml -f runner_label=<label> -f request_file=<absolute-path>`. The workflow passes the request to the same CLI; its log carries the same publication result or refusal.

export-request.json — invented example
{
  "inventory": "./inventory.json",
  "checkout": "../assets",
  "remote": "origin",
  "branch": "main",
  "credential": {
    "endpoint": "https://vault.example.com",
    "scopeFile": "./scope.conf",
    "consumer": "example-exporter",
    "item": "example-design-token",
    "field": "api_key",
    "workloadId": "example-export-worker",
    "signingKeyFile": "./workload.key"
  }
}