CLI and Examples
Common Commands
After installing globally, use oneworks directly. Without installing dependencies into the project, use npx -p <package> <bin> for temporary commands.
Bootstrap provides a single entry point and lazily installs the required runtime:
npx oneworks "read README and summarize it"npx oneworks webnpx oneworks servernpx oneworks appnpx oneworks app cachenpx oneworks app --no-cache
bootstrap app passes the current shell directory to the desktop app. The same directory focuses the existing project window; a different directory starts an independent project service in the running desktop process.
Useful commands:
oneworks --helpnpx -y -p @oneworks/cli oneworks --helpnpx -y -p @oneworks/mcp oneworks-mcp --helponeworks: run one taskoneworks --resume <sessionId>: resume an existing CLI sessiononeworks-mcp: start the standalone MCP stdio serveroneworks-call-hook: read a hook payload from stdin and run the hooks runtimeoneworks list/oneworks ls: list cached task history in compact modeoneworks list --view default|full: show common columns or full context, PID, and helper command columnsoneworks list --running: show only running CLI sessionsoneworks clear: clear local logs and cachesoneworks stop <sessionId>: gracefully stop a running CLI sessiononeworks kill <sessionId>: force terminate a running CLI sessiononeworks config list [path]: show config section state or a subtreeoneworks config get [path]: read a config valueoneworks config set [path] [value]: write a config valueoneworks config unset [path]: delete a config valueoneworks accounts add <adapter> [accountName]: run the adapter-native login flow and save the returned credentials snapshot under the project homeoneworks accounts show <adapter> <accountName>: show account details and the latest quota summaryoneworks accounts remove <adapter> <accountName>: remove an adapter account snapshot from the current workspace
Commands default to the project root workspace. If __ONEWORKS_PROJECT_WORKSPACE_FOLDER__ is set, that directory is used directly. Otherwise the entry points probe upward from the current directory for .oo, .oo.config.*, pnpm-workspace.yaml, or a Git root. Set __ONEWORKS_PROJECT_CONFIG_DIR__ when config files live outside the resolved workspace root.
Built-in Skills
@oneworks/cli injects the companion plugin @oneworks/plugin-cli-skills by default. Use its skills with --include-skill:
oneworks-cli-quickstart: explainsoneworks,oneworks list,oneworks --resume,oneworks stop,oneworks kill, andoneworks config list|get|set|unset.oneworks-cli-print-mode: explains--print,--input-format, permission requests, session continuation, andsubmit_input.create-entity: creates a new One Works entity from a user request.update-entity: updates an existing One Works entity.create-plugin: turns a desired plugin behavior into a manifest, frontend entry, server entry, and verification steps.
oneworks --include-skill oneworks-cli-quickstart "explain how oneworks CLI resumes a session"
oneworks --include-skill oneworks-cli-print-mode --print "explain permission handling in print mode"
oneworks --include-skill create-plugin "make a plugin that adds a screenshot button to the chat header"Examples
Start the UI:
npx oneworks webDeveloping the One Works source repository with separate server/client:
npx -y -p @oneworks/server oneworks-server --allow-cors
npx oneworks-clientOpen the desktop app from project directories:
cd ~/work/project-a && npx oneworks app
cd ~/work/project-b && npx oneworks appStart standalone MCP:
npx -y -p @oneworks/mcp oneworks-mcp --include-category general,taskDebug hooks runtime:
printf '%s\n' '{"hookEventName":"Notification","cwd":"'"$PWD"'","sessionId":"debug-hook"}' | npx -y -p @oneworks/hooks oneworks-call-hookRun a task:
oneworks -A codex --print "read README and suggest three improvements"
oneworks -A claude "read README and suggest three improvements"
oneworks --workspace billing "fix the order status rollback issue"-A is the short form of the adapter parameter and accepts aliases such as claude and adapter-codex.
When scripts consume --print output, add --print-idle-timeout <seconds> as a fallback. If no adapter event arrives within the timeout, the CLI exits non-zero.
Workspaces
Large repositories can declare workspaces in .oo.config.json. With --workspace <id>, the task starts in that workspace directory and loads that workspace's own config and data assets.
oneworks --workspace billing "fix the order status rollback issue"See Workspace Scheduling.
Permission Mode Defaults
--permission-mode <mode> overrides the permission mode for this run. Without it, or when the Web UI is still in default mode, One Works reads permissions.defaultMode, for example "bypassPermissions".
--yolo is shorthand for --permission-mode bypassPermissions and can be used for new and resumed sessions.
Resume Sessions
oneworks list
oneworks list --view default
oneworks list --view full
oneworks --resume <sessionId>
oneworks --resume <sessionId> --permission-mode bypassPermissions
oneworks --resume <sessionId> --yolo
oneworks --resume <sessionId> --effort high --include-tool read_file--resume reuses cached adapter, model, workspace, and most startup parameters. Permission mode can be overridden for the resumed run and is written back to the CLI cache for future resumes.
Read and Write Config
oneworks config list
oneworks config get general.defaultModel
oneworks config get models
oneworks config get modelServices.gpt-responses.modelsoneworks config list/oneworks config getread merged config by default. Use--source global|project|user|merged|allto inspect another source.oneworks config set/oneworks config unsetwrite project config by default. Use--source global|project|userto choose the target source.- Text mode outputs YAML for readability.
--jsonkeeps the structured raw result. oneworks config get modelsandoneworks config list modelsexpandmodelServicesinto a service-to-model view in text mode.
Startup Profiling
For slow startup debugging, add this to project .oo.dev.config.json:
{
"diagnostics": {
"startupProfile": {
"enabled": true,
"log": true,
"thresholdMs": 10
}
}
}Or enable temporarily:
ONEWORKS_STARTUP_PROFILE=1 ONEWORKS_STARTUP_PROFILE_CONSOLE=1 oneworks "hi"Logs are written under <project-home>/logs/<ctx>/startup/.
Adapter Accounts
npx oneworks accounts add codex
npx oneworks accounts add codex work
npx oneworks accounts show codex work
npx oneworks accounts remove codex workoneworks accounts add invokes the adapter account onboarding capability. Built-in support currently starts with codex. Codex runs codex login in an isolated HOME, reads the generated auth.json, and saves it under <project-home>/.local/adapters/codex/accounts/<key>/.