Commissioning shell repository for Anolis.
Repository structure:
anolis_workbench/core— pure domain library (projects, canonical artifacts, launcher, exporter, validators, paths)anolis_workbench/server— unified HTTP server (Compose + Commission + Operate/v0/*proxy)anolis_workbench/cli— CLI entry points (anolis-workbench,anolis-package,anolis-validate,anolis-provision)
Developer references:
- Contributing guide:
CONTRIBUTING.md - Changelog:
CHANGELOG.md
Desktop app (Windows, macOS, x86_64 Linux):
Download the latest Tauri desktop installer from Releases. Run the installer — the desktop wrapper bundles the Python runtime and starts automatically.
The Linux desktop bundles are x86_64 only; there is no desktop build for arm64 Linux. The desktop app is a window over the same local server and UI that browser mode serves, so nothing is lost without it.
CLI / server via PyPI:
pip install anolis-workbench
anolis-workbench # starts the commissioning server
anolis-package <project> # build a handoff package
anolis-validate <pkg> # validate a handoff packageRequires Python 3.10+. Open http://127.0.0.1:3010 in a browser after starting.
On a Raspberry Pi (pip + browser, the supported Pi setup):
pipx install anolis-workbench && anolis-workbenchOn a Raspberry Pi the server opens no browser. Like everywhere else it
listens on 127.0.0.1 only: the workbench has no login, so anyone who can
reach its port could use it. Reach it from another machine over an ssh
tunnel, then browse to http://127.0.0.1:3010 on that machine:
ssh -L 3010:127.0.0.1:3010 <user>@<pi>The server prints this command when it starts headless. Setting
ANOLIS_WORKBENCH_HOST (for example to 0.0.0.0) overrides the bind
address; do that only on a network where everyone who can reach the port
may use the workbench.
The server answers only requests addressed to this machine: an IP address,
localhost, or the machine's hostname (plain or .local). To reach it
under another name, such as a DNS name or a reverse proxy's, list that name
in ANOLIS_WORKBENCH_ALLOWED_HOSTS (comma-separated). A request from a
browser page must also come from the workbench's own address.
To start the workbench at boot, add --workbench-service to the install,
which also installs a systemd service for the workbench. It asks for your
sudo password, and the service runs as you. The service binds 127.0.0.1;
the install prints the ssh tunnel command to reach it. When the installed
runtime has an API token (ANOLIS_API_TOKEN in /etc/anolis/runtime.env),
the install copies that token alone into
/etc/anolis/workbench-runtime-token, a 0600 file owned by the service's
user, so Operate can reach a runtime that requires the token on loopback.
The workbench sends it only to a runtime on this machine. It keeps the
token out of the environment of the processes it starts, but a program it
launches runs as the same user and can still read the file.
On a machine with an install (/opt/anolis/manifest.json), the workbench
imports the installed project from /opt/anolis/projects/<profile>/ each
time it starts, so Operate reaches the installed runtime with no import by
hand, at the port /opt/anolis/config/runtime.yaml sets. The import is
read-only and is replaced on every start, and again when a projects request
finds the installed files changed, as after an install while the workbench
runs, so it matches what is installed; an Operate page already open shows the
new install once reloaded. A project of your own with the same name is kept, and the
installed one is imported as <profile>-installed beside it.
To remove the workbench service and the token copy, and keep the runtime:
anolis-provision workbench-service --uninstallThe runtime's install.sh --uninstall removes the token copy (from anolis
v0.1.48 on). From anolis 0.4.0 it keeps the workbench service and prints the
commands that remove it; earlier releases removed the service too.
Anyone who can reach the workbench while the service runs, as a local account on the host or over an ssh tunnel to it, can run programs as the service's user: a project's host paths name the executables Launch starts. That is more than the workbench's runtime access, so treat access to the workbench as access to that account.
After rotating the token, refresh the service's copy. This touches neither the runtime install nor the workspace:
anolis-provision workbench-serviceuv sync --locked --extra dev
cd frontend && npm ci && npm run build && cd ..
./start.sh./start.sh runs uv run anolis-workbench (Windows: start.cmd). The
frontend build writes anolis_workbench/frontend/dist, which the server
serves; rebuild it after changing the frontend, or use the frontend dev
server described in CONTRIBUTING.md.
Build handoff package:
anolis-package <project-name> [output.anpkg]Validate handoff package:
anolis-validate <package.anpkg>
# or
python contracts/validate-handoff-packages.py <package.anpkg>A handoff package is a provenance record of what was commissioned, not a
deploy step. A machine is deployed by the runtime's install.sh: stage an
offline bundle with anolis-provision bundle and install it on the target
with install.sh --local, or deploy online with anolis-provision install|remote. The roles and both paths are in
docs/commissioning-handoff-runbook.md.
Import a provider's config schema the workbench doesn't package, offline:
anolis-provider-foo --config-schema > foo-0.1.0.json
anolis-workbench provider import foo-0.1.0.json
anolis-workbench provider listThe file is the provider's --config-schema envelope. A project that pins
that kind at that version is validated against it; one pinning the packaged
version keeps the packaged schema. An import is refused if it isn't a valid
JSON Schema, uses $ref, lacks a semver provider_version, would replace
a packaged envelope, or names a version that differs from an existing
import's only in case (macOS and Windows would store the two as one file).
An import of the same kind and version with other content needs
--replace. The desktop app has no CLI on PATH: there, Compose's "Provider
schemas" section imports a file, with the same checks and the same reasons
when one is refused, and the kind is offered at once. Imports live in schemas/providers/ next to the
projects directory: ~/.anolis/schemas/providers/ by default, or next to
ANOLIS_DATA_DIR when it is set. They are per user, so run the import as the
user the workbench runs as. provider list also names any import that fails to
load, which the workbench skips.
A deploy fetches a provider's release from the repository its pin names
(components.providers.<kind>.repo). An import records one: --repo <owner>/<name>, else anolishq/anolis-provider-<kind>, and a new pin of that
kind in Compose starts with it. Re-importing the same file with another
--repo changes only the recorded repo; a pin that already names a repo keeps
it. For the deploy to find the provider, that repository's release must be
tagged v<version> and publish anolis-provider-<kind>-<version>-linux-<arch>.tar.gz
(<arch> is arm64 or x86_64) containing bin/anolis-provider-<kind>, and
a SHA256SUMS that lists the tarball: install.sh refuses a provider it
can't verify.
The workbench checks install.sh itself the same way, against the
SHA256SUMS of the anolis release the project pins
(components.runtime.version), and refuses to run one it can't verify. The
oldest anolis release it deploys is v0.1.50, the first whose SHA256SUMS
lists install.sh.
anolis-workbench provider remove [email protected] removes an import. It refuses
while a project pins that kind at that version and uses it, naming the
projects, unless you pass --force; saving such a project then fails until
the schema is imported again. A packaged version can't be removed.
anolis-provision install --variant <key> (and remote --variant <key>)
installs that runtime variant, a key of the project's runtime_profiles, as
Deploy does; without it,
install.sh installs manual. An unknown key fails before anything is
installed. A target that already has a runtime config keeps it, and
install.sh says the variant was not applied. A bundle carries every variant:
choose one when installing it, with install.sh --local <bundle> --variant <key>.
Provision with observability (InfluxDB + Grafana installed natively on the
target by the runtime's install.sh --with-observability):
anolis-provision install --with-observability
anolis-provision remote --target user@host --with-observabilityThe provision summary repeats install.sh's observability and Grafana lines.
install.sh reports an observability failure (offline target, package
install failed) as a warning and still exits 0, so read that section: the
runtime is installed either way.
Reaching Grafana: on runtime releases that bind Grafana to loopback
(anolishq/anolis#359), it listens on 127.0.0.1:3000 on the target. Open a
tunnel and browse http://localhost:3000:
ssh -L 3000:127.0.0.1:3000 user@hostAfter a remote deploy, the provision summary (and Commission's deploy
result) prints this command for the target it reached. It prints the
network address instead only when install.sh reports Grafana on the
network. Operate's Grafana link defaults to http://localhost:3000, the
tunnel's end; ANOLIS_TELEMETRY_URL overrides it.
install.sh --with-grafana-network opens Grafana to the network instead.
anolis-provision does not forward that flag; run install.sh on the target
yourself to use it. The admin password is GRAFANA_ADMIN_PASSWORD in
/etc/anolis/observability.env on the target (root only); the workbench
never reads it. If install.sh made a new one for a Grafana it kept and could
not set it there, its summary says the password is unknown, and so does the
workbench's.
Switching from the old Docker stack: earlier workbench releases ran it from
~/.anolis/observability on the machine running the workbench. On a local
install, stop it before provisioning:
cd ~/.anolis/observability && docker compose -f docker-compose.observability.yml downA leftover InfluxDB container on 0.0.0.0:8086 keeps the native influxd
from binding, and install.sh then finds the container's InfluxDB already
set up and leaves its tokens alone.
To keep InfluxDB and Grafana on a separate monitoring host instead, run the
compose stack from the runtime release asset
anolis-<version>-observability.tar.gz on that host; the workbench does not
deploy it.
cd frontend
npm run test:unit:coverage
npm run test:components:coverageThe unit lane (vitest.config.ts) enforces coverage thresholds for
frontend/src/lib/**/*.{js,ts}. The components lane reports coverage for
frontend/src/**/*.svelte with no thresholds.
A native Tauri wrapper now lives under desktop/.
Runtime model:
- Tauri launches a frozen Python sidecar.
- Sidecar serves Workbench at
http://127.0.0.1:3010. - WebView consumes the same localhost HTTP/SSE surface as browser mode.
Important system requirement:
- Port
3010is reserved by the desktop wrapper. If a process other than Anolis Workbench is bound to that port, desktop startup fails (and tries to show a native error dialog). If another Anolis Workbench server already holds it, the desktop window attaches to that server instead.
Desktop workflows/docs:
- Desktop release workflow:
.github/workflows/release.yml(package-desktopjob) - Desktop wrapper source:
desktop/src-tauri/ - Desktop handoff guide:
docs/release-desktop-handoff.md
The command allowlist in anolis_workbench/core/executor.py guards the
Executor call sites only: deploy, bundle staging, rollback, the workbench
service, and remote probes. Dev-launch and its preflight run the runtime and
provider binaries the user names in the project's host paths, and
anolis-validate --runtime-bin runs the runtime binary it is given, directly
and by design. Those binaries are the user's own and sit inside the trust
boundary, so the allowlist does not list them.
- Runtime HTTP snapshot:
contracts/runtime-http.openapi.v0.yaml - Workbench API OpenAPI:
contracts/workbench-api.openapi.v1.yaml - Handoff/control baselines:
docs/contracts/*.md - Runtime config schema:
anolis_workbench/schemas/runtime-config.schema.json - Machine profile schema:
anolis_workbench/schemas/machine-profile.schema.json
- Commissioning handoff runbook:
docs/commissioning-handoff-runbook.md - Handoff package v1 format:
docs/contracts/handoff-package-v1.md - PyPI/OIDC release handoff:
docs/release-pypi-handoff.md - Desktop release handoff:
docs/release-desktop-handoff.md