workser is the command line at the centre of Workser Code. It’s what your AI agent runs — through its own shell — to act as your DevOps engineer: provision a database, set an environment variable, deploy, read logs.
You can run every one of these commands yourself too.
Install
Workser Desktop installs and updates the CLI for you. Install it manually only if you wantworkser on its own, alongside an agent running outside the app:
The published build is a single self-contained file. Every runtime dependency is bundled in, so it runs under the system
node from any directory with no node_modules beside it. That’s how Workser Code installs it onto your agent’s PATH during onboarding without running an npm install.Two ways it connects
- Inside Workser Code (normal)
- Standalone / CI
Workser Desktop writes
~/.workser/session.json pointing at its local daemon on http://127.0.0.1:<port>.Every call flows through Workser Code, which handles authentication, approval gates, and live progress in the UI. This is how you see what your agent is doing./v1/… contract.
How endpoint, token and project are resolved
$WORKSER_ENV names a backend rather than a URL:
An unrecognised value is a hard error, not a silent fall-back to production. Run
workser doctor to see what resolved and where it came from.
Global flags
The output contract
Every command supports--json and returns a single stable line:
Exit codes
Error codes worth knowing
Command surface
Orientation
Orientation
Database & sign-in
Database & sign-in
Deploy, config & logs
Deploy, config & logs
Files & the Neon backend
Files & the Neon backend
Saving & syncing
Saving & syncing
Project workspace
Project workspace
Business data & automation
Business data & automation
Agents, deliverables & extras
Agents, deliverables & extras
Built-in help
The CLI carries its own guides, so what your agent reads always matches the version it’s running:automation · brand · business · computer-use · database · deliverables · deploy · images · memory · neon · roles · sdlc-entities · search · storage · version-control.
The scope boundary
The CLI is deliberately small, because it’s driven by a model that can be influenced by whatever it reads. Two rules define the surface:- One project. Every command targets the single project linked to the working directory. Your agent can list and read projects, but not create one or switch which is pinned.
- Operate within that project; don’t administer the project set. Your agent can provision and use the project’s own infrastructure — create the database, read its connection string, browse rows, provision storage and auth, deploy, set env vars, manage files. Sensitive operations use the applicable approval and autonomy policy.
403.
Read the whole model in Security & approvals.
A typical run
The line between CLI and SDK
workser db query is for inspecting the database while building. It is not how a running app reads its own data — that’s @workser/app. An app that shells out to the CLI on every request is the most common mistake here.
- Needs to happen when a user hits the app → the SDK.
- Needs to happen to the app — provision, configure, deploy, read logs → this CLI.
- Needs to keep running after the request finishes → a workflow.

