Skip to content

Praxis CLI

Praxis naming: This page documents Praxis, the AIWS workflow engine. Existing engine/* source paths, /engine/... routes, aiws-engine/* protocol identifiers, and existing script names remain unchanged for compatibility.

praxis is the command-line front door for running catalog workflows. You type praxis run <workflow>, a governed run starts and waits for a human’s approval, and praxis follow watches it until it needs you or ends. The host does all the work. praxis is a thin client over the host’s authenticated loopback HTTPS control API: it never opens the engine database, never runs a workflow itself and never decides anything.

This is a source-only engine profile under S6 (Claims A and B in the build plan, B in progress, and Claim C for binaries): workflow templates, the catalog, the praxis run commands, and passkey owner enrollment, sign-in and CLI sessions. Checked live, only Windows Hello without attestation has been tried, and it was refused in Chrome and in Edge on one Windows 11 PC; no qualifying hardware authenticator has been checked live (source-only). It is not part of SDK 0.5.1 and is not published to any registry. The catalog, run list and run creation messages are host read models and profile messages at stability PROVISIONAL, not engine wire 1.1.0 records. The design is in spec/engine-v1/WORKFLOW-TEMPLATES.md and spec/engine-v1/AUTHENTICATION.md.

Passkey owner enrollment (praxis setup), CLI sessions (praxis login and praxis logout) and the passkey host (praxis serve) are built under S6 claim B, which is in progress: the build plan’s milestone record lists what is still open. The simulated host is the way to try the flow without a qualifying authenticator.

On a real host the CLI session’s access token and refresh credential live only in the OS credential store: Windows Credential Manager, macOS Keychain, or libsecret on Linux, where DBUS_SESSION_BUS_ADDRESS must reach the session’s Secret Service and the keyring must be unlocked. The owner-only profile in the per-user cli directory keeps only the addresses, the pinned certificate and pending creations. A profile from an earlier version that still holds the secrets is migrated the first time a command uses it. If the store is missing, locked or fails, the command stops with a message saying so, exit code 1 and --json code CREDENTIAL_STORE: nothing more is sent to the host, and no secret is written to a file. Each store call on Windows starts Windows PowerShell and takes about a second, and every command against a real host makes at least one.

praxis runs as TypeScript directly on Node 24. Its client commands have no runtime dependency; praxis serve, which runs a host, needs the engine’s one runtime dependency, Effect, which npm ci at the repository root installs. From a source checkout, link the private engine package once:

Terminal window
cd engine
npm link
praxis workflows list --state DIR

npm link puts a praxis shim in your npm global prefix: a praxis.cmd shim on Windows, a link on Unix. Without it, run node engine/src/praxis.ts from the repository root. A packaged engine bundle carries praxis (Unix) and praxis.cmd (Windows) launchers beside launch.sh and launch.cmd, which run the CLI on the bundle’s own runtime.

npm run praxis:binary, from a source checkout on Node 24, builds one file, build/praxis/<target>/praxis (praxis.exe on Windows), which runs the client commands with no checkout and no Node install: put it on PATH. It is the CLI’s client half bundled into the Node 24 binary as a single executable application. It is unsigned (macOS gets only the ad hoc signature it needs to start) and gitignored. praxis serve in it exits 2 naming the engine bundle’s launch.sh and launch.cmd, which run a host. The build refuses, naming each fault, a client module that imports node:sqlite, worker_threads, the effect package or an engine host module, or reads a file beside its module that it did not inline. To check a binary against the source CLI on the simulated host, run PRAXIS_EXECUTABLE=build/praxis/<target>/praxis node --test engine/test/praxis-binary.test.ts.

Released binaries are assets of a GitHub Release in this private repository, tagged praxis-v<version>; nothing is published anywhere else. The first release is praxis-v0.1.0 (S6 claim C). The release workflow, .github/workflows/praxis-release.yml, runs only when the owner pushes a praxis-v* tag or dispatches it from main. It refuses before building when the tag does not name the CLI version, builds praxis-<target> (praxis-<target>.exe on Windows) for linux-x64, linux-arm64, darwin-x64, darwin-arm64, win-x64 and win-arm64, each on a GitHub-hosted runner of its own operating system and architecture, and runs the smoke test against the binary there. Only when every target passes does it attach the binaries and praxis-manifest.json. The manifest (aiws-praxis-binaries/1) names the CLI version, the tag and the commit, says signed: false and certified: false, and gives each binary’s target, Node version, byte size and SHA-256.

Download your binary and the manifest with gh release download praxis-v<version> --repo <owner>/<repo> --pattern praxis-<target> --pattern praxis-manifest.json, or from the release page. Check the manifest against a SHA-256 you approved independently, then check the binary’s SHA-256 against the manifest’s entry: sha256sum praxis-linux-x64 on Linux, shasum -a 256 praxis-darwin-arm64 on macOS, Get-FileHash praxis-win-x64.exe -Algorithm SHA256 in PowerShell. With every asset of the release downloaded into a new directory that holds nothing else, node scripts/praxis-release.mjs verify <directory> --tag praxis-v<version> --approved <manifest SHA-256> from a checkout checks the manifest, signed: false, and every binary’s size and hash at once. Then rename the binary to praxis (praxis.exe) and put it on PATH; on Linux and macOS, chmod +x it first.

The binaries are unsigned, so each operating system warns once, and you clear that warning deliberately, only for a binary whose hash you checked:

  • macOS. A binary downloaded in a browser carries the quarantine attribute, and Gatekeeper refuses to start it. Remove the attribute with xattr -d com.apple.quarantine praxis; xattr says so when there is none to remove. The ad hoc signature the binary carries lets Apple Silicon run it; it names no developer.
  • Windows. SmartScreen may stop praxis.exe as an unrecognized app. In the file’s Properties, select Unblock, or run Unblock-File praxis.exe in PowerShell, or choose More info and then Run anyway at the prompt.

praxis --version prints praxis 0.1.0 (abc1234, source, node v24.20.0) and exits 0: the CLI’s own semver, independent of the SDK and the engine package, the short commit (unknown without git), the target (source from a checkout) and the Node version. --json prints them as a praxis-version/1 record (PraxisVersion in read-models.schema.json). They come from one constant, praxisBuild in engine/src/praxis-build.ts, which the binary build fills in; a binary names its target, such as win-x64.

The simulated host, example:engine:praxis, is the only way to try the flow today. It starts a host on a new temporary installation with a simulated identity adapter, which signs anyone in as the owner without proof. A host with simulated identity is not a human gate. Nothing decided on it is a human decision, and it never runs real work: when it stops it deletes the temporary installation, with every run, decision and profile in it.

Save the templates you want to run in a directory first, then start the host with it. In one terminal:

Terminal window
npm run example:engine:praxis -- --templates ./my-templates

The host copies each template file into a private template directory inside its temporary installation and reviews it at startup; editing a template takes a restart. It prints its addresses and the state root to pass to praxis:

Simulated identity: nothing decided on this host is a human decision.
AIWS controls: https://127.0.0.1:<port>
Praxis web view: https://praxis-<label>.localhost:<port>
State: <temporary directory>/installation
Use: praxis <command> --state <temporary directory>/installation
Stop with Ctrl-C or by closing standard input; the temporary installation and its profile are deleted.

In another terminal, use that state root:

Terminal window
praxis workflows list --state DIR
praxis run greeting --state DIR

Every command against this host prints Simulated identity: nothing decided on this host is a human decision. on standard error, and --json output carries the same flag. The host writes its simulated CLI session to a profile inside its own temporary installation, never to your per-user Praxis directory, and praxis uses that profile only against a host whose connection descriptor marks its identity as simulated. Open the web view address it prints and choose Continue as the simulated owner to approve and accept; the web view shows a standing banner that nothing decided there is a human decision. Your browser does not trust the host’s generated certificate yet, and praxis status says so while a run waits for a decision in the web view. praxis trust --state DIR adds it to the current user’s trust store after one confirmation, or on Linux prints the Firefox steps; run praxis trust --remove --state DIR before you stop the host, because the certificate is deleted with the installation. Without --templates the host offers no workflow catalog, and praxis workflows list says so.

From engine:author --template to praxis run

Section titled “From engine:author --template to praxis run”

A workflow template is a reviewed coding plan without work-order or run identities. Write one with the guided author:

Terminal window
node engine/src/authoring-cli.ts --template greeting --input plan.json > my-templates/greeting.json

The author refuses a name that breaks the template name rule and input carrying workOrderId or runId. It prints the bare template to standard output only when the host’s own startup review accepts it, and its preview to standard error. Save the template as NAME.json in the host’s template directory, or in the directory you pass to --templates, and start the host. Then:

  1. praxis workflows list lists each template with its revision, validity and description. praxis workflows show NAME prints its detail: its limits, its binding review, fresh readiness and the template review digest. A template whose agent is not ready is shown not runnable, with the reasons.
  2. praxis run NAME asks the host to create a run. The host gives it fresh identities and pins the template revision, and the run waits for approval. praxis prints the run’s binding review and the address of its decision page in the web view, <browser origin>/#work-order=<work order id>.
  3. Approve the run in the web view. praxis has no approve verb.
  4. praxis follow RUN, or praxis run NAME --follow, watches the run through each stage and stops where a human or a script must look. Accept the validated result in the web view.

A run keeps the plan and revision it was created from; editing the template changes only later runs. While an earlier run of the template is held or was never approved, praxis run creates nothing and exits 7, naming that run.

Command What it does
praxis workflows list The workflow catalog
praxis workflows show NAME One template’s detail, with fresh readiness
praxis agents [--plan FILE] The host’s agent picker: every agent the catalog offers, and why one cannot be bound; with a draft plan, each agent’s readiness for it
praxis preview FILE [--template] [--detail] The host’s authoring preview of a draft coding plan, or with --template of a draft workflow template: the binding review the run’s first approval will show, then the diagnostics. It exits 1 for a draft no run can be created from, and --json still prints the record (aiws-authoring-preview/1). The draft creates nothing
praxis run NAME [--follow [--timeout DURATION]] Creates a run from the template or graph workflow and prints its decision page
praxis runs NAME [--limit N] The template’s or graph workflow’s runs, newest first; --limit is 1 to 100
praxis graphs check NAME --graph FILE --binding FILE --contract FILE --grant FILE... Checks a graph workflow bundle, writing nothing, and names the file of each fault
praxis graphs submit NAME ... [--base REVISION] [--request-id UUID] Stores the bundle as a candidate, which grants nothing, and prints its admission page
praxis graphs list [--limit N] [--after NAME] The graph workflows, in name order
praxis graphs show NAME [--revision N | --before N [--limit N]] One graph workflow with its revisions and their status, or one revision’s material
praxis graphs withdraw NAME REVISION [--request-id UUID] Withdraws a pending candidate
praxis triggers check|submit NAME --workflow NAME --trigger FILE Checks a graph trigger, or stores it as a candidate that fires nothing
praxis triggers list|show|fires|withdraw|disable|retire Reads triggers and their fires, withdraws a candidate, stops a trigger
praxis event-sources list Event sources with the event types each declares
praxis follow RUN [--timeout DURATION] Watches a run until it needs a human or ends
praxis status RUN The run’s operator view, its template and, while a decision is pending, its decision page
praxis hold RUN Why a held run is held: its hold card, or its reason and the decisions pending
praxis open RUN Opens the run’s page in the browser, once the host confirms the run
praxis serve CONFIG [--port N] [--move-origin] [--new-certificate] Starts the passkey host through the deployment launcher; see Running a passkey host
praxis setup Enrolls the first owner: prints a pairing code for the setup page and waits until the owner is enrolled
praxis login / praxis logout Gets a CLI session by a code you confirm in the web view, or revokes it and deletes the credential
praxis trust [--remove] Trusts the host’s generated certificate in the current user’s trust store, or removes it; see deployment platforms
praxis --version [--json] The CLI’s version, commit, target and Node version

Every command that reaches a host takes --state DIR, the installation’s state root. Without it, praxis uses <per-user directory>/installation, where the per-user Praxis directory is %LOCALAPPDATA%\Praxis on Windows, ~/Library/Application Support/Praxis on macOS and ${XDG_STATE_HOME:-~/.local/state}/praxis on Linux. Every command but open and trust takes --json. With it, a read command takes --format <name>/<N>, which pins the record it prints; the usage text lists the formats. Arguments are parsed strictly: an unknown flag is a usage error, and a duration needs a unit (s, m or h) between one second and 24 hours.

praxis sends every request to the control address, https://127.0.0.1:<port>, pinned to the host’s certificate from its connection descriptor. It sets a deadline on every request and never follows a redirect. The addresses it prints are on the browser origin. The credential never appears in arguments, the environment or output.

If a creation’s answer is lost, praxis run resends the identical request a bounded number of times. If the outcome is still unknown it exits 1 and says so, and the next praxis run NAME resends the same request, so a run that was created is replayed, never duplicated. There is no --request-id flag.

Code Meaning
0 The run was created (without --follow), the run SUCCEEDED (with --follow), the read succeeded (for praxis preview, a run can be created from the draft), or praxis trust made its changes or had none to make
1 An engine, connection or authentication error, a draft praxis preview found no run can be created from, praxis trust changes declined, or no browser started by praxis open
2 A usage error
3 Awaiting acceptance
4 Held
5 Closed without success
6 --timeout elapsed; the run is unchanged
7 Not created: an earlier run of this workflow needs a human first (WORKFLOW_RUN_HELD or WORKFLOW_RUN_PENDING_APPROVAL). The output, and --json, names that run, the reason and its address in the web view
8 The host does not serve the format asked for: upgrade the host or the client. --json gives FORMAT_NOT_SERVED with requestedFormat and servedFormats
9 The host found faults in a graph workflow bundle or a graph trigger; nothing was stored

praxis follow keeps waiting through the first approval, a correction re-approval, an approval that lapsed before work started, a restart review, a pause and a pending cancellation, and prints the decision page again each time the run starts to wait for one. It polls the operator view at most once a second. No command finishes a pending cancellation, so that wait ends only at a hold, at acceptance or at the timeout. Interrupting it stops only the watch.

praxis graphs checks, submits, reads and withdraws graph workflows; only the owner admits, rejects or retires, in the web view. praxis run NAME creates a graph run, which waits for approval, and runs, follow, status, hold and open read graph runs too. Bundle checks run on the host, which needs the built TypeScript SDK (npm run build:sdk); a host without it answers that it offers no graph workflows.

Each record’s bundleDigest is computed from the files alone, so a client can tell whether its files differ from a revision before it submits them again.

praxis triggers is the client side of graph triggers. show names what blocks a trigger from firing, such as TRIGGER_DISABLED. Only the owner admits, rejects or enables one, in the web view, and every run a fire creates waits for its own approval.

There is no approve, accept, resume, pause, cancel or hold-exit command. A coding agent may well be the one typing praxis, and it must never believe it approved something. Decisions are taken in the web view, each with its own click and confirmation. The host refuses every decision, pause and cancel through a CLI session with HUMAN_REQUIRED before the identity adapter is asked, whatever the adapter would allow. A CLI session reads the catalog, runs, operator views, hold cards, binding reviews, the agent picker and the authoring preview of a draft, and creates runs; a created run still waits for a human.

praxis coexists with the engine CLIs. Each has its own job, and none is deprecated.

Tool Job
praxis The front door for running catalog workflows on a passkey host: serve, trust, setup, login, run, follow and read. It has no decision verbs
engine:control The wire-level client for every control API route, with a credential supplied from outside. It serves hosts whose identity adapter issues bearer credentials, such as the simulated adapters in tests and examples. Its decision routes are for a human-held credential on such a host
engine:author Offline authoring of a plan, and of a workflow template with --template
engine:serve The direct host start used by examples and tests. praxis serve goes through the deployment launcher

praxis automatically follows a certificate rollover: the client verifies the host’s ECDSA SHA-256 signed rollover statement linking the pinned certificate to the new certificate and follows the new pin without requiring re-login.

praxis has no command for readiness, handoff diagnostics, context or the upgrade preflight. Read them in the web view or, on a host whose identity adapter issues bearer credentials, with engine:control. On a passkey host human sessions are browser cookies and engine:control has no credential, so these are readable only in the web view.

Owner authenticators and passkey enrollment

Section titled “Owner authenticators and passkey enrollment”

The passkey adapter lets a real human enroll as a host’s owner (praxis setup) and issue CLI sessions (praxis login). Praxis records which kind each qualifying owner authenticator is:

  • Attested. A FIDO2 security key with a PIN or a biometric whose attestation verifies to the engine’s reviewed FIDO MDS3 allowlist, or Windows Hello with a verified tpm attestation statement.
  • Unattested. Windows Hello that sends no attestation, as it does on a PC whose TPM cannot attest, provided it verified you with a PIN or a biometric and is not a synced passkey. Decided in #735.

An unattested credential is a weaker proof. Praxis has only the browser’s word that it is Windows Hello, so on a host that has no owner yet, a program running as you could run setup and enroll a credential it controls. Once you are enrolled, nothing can add an owner credential without your own authenticator. If praxis setup says the host is already enrolled and you never enrolled it, stop and start a new installation. The setup page, praxis setup and the Authenticators panel mark an unattested credential, and adding a FIDO2 security key as a backup gives you an attested one.

No qualifying authenticator has been checked live yet, and the docs will name exactly the cells that pass when a live check does. The live checks that have run were made under the earlier policy. On one Windows 11 PC whose TPM reports that it cannot attest, Windows Hello sent no attestation and was refused WINDOWS_HELLO_UNATTESTED in Chrome 157 and in Edge 156 and 157. The S6 milestone record lists each run. The policy has no development exception. Enrollment is tested with a test attestation fixture and with Chrome’s virtual authenticator under a test root.

The simulated host, example:engine:praxis, is the only way to try the flow without a qualifying authenticator. A host with simulated identity is not a human gate and never runs real work.

Windows Hello attests only where the PC’s TPM can. When praxis setup or an add flow in the Authenticators panel begins on Windows, the host reads one registry value to tell you before you try. When it reports that the TPM cannot attest, praxis setup prints, before the pairing code:

This PC's TPM reports that it cannot attest, so Windows Hello on it will be recorded as an unattested owner authenticator. A FIDO2 security key with a PIN or a biometric gives an attested one.

The setup page and the add flow ask the browser for any authenticator, so you can choose Windows Hello or a security key. After a refusal the setup page offers Use a security key. Off Windows, and whenever the reading is anything else, nothing changes.

You can read the same values yourself as a standard user, with no elevation:

Terminal window
reg query HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI /v TaskReadyForAttestation
reg query HKLM\SYSTEM\CurrentControlSet\Services\TPM\WMI /v TaskInformationFlags
  • TaskReadyForAttestation reading REG_DWORD 0x0 means the TPM cannot attest. That is the only reading the check acts on: another value, another type, or a missing value means unknown.
  • INFORMATION_EK_CERTIFICATE (0x00040000) set in TaskInformationFlags marks a missing endorsement-key certificate, which stops a TPM from attesting. The check never reads this value to decide; it is evidence only.
  • Both values are undocumented and the check is advisory. A Windows build that moves them costs only the early note: the verifier alone decides whether a registration is attested.

Warning. Praxis never runs tpmtool. On some firmware, seen on one AMD firmware TPM, tpmtool getdeviceinformation makes Windows report a queued TPM clear (Get-Tpm shows RestartPending: True). If a firmware prompt at boot asks to clear the TPM, reject it: clearing destroys every key the TPM holds, Windows Hello keys included, and can ask for the BitLocker recovery key.

praxis serve CONFIG reads a praxis-serve/1 file and starts the host with the passkey adapter through the deployment launcher, which checks the installation’s private layout, its storage and its disk reserve and holds the installation lock:

{
"format": "praxis-serve/1",
"port": 8443,
"minimumFreeBytes": 1073741824
}

port is required, because the owner enrolls at a browser origin, which includes it. --port N replaces it for one start. stateRoot defaults to <per-user directory>/installation, and templateDirectory names the template directory; both must be absolute paths. cancellationResponseLimitMs is optional: the cancellation response limit for graph runs, a whole number of milliseconds from 1000 to 3600000 that you set, and 60 minutes when the file sets none. graphReleaseVerifier is optional too, and described below. An unknown field or an out-of-range value refuses the start. --new-certificate replaces the generated certificate deliberately: it shows the current and the new fingerprint, asks, and is refused without an interactive terminal.

A graph run’s RELEASE_AND_REATTEMPT and REVALIDATE hold exits need the host’s proof that the workspace is safe to run again (graph runs). Praxis ships no verifier. A praxis serve host has one only when its file names your own command:

{
"format": "praxis-serve/1",
"port": 8443,
"minimumFreeBytes": 1073741824,
"graphReleaseVerifier": {
"command": ["/usr/bin/node", "/home/me/praxis/verify-release.cjs"],
"file": "/home/me/praxis/verify-release.cjs",
"sha256": "<64 lowercase hexadecimal digits>",
"timeoutMs": 30000
}
}

command is the program, an absolute path, and its arguments, at most 32 elements. file is the absolute path of your verifier’s code and must be one of command’s elements. On Windows both paths include the drive. sha256 is the SHA-256 of that file. timeoutMs is a whole number from 1000 to 120000.

The file must be a regular file of at most 4 MiB that only your OS user can use, in a directory only your OS user can use (mode 0700 on Linux and macOS; on Windows an access list with one rule, for you). The configuration file that names it must be usable only by you as well, in a directory only you can use, since whoever can write or replace it chooses the command. praxis serve resolves the configuration’s path to its real path, following any link above it, and checks that file and the directory that holds it; it reads the file again after the checks and refuses it if it changed. If the file is missing, any of these checks fails or the digest is not the pinned one, praxis serve refuses to start. When the verifier loads, the start output prints Graph release verifier SHA-256: with the digest and the file.

These checks run at start. They do not cover the program that runs the file (an interpreter, say), the directories above the file’s own or the directories above the configuration’s resolved directory, so keep those as protected as the host itself.

For each of the two exits the host runs the command once, without a shell, and only while the file still has the pinned digest. It writes one JSON object to the command’s stdin:

{"format": "praxis-graph-release-request/1", "card": <the hold card>, "evidenceRef": "<the evidence reference of the request>"}

The command prints one JSON object to stdout, a whole proof, in at most 64 KiB:

{"subjectDigest": "<the card's subjectDigest>", "evidenceRef": "<the request's evidenceRef>", "expiresAt": "<an instant still ahead>", "ownerStopped": true, "effects": "NO_EFFECT" or "RETRY_SAFE", "exposureWithinReservation": true}

Praxis checks every field again before the exit commits. A command that exits nonzero, times out (its process tree is stopped), is ended by a signal or prints anything else gave no proof: the exit is refused RECONCILIATION_UNPROVEN, the host prints a warning with the reason, and nothing is run again. Your command must examine the workspace itself. One that answers from the evidence reference alone turns an UNKNOWN effect into success on a claim.

Then run praxis trust, praxis setup (enter the pairing code on the setup page and register Windows Hello or your security key), sign in on the web view, and praxis login. Losing every enrolled authenticator locks the installation, so add a backup authenticator in the Authenticators panel.

An enrolled host refuses a start on any port but its recorded one with BROWSER_ORIGIN_CHANGED. If that port is taken for good, run praxis serve CONFIG --port N --move-origin. The host starts on the new port and runs nothing until the owner confirms. Until then it serves only the move page it prints, and every other request, praxis commands included, answers BROWSER_ORIGIN_MOVE_PENDING with that page’s address.

Open the page, check the installation and both origins, and confirm with an enrolled passkey. The same process then serves as usual on the new origin, and passkeys and certificate trust carry over because neither includes the port. Set port in the configuration to the new port, sign in again and run praxis login again. Links printed for the old port stay broken, and moving back takes the same steps.

Stopping a host before the confirmation changes nothing: nothing about a pending move is stored, so a start on the recorded port is normal. --move-origin is refused unless an owner is enrolled.