Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openwork-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
OpenWork Server
Filesystem-backed API for OpenWork remote clients. This package provides the OpenWork server layer described in packages/app/pr/openwork-server.md and is intentionally independent from the desktop app.
Quick start
npm install -g openwork-server
openwork-server --workspace /path/to/workspace --approval autoopenwork-server ships as a compiled binary, so Bun is not required at runtime.
Or from source:
pnpm --filter openwork-server dev -- \
--workspace /path/to/workspace \
--approval autoThe server logs the client token and host token on boot when they are auto-generated.
Config file
Defaults to ~/.config/openwork/server.json (override with OPENWORK_SERVER_CONFIG or --config).
{
"host": "127.0.0.1",
"port": 8787,
"approval": { "mode": "manual", "timeoutMs": 30000 },
"workspaces": [
{
"path": "/Users/susan/Finance",
"name": "Finance",
"workspaceType": "local",
"baseUrl": "http://127.0.0.1:4096",
"directory": "/Users/susan/Finance"
}
],
"corsOrigins": ["http://localhost:5173"]
}Environment variables
OPENWORK_SERVER_CONFIGpath to config JSONOPENWORK_HOST/OPENWORK_PORTOPENWORK_TOKENclient bearer tokenOPENWORK_HOST_TOKENhost approval tokenOPENWORK_APPROVAL_MODE(manual|auto)OPENWORK_APPROVAL_TIMEOUT_MSOPENWORK_WORKSPACES(JSON array or comma-separated list of paths)OPENWORK_CORS_ORIGINS(comma-separated list or*)OPENWORK_OPENCODE_BASE_URLOPENWORK_OPENCODE_DIRECTORYOPENWORK_OPENCODE_USERNAMEOPENWORK_OPENCODE_PASSWORD
Endpoints (initial)
GET /healthGET /capabilitiesGET /workspacesGET /workspace/:id/configPATCH /workspace/:id/configGET /workspace/:id/pluginsPOST /workspace/:id/pluginsDELETE /workspace/:id/plugins/:nameGET /workspace/:id/skillsPOST /workspace/:id/skillsGET /workspace/:id/mcpPOST /workspace/:id/mcpDELETE /workspace/:id/mcp/:nameGET /workspace/:id/commandsPOST /workspace/:id/commandsDELETE /workspace/:id/commands/:nameGET /workspace/:id/auditGET /workspace/:id/exportPOST /workspace/:id/import
Approvals
All writes are gated by host approval. Host APIs require X-OpenWork-Host-Token:
GET /approvalsPOST /approvals/:idwith{ "reply": "allow" | "deny" }
Set OPENWORK_APPROVAL_MODE=auto to auto-approve during local development.