@uibot/cli
v0.20.0
Published
`resource install-plan <id>` is read-only discovery. CLI-only `--export <directory>` saves a fully verified fixed registry closure; `--verify <directory>` checks it offline. Add `--snapshot <sha256>` to pin an expected identity. `snapshot-serve <directory
Readme
UIBot CLI
resource install-plan <id> is read-only discovery. CLI-only --export <directory> saves
a fully verified fixed registry closure; --verify <directory> checks it offline. Add --snapshot <sha256> to pin an expected identity.
snapshot-serve <directory> [--port <n>] serves only verified bytes on loopback and prints
the complete namespace configuration and pinned shadcn command. No application files are
written by these commands. See the distribution contract for
integrity, conflict handling and installation boundaries.
External agents
Use CLI for shell agents and scripts; use MCP for protocol clients. Both use the same resource query and Logo operations. No model SDK or agent harness is embedded in the CLI.
uibot resource search button --mode json
uibot skills list --mode json
uibot skills show uibot-resources --locale en
uibot skills install uibot-resources --cwd /path/to/project --locale en --mode json
uibot skills install uibot-logo --cwd /path/to/project --locale zh --mode jsonSkills ship inside the CLI package and are available offline. Only install writes a project .agents/skills/<id>/SKILL.md; it refuses existing files and paths escaping the project. Other clients can read skills show or copy that output into their chosen skill directory. Existing skills promote/rollback manage internal .uibot lifecycle state and remain separate.
Configure UIBOT_BACKEND_URL (backend origin, such as http://127.0.0.1:3202) and UIBOT_AUTH_BEARER through the host environment. Never put the bearer in CLI arguments or request JSON. The backend owns authorization, image providers and persistence. Remote origins require HTTPS; HTTP is accepted only for loopback development.
uibot logo --help and uibot logo export --help work offline. Add --mode json
to read the shared operation schemas, required input fields and CLI usage without
credentials, file reads or API calls. Export uses POST to produce a ZIP from an
existing asset; it does not call the image provider.
uibot logo providers
uibot logo assets
uibot logo generate --input brief.json
uibot logo preview <asset-id> --out /path/to/output
uibot logo preview <asset-id> --variant favicon-32 --out /path/to/output
uibot logo targets
uibot logo export <asset-id> --input export.json --out /path/to/outputbrief.json contains {"requestId":"<caller-created-UUID>","provider":"<configured-id>","model":"<configured-id>","brief":{"brand":"Example","description":"A simple original mark","style":"symbol","colors":"blue","direction":"bold silhouette","transparentBackground":true}}. For refinement, add both referenceAssetId and refinement.
Preview reads the authenticated backend without generating or changing the asset. It requires --out, writes a unique PNG with exclusive creation and private permissions, and returns path/bytes/SHA-256 plus image dimensions. Open that file with the host image viewer before refining. --variant accepts original (default), favicon-16, favicon-32, or icon-512; icon previews use a white background, balanced spacing and trimmed transparent margins. Preview accepts at most 20 MB, 4 megapixels and 4096 pixels per side; invalid or oversized responses fail without retry. It never prints base64 or a bearer-bearing URL. A saved file alone does not establish visual quality.
export.json contains {"targets":["web","pwa"],"background":"#ffffff","spacing":"balanced","trimTransparent":true}. The ZIP uses a unique filename with exclusive creation. Output includes its path, bytes and SHA-256.
Logo defaults to a single uibot.logo-agent.v1 JSON envelope; errors exit nonzero. Create and save requestId before generate. Query uibot logo status <request-id> after uncertainty; status never generates. request.state is running|succeeded|failed|unknown; only succeeded with an asset is completion (ok: true means the API response was handled). Same ID/content returns the retained result; changed content conflicts. No automatic retries or replay of interrupted claims. Errors preserve requestId and outcomeUnknown. Do not use a new ID to automatically bypass unknown. Claims under the backend project's .uibot/logo-requests must remain on persistent storage: no expiry or automatic cleanup. The guarantee is at most one backend dispatch per retained ID, not image-provider exactly-once execution. Legacy Studio requests without an ID retain their existing behavior; agent CLI/MCP require an explicit UUID. No model calls are required to list/read bundled Skills or resources. See MCP configuration.
For near-transparent fringe that shrinks an icon, opt in with uibot logo preview <id> --variant favicon-16 --remove-faint-fringe true --out <dir>, or removeFaintFringe: true in export JSON (requires trimTransparent: true). This crops margins below 1/32 of peak alpha and may remove faint edge details; it does not remove an opaque glow. Defaults preserve every nonzero source pixel. Compare native 16/32px on light and dark backgrounds. Original PNG bytes remain unchanged; the ZIP manifest records the threshold and removed pixel count.
