CLI Overview
@steamharness/cli Only one steamharness command is exposed, and it is divided into two command groups based on their respective purposes:
| Command Group | Purpose |
|---|---|
steamharness | Run in a local workflow directory, print JSON reports, inspect structure, or start a stdio MCP Server. |
steamharness workspace / pnpm exec steamharness workspace | Connect SteamHarness Server to log in, package, upload, publish, download, and version query. |
Command Index
| CLI | Command |
|---|---|
steamharness | run, json, structure, resolve-params, mcp, help |
| workspace | login, logout, status, health, pack, upload, publish, versions, , , download, help |
Typical Workflow
For local development, use steamharness to verify the running results and structure in the workflow directory, and then use the workspace CLI to upload to the server.
steamharness run workspace/workflow/hello -- --message "hello"
steamharness json workspace/workflow/hello -- --message "hello"
steamharness structure workspace/workflow/hello
steamharness mcp workspace/workflow/hello
steamharness json workspace/workflow/runtime-timer -- --title "Fixture Timer" --milliseconds 2000
When deploying to the server, first check the service status, then log in, upload files, publish a version, and download it.
pnpm exec steamharness workspace health --server http://localhost:7126
pnpm exec steamharness workspace login --server http://localhost:7126
pnpm exec steamharness workspace upload hello
pnpm exec steamharness workspace publish hello --release-log "Initial release"
pnpm exec steamharness workspace run hello --target latest --message "hello"
In the development environment, you can use the local server address; in the production environment, it is recommended to explicitly use the official domain name or your production port.
Configuration Source
| Configuration | Description |
|---|---|
STEAMHARNESS_SERVER_URL | Default server address for workspace CLI. |
STEAMHARNESS_SERVER_ADMIN_KEY | Explicit administrator override credentials workspace CLI; automation or recovery scenarios can be used directly as a Bearer. |
STEAMHARNESS_REPO_ROOT | The project root directory of workspace CLI. When not set, it is derived by traversing upward from the current directory. |
STEAMHARNESS_CLI_AUTH_DIR | The workspace CLI is the directory that stores the independent login state workflow-auth.json. |
STEAMHARNESS_KV_STORE_DIR | steamharness Local runtime KV store directory. |
STEAMHARNESS_PERSISTENT_VALUE_STORE_DIR | The steamharness local runtime PersistentValue store directory, which is also the local repository directory. |
STEAMHARNESS_FILE_STORE_DIR | steamharness The store directory for local runtime files. |
steamharness run/json requires an explicit steamHarness.projectInfo.dataStorage.mode. STEAMHARNESS_KV_STORE_DIR controls only context.storage.local.kv, while STEAMHARNESS_PERSISTENT_VALUE_STORE_DIR controls only context.storage.local.persistentValue and local Knowledge. They are isolated by project UUID and never fall back to each other. context.storage.server uses the top-level project UUID and an authenticated connection from STEAMHARNESS_SERVER_URL / STEAMHARNESS_SERVER_ADMIN_KEY or workspace CLI workflow-auth.json. local runs offline, server requires login and same-UUID binding, and both lets source code select explicitly. The two locations never synchronize automatically. Pass each related-project directory explicitly with repeatable --related-project alias=/absolute/project/path; CLI never scans parent or sibling directories, and on a local run the relation also covers the target's Knowledge base and entrypoints to the extent the target grants them, while a server location selects remote data storage and related entrypoints still execute locally. context.files.createFile(...) still uses the server connection; input attachment resolution remains controlled by STEAMHARNESS_FILE_STORE_DIR.
Project business values come from Project configurations, without project env loading or process-variable fallback. Host deployment and transport settings remain separate.
Output Convention
| Command family | Output |
|---|---|
steamharness run | On success, output the contents of the output node; on failure, output JSON is reported to stderr. |
steamharness json | Always generate a complete JSON execution report. |
steamharness structure | Output workflow structure JSON. |
steamharness mcp | Reserves stdout for stdio JSON-RPC and writes project logs and diagnostics to stderr. |
| workspace CLI | Output server API response JSON, like { errCode, errMessage, data }. |
Follow-up Reading
- See steamharness CLI for local running and structure checking.
- See steamharness mcp to connect a local Workflow to an AI client.
- See Server Workspace CLI for Server uploads, publication and downloads.