What to tell your agent
Once the devhub plugin is installed, you can set up and run devhub just by asking — in Claude Code, Codex or Antigravity. Every sentence below copies in one click; paste it into the chat.
Before you start
Install the plugin once in the agent you use. Afterwards the agent has devhub's MCP server, CLI and skill — no extra registration.
Claude Code
claude plugin marketplace add vantist/DevHub
claude plugin install devhub@devhubCodex
codex plugin marketplace add vantist/DevHub
codex plugin add devhub@devhubAntigravity
agy plugin install https://github.com/vantist/DevHubRequires Node.js 20 or later. Claude Code also gains commands such as /devhub:status and /devhub:restart. The devhub server starts manually by default, so just ask:
It checks first and asks before starting (Claude Code and Antigravity with auto-start on don't need to ask). Then open http://127.0.0.1:4999 for the admin UI.
First-time setup
Hand services, stacks, URLs and worktrees to the agent in one go. Every change goes through devhub's own commands — your config file is never edited by hand.
Add a service
Add ~/code/api to devhub: start it with npm run dev, port 4000, path /api.Checks existing services to avoid duplicates, then adds and validates the entry. Afterwards you can address it by key (
api), port or path.Create a stack
Save db, api and web as a stack called dev so I can start them together.Creates the stack and starts members in order, waiting for each to be ready. You can also say "save what's running as a stack".
Set up HTTPS
I want to develop over HTTPS and I don't have a domain — walk me through DuckDNS.Recommends DuckDNS (no domain) or Cloudflare (own domain), lists what to prepare, then tests the setup and checks the certificate. Enter the token yourself in the admin UI's Settings — don't paste it into the chat.
Prepare new worktrees automatically
Set up worktree initialization for me.Works out, per service, which git-ignored config files to copy and how to handle
node_modulesfrom each service's working directory and envFile (paths only, never file contents). It shows you the result and writes it only after you confirm; projects that already have settings aren't overwritten. After that, the first service start in a new worktree fills everything in. If a command must run after dependencies are installed (code generation, say), tell it "runnpm run generateafter initializing a new worktree" and it setsrun.
Day to day
Most of the time you just say what you want — no commands to remember.
Restart my worktree's services
I'm done editing — restart this worktree's services and confirm they're all up.Restarts only the services in your worktree and reports once they're ready; on failure it includes the last 50 log lines. The services are claimed automatically so other agents can't switch them away.
Touch just one service
Restart only api — I changed its build step, so rebuild too.Restarts
apiafter re-running its prestart build. Address a service by key, port or path.Start and stop
I'm done testing — stop web and release it.Stops the service and releases your claim. Say "start the dev stack" to start its members in order. A port held by another program is never taken over on its own — it reports first.
Status and logs
What's running right now? api won't start — check its log.Lists each service's state, port and worktree, then reads
api's log; if needed it checks the environment snapshot (secrets masked) for a missing tool version or envFile.Switch worktrees
Run web from the feature-login worktree and restart it.Selects the worktree and restarts on the same port. If a running stack is using the service from another worktree, it stops and asks whether to switch or keep it.
Claim and release (several agents)
I'm running integration tests — claim api and db so no other agent switches them.Until the claim expires, other agents can't restart or switch them; say "release" when you're done. If someone else holds a service, the agent stops and tells you rather than grabbing it — or say "wait for it, up to 5 minutes".
Scheduled restarts
Restart api automatically every day at 04:00.Sets
restartAtonapito 04:00 daily, in the devhub server's local time. Only running services are restarted; a claimed service is skipped, and times missed while the computer slept or devhub wasn't running are not made up. To cancel, say "turn off api's scheduled restart".Update devhub
Check whether there's a new devhub version and tell me how to update.Compares against the remote version and gives you your agent's update command (Claude Code can also turn on auto-update with
/devhub:update). Most updates need no restart — only core changes require restarting the devhub server.Restart the devhub server
devhub says the server needs a restart — please restart it.Confirms an update really is pending and restarts only with your consent. Your managed services keep running; only the proxy and admin UI drop for a few seconds.
Good to know
Things the agent won't do for you, or will always ask about first.
- Trusting the local CAWith a local CA,
devhub ca trustonly prints the per-platform install commands. You run them yourself; the agent never elevates privileges. - Tokens and DNS recordsYou prepare the DuckDNS or Cloudflare token and the domain's A record. Enter the token only in the admin UI (
http://127.0.0.1:4999orhttps://<proxy host>/devhub/→ Settings at the top right); the agent never asks for, reads or displays it, so don't paste it into the chat. - Binding 443/80 on LinuxNeeds a one-time
setcapwith sudo, or a high port instead. macOS and Windows don't need it. - Asks for your consent firstDeleting a service or stack, renewing the certificate, changing TLS settings, releasing someone else's claim, switching a worktree a running stack uses, and restarting the devhub server never happen without your explicit yes.
- Tools and config filesMissing tools such as Node are reported, never installed or version-switched for you. It also doesn't edit
~/.config/devhub/directly — only through devhub commands. - Codex starts the server manuallyCodex has no session-start hint and doesn't auto-start devhub, so say "start devhub for me".
Further reading
- For agentsInstall, update, commands, claims, MCP
- Install and first runRequirements, starting, config location
- Using the UIService matrix, worktrees, stacks, logs
- HTTPS setupDuckDNS, Cloudflare, local CA
- Worktree initializationRules and settings
- CLI and UI parityCommand and MCP tool for every feature