CLI and UI feature parity
Every feature of the UI and the management API can be driven from the devhub CLI, so agents can manage devhub themselves. This table is the single source of truth: test/cli-parity.test.mjs parses the API routes in src/server/main.mjs, and every route must appear here with the status “Aligned” (the CLI command must really exist and the CLI source must really call that route) or “Excluded: reason”. If you add an API without updating this table and the CLI, the test fails.
The “MCP” column is the mapping for devhub mcp (see Using devhub with agents): tool action, or “Excluded: reason”. The test parses the tool definitions in src/cli/mcp.mjs and fails when a cell points to a tool or action that doesn’t exist, when the mapped CLI subcommand doesn’t match, when a CLI command is missing from the table, or when an MCP action isn’t listed in the table.
For command usage see Using devhub with agents or devhub <command> --help.
| Feature | Where in the UI | API | CLI command | MCP | Status |
|---|---|---|---|---|---|
| Start a service | “Start” on the service row | POST /api/services/:key/start |
devhub start <service> |
devhub_ops start |
Aligned |
| Restart a service | “Restart” on the service row | POST /api/services/:key/restart |
devhub restart <service> |
devhub_ops restart |
Aligned |
| Stop a service | “Stop” on the service row | POST /api/services/:key/stop |
devhub stop <service> |
devhub_ops stop |
Aligned |
| Force stop | “Force” on a stopping service row | POST /api/services/:key/forcestop |
devhub stop <service> --force |
devhub_ops stop |
Aligned |
| Take over an occupied port | “Take over” on the service row | POST /api/services/:key/takeover |
devhub start <service> --takeover |
devhub_ops start |
Aligned |
| Rebuild (prestart; for containers, rebuild the image) | “Rebuild” on the service row | POST /api/services/:key/rebuild |
devhub rebuild <service> |
devhub_ops rebuild |
Aligned |
| Choose a worktree (without start/stop) | worktree switcher on service rows, project rows and stack cards | POST /api/services/:key/select |
devhub service select <service> --worktree <path> |
devhub_service select |
Aligned |
Scheduled restart times (add, remove, replace, clear; to read use service list/status or service restart-at <service>) |
“Scheduled restart” section of the service editor | PUT /api/services/:key/restart-at |
devhub service restart-at <service> [list|add|remove|set|clear] [HH:MM ...] |
devhub_service restart-at |
Aligned |
| Service list | Service matrix | GET /api/state |
devhub service list |
devhub_service list |
Aligned |
| View a service’s full config | Service editor | GET /api/state |
devhub service show <service> |
devhub_service show (always masked; no --reveal) |
Aligned |
| Environment snapshot (cwd, environment variables, envFile, tool versions, readiness probe) | “Environment snapshot” in the service editor | GET /api/services/:key/env |
devhub env <service> |
devhub_observe env |
Aligned |
| Add a service | “Add” in the service editor | POST /api/services |
devhub service add |
devhub_service add |
Aligned |
| Edit a service | “Save” in the service editor | PUT /api/services/:key |
devhub service update <service> |
devhub_service update |
Aligned |
| Delete a service | “Delete” in the service editor | DELETE /api/services/:key |
devhub service delete <service> --yes |
devhub_service delete (needs confirm) |
Aligned |
| List containers on the engine | “Import from an existing container” in the editor | GET /api/containers |
devhub service containers |
devhub_service containers |
Aligned |
| Import an existing container as a service | “Import from an existing container” in the editor | GET /api/containersPOST /api/services |
devhub service import-container <container name> |
devhub_service import-container |
Aligned |
| worktree initialization: view settings, service overrides, the merged effective settings and per-worktree records | “worktree initialization” in the header | GET /api/worktree-init |
devhub worktree-init show |
devhub_worktree_init show |
Aligned |
worktree initialization: auto-suggest (from services; one or all projects, paths only; suggestions for a single service are in serviceProposals, the project-level proposal only holds shared items) |
“worktree initialization” in the header, fill in suggestions | GET /api/worktree-init?suggest=1 |
devhub worktree-init suggest |
devhub_worktree_init suggest |
Aligned |
worktree initialization: write or remove project-level settings (copy, deps, run; one or several projects at once) |
“worktree initialization” in the header, save | PUT /api/worktree-init (optional services writes the service level in the same call; the CLI uses service update for that) |
devhub worktree-init set |
devhub_worktree_init set |
Aligned |
| worktree initialization: suggest for a single service (only its cwd and envFile; unsaved values allowed) | service editor “worktree initialization”, fill in suggestions | GET /api/worktree-init/suggest?service=<key> (or repo + cwd + envFile) |
devhub worktree-init suggest --service <service> |
devhub_worktree_init suggest (service) |
Aligned |
worktree initialization: write service-level settings (worktreeInit: copy, deps, run) |
service editor “worktree initialization”, save | PUT /api/services/:key |
devhub service update <service> --set 'worktreeInit={...}' |
devhub_service update |
Aligned |
| worktree initialization: redo manually for a given worktree | (no UI yet) | POST /api/worktree-init/:repo/apply |
devhub worktree-init apply |
devhub_worktree_init apply |
Aligned |
| Project row: start/restart all | “Start all” and “Restart all” on the project row | POST /api/groups/:name/start |
devhub project start <project>devhub project restart <project> |
devhub_project startdevhub_project restart |
Aligned |
| Project row: stop all | “Stop all” on the project row | POST /api/groups/:name/stop |
devhub project stop <project> |
devhub_project stop |
Aligned |
| Project list | Project rows | GET /api/state |
devhub project list |
devhub_project list |
Aligned |
| Repo list (source, main checkout, whether the repo of the current directory is saved) | Header “More” → “Repo list” | GET /api/repos |
devhub repo list |
devhub_repo list |
Aligned |
Save a repo to the list (config repos, stores the main checkout) |
“Save to list” and “Add” in “Repo list” | POST /api/repos |
devhub repo add [path] [--name <name>] |
devhub_repo add |
Aligned |
| Remove a repo from the list | “Remove” in “Repo list” | DELETE /api/repos/:name |
devhub repo remove <name> |
devhub_repo remove |
Aligned |
| Keep existing or switch on conflict | Conflict panel on project rows and stack cards | POST /api/groups/:name/startPOST /api/stacks/:name/start |
devhub project start <project> --keep-existingdevhub stack start <name> --switch |
devhub_project startdevhub_stack start |
Aligned |
| Stack list and state | Stack cards | GET /api/state |
devhub stack listdevhub stack show <name> |
devhub_stack listdevhub_stack show |
Aligned |
| Stack: start/restart | “Start” and “Restart” on the stack card | POST /api/stacks/:name/start |
devhub stack start <name>devhub stack restart <name> |
devhub_stack startdevhub_stack restart |
Aligned |
| Stack: stop | “Stop” on the stack card | POST /api/stacks/:name/stop |
devhub stack stop <name> |
devhub_stack stop |
Aligned |
| Create a stack (specifying members) | Stack editor | POST /api/stacks |
devhub stack create <name> --members a,b |
devhub_stack create |
Aligned |
| Create a stack from running services | “Save as stack” in the stack bar | POST /api/stacks |
devhub stack create <name> --from-running |
devhub_stack create |
Aligned |
| Change stack members and order | Stack editor | PUT /api/stacks/:name |
devhub stack update <name> --members a,b |
devhub_stack update |
Aligned |
| Rename a stack | Stack editor | PUT /api/stacks/:name |
devhub stack rename <old name> <new name> |
devhub_stack rename |
Aligned |
| Delete a stack | “Delete” on the stack card | DELETE /api/stacks/:name |
devhub stack delete <name> --yes |
devhub_stack delete (needs confirm) |
Aligned |
| Service state overview | Service matrix | GET /api/state |
devhub status |
devhub_observe status |
Aligned |
| worktree list and immediate refresh | “Refresh” in the header | GET /api/state |
devhub worktrees --refresh |
devhub_observe worktrees |
Aligned |
| Uncommitted changes and last commit time of each worktree in one repo | The worktree switcher in the services table and stack cards | GET /api/worktree-details?repo=<name> |
devhub worktrees --repo <name> --details |
devhub_observe worktrees (details) |
Aligned |
| Service log (tail) | “Log” on the service row | GET /api/logs/:key/text |
devhub logs <service> --tail N |
devhub_observe logs |
Aligned |
| Service log (follow) | Log drawer | GET /api/logs/:key |
devhub logs <service> --follow |
Excluded: MCP cannot stream; poll devhub_observe logs with the since parameter |
Aligned |
| Clear the log view | “Clear” in the log drawer | — | — | — | UI only: it just clears the text on screen and leaves the log file alone, so the CLI has no counterpart |
| Proxy log (tail) | Header Proxy → “Log” | GET /api/proxy/logs/text |
devhub proxy logs |
devhub_proxy logs |
Aligned |
| Proxy log (follow) | Header Proxy → “Log” | GET /api/proxy/logs |
devhub proxy logs --follow |
Excluded: MCP cannot stream; poll devhub_proxy logs with the since parameter |
Aligned |
| Query and filter the audit log | Header “Activity log” | GET /api/audit |
devhub audit |
devhub_observe audit |
Aligned |
| Claim a service | (only agents can claim) | POST /api/claims |
devhub claim <service> |
devhub_claim claim |
Aligned |
| Claim reason | next line under the service row’s 🔒, the confirm dialog when blocked | reason on POST /api/claims (optional) |
devhub claim <service> --reason <text> |
reason on devhub_claim claim (required) |
Aligned |
| Extend a claim | (agents only) | POST /api/claims/:key/renew |
devhub claim renew <service> |
devhub_claim renew |
Aligned |
| Release your own claim | 🔒 on the service row | POST /api/claims/:key/release |
devhub release <service> |
devhub_claim release |
Aligned |
| List claims | 🔒 on the service row | GET /api/claims |
devhub claims |
devhub_claim list |
Aligned |
| Wait for someone else’s claim | (agents only; the UI shows “this service is claimed”) | POST /api/claims (the CLI re-sends by polling; no server change) |
devhub claim <service> --wait-claim 5m |
devhub_claim claim (waitClaim, max 5 minutes) |
Aligned |
| Manually release someone else’s claim | “Release” on the 🔒 of a service row | POST /api/claims/:key/release |
devhub release <service> --override --yes |
devhub_claim release (override, needs confirm) |
Aligned |
| Pick a settings-panel path (env file, own certificate files, certificate directory) | “Browse…” next to the env file, certificate file, key file and certificate directory fields in the settings panel | POST /api/tls/pick-file |
— | — | Excluded: it opens a native file dialog on the computer running the devhub server, which only makes sense for someone sitting at that computer; agents and the CLI use devhub tls apply --set cfEnvFile=… (or duckdnsEnvFile=…), and devhub tls show prints the current paths |
| Pick a path inside a project (folder or file) | “Browse…” next to the fields of the service editor (working directory, envFile, copy, prestart steps, compose file, build context) and the worktree initialization page (copy, deps directory) | POST /api/pick-path |
— | — | Excluded: it opens a native dialog on the computer running the devhub server, which only makes sense for someone sitting at that computer; it starts at the root of the project’s selected worktree (or main checkout), rejects anything outside the project, and converts the result to the relative path each field expects; agents and the CLI write the path directly with devhub service update --set cwd=…, devhub worktree-init set and so on |
| Show the token file, certificate files or certificate directory in the file manager | Path links on the token label, the own-certificate files and the certificate directory in the settings panel | POST /api/tls/reveal |
— | — | Excluded: opening Finder/Explorer on the user’s desktop is only useful from the UI; an agent can get the paths from devhub tls show |
| Continue after overriding a claim | Confirmation dialog when claimed | — (the overrideClaim flag of start/restart/stop) |
— | — | Excluded: overrideClaim is available only to the UI (actor ui); agents are always refused, which is a deliberate security rule locked in by a test. To act on a service someone else has claimed, an agent uses release --override --yes to release it first and then operates, leaving an audit record |
| Proxy state | Header Proxy pill | GET /api/state |
devhub proxy status |
devhub_proxy status |
Aligned |
| Rebind 443/80 | Proxy → “Rebind” | POST /api/proxy/rebind |
devhub proxy rebind |
devhub_proxy rebind |
Aligned |
| Certificate renewal | Certificate → “Renew” | POST /api/proxy/renew |
devhub proxy renew --yes |
devhub_proxy renew (needs confirm) |
Aligned |
| View proxy and certificate settings | Settings panel | GET /api/tls |
devhub tls show |
devhub_tls show |
Aligned |
| Test the connection | “Test connection” in the Settings panel (incl. “Set A record now”) | POST /api/tls/test |
devhub tls test (--set-ip --yes = “Set A record now”) |
devhub_tls test (setIp + confirm) |
Aligned |
| Apply settings, write or clear the token | “Apply” and “Clear token” in the Settings panel | POST /api/tls/apply |
devhub tls apply --yes |
devhub_tls apply (needs confirm; no token, the user enters it in the UI) |
Aligned |
| View the local root CA path and trust instructions | Settings panel (when the certificate mode is local CA) | GET /api/ca |
devhub ca path, devhub ca trust |
devhub_ca pathdevhub_ca trust |
Aligned |
| Podman machine state | Header Machine pill | GET /api/state |
devhub machine status |
devhub_machine status |
Aligned |
| Start the Podman machine | Machine → “Start” | POST /api/machine/start |
devhub machine start |
devhub_machine start |
Aligned |
| Stop the Podman machine | Machine → “Stop” | POST /api/machine/stop |
devhub machine stop --yes |
devhub_machine stop (needs confirm) |
Aligned |
| devhub server information | (none; lets the CLI identify the instance) | GET /api/server |
devhub server status |
devhub_server status |
Aligned |
| New-version check state, what’s new and immediate check | Header version tag, “New version” pill (with what changed in each version) and “More → Check for updates” | GET /api/update, POST /api/update/check |
devhub plugin check |
devhub_plugin check |
Excluded: the CLI calls the same refreshCheck directly (sharing the cache file) and doesn’t need the server running; the API is only for the page to read the background check result |
| Admin entry switch on the proxy domain | “Allow opening the admin UI through the proxy domain (/devhub/)” in the Settings panel | POST /api/server/settings |
devhub server proxy-admin on |
devhub_server autostart |
Excluded: the CLI writes the config’s server.adminViaProxy directly (the same field as the UI), so it works even when the server isn’t running and doesn’t go through this API |
| List each agent’s installed devhub plugin | “Installed plugins” in the new-version pill popover and the version-tag popover | GET /api/plugins |
devhub plugin list |
devhub_plugin list |
Aligned |
| Update plugins on your behalf, then restart | “Update and restart” in the new-version pill (confirm first, then progress and output summary) | POST /api/plugins/update |
devhub plugin update --yes (--all updates every outdated one) |
devhub_plugin update (needs confirm) |
Aligned |
| Autostart switch | “Autostart devhub” in the Settings panel | POST /api/server/autostart |
devhub server autostart on |
devhub_server proxy-admin |
Excluded: the CLI writes the config’s server.autoStart directly (the same field as the UI), so it works even when the server isn’t running and doesn’t go through this API |
| Start and stop the devhub server | (none; the UI itself depends on the server) | — | devhub server startdevhub server stop |
devhub_server startdevhub_server stop |
CLI only: bypasses the management API and works even when the server isn’t running |
| Restart the devhub server | “Restart server” header pill → “Restart devhub server now” | POST /api/server/restart |
devhub server restart |
devhub_server restart (needs confirm) |
Excluded: the CLI stops and starts the server locally and works even when it isn’t running, so it doesn’t go through this API; the API is for the UI only, and the server spawns an independent process that runs the same devhub server restart |
| AI suggestions: status, detected agent CLIs and consent | Settings panel “AI suggestions” | GET /api/ai |
devhub ai status |
devhub_ai status |
Aligned |
| AI suggestions: switch, change agent, consent and revoke | Settings panel “AI suggestions” (shows the consent terms when enabling or switching to an agent without consent) | POST /api/ai/settings |
devhub ai enabledevhub ai disabledevhub ai revoke |
devhub_ai enable (needs confirm)devhub_ai disabledevhub_ai revoke |
Aligned |
| AI suggestions: ask and cancel | ✦ chat panel in the bottom-right corner (follow-up questions); inline ✦ on service rows, stack cards, the service editor, stack editor and settings panel | POST /api/ai/ask, POST /api/ai/cancel |
devhub ai ask --yes (--history for follow-ups; Ctrl-C cancels) |
devhub_ai ask (needs confirm; history for follow-ups) |
Aligned |
| View and set Claude Code plugin auto-update | (none) | — | devhub plugin autoupdate |
devhub_plugin autoupdate(on/off 只在使用者明說時) |
CLI only: edits the user’s Claude Code settings.json directly, bypassing the management API |
| Optional management API token | (none; the Settings panel only toggles the proxy entry) | — | devhub server token |
排除:token 與登入網址會出現在輸出並進入對話紀錄;維持只在 CLI 操作 | CLI only: edits the config and admin.token directly, bypassing the management API |
| Config file path | The config file notice at the top of the page | GET /api/state |
devhub config path |
devhub_config path |
Aligned |
| Export the current config (without secrets) | (none) | GET /api/config |
devhub config export |
devhub_config export |
Aligned |
| Expand/collapse project rows, popovers, drag-to-reorder in the editor, light/dark theme | The whole page | — | — | — | UI only: purely visual actions with no server state; use stack update --members for stack member order |
Exclusions and deliberate differences
- Clear the log view and Continue after overriding a claim: see the reasons in the table above.
- The DNS token is mainly entered by the user in the UI; the CLI’s
--token-stdinand--token-fileare alternatives for the user to run in their own terminal (an agent doesn’t run them for the user), never accepted as a command-line argument and never printed, so that it stays out of shell history and process lists. - Operations that need
--yes: deleting services and stacks, certificate renewal, applying TLS settings, stopping the Podman machine, and overriding someone else’s claim. In non-interactive mode they are always refused without--yes(exit 8); an interactive terminal asks. - Deliberately not in MCP:
- Writing tokens (
--token-stdin,--token-fileand--clear-tokenoftls apply, and all ofserver token): tokens and login URLs must stay out of the conversation transcript; the DNS token is entered by the user in the UI, andserver tokenstays CLI-only. logs --followandproxy logs --follow: an MCP tool call can’t stream; poll with thesinceparameter instead (note the time of the last line and query again).service show --reveal: MCP always masks env and secret values (results go into the transcript); this keeps the current rule.--file(reading a local file): pass a JSON object through thejsonparameter instead;server restart --force-older(downgrade) is CLI-only.
- Writing tokens (
--yesin MCP: the operations that need--yesin the CLI (deleting services and stacks,proxy renew,tls apply,machine stop,release --override), plus--switchandserver restart, requireconfirm: truein MCP. Without it the call fails (needsConfirm: true,exitCode: 8) and the CLI isn’t invoked; get the user’s explicit consent before calling.