Skip to content

CLI Commands

Reference for the end-user adhdev command-line tool.

Global Commands

adhdev

Show help and available commands.

adhdev setup

Interactive setup wizard. Authenticates your machine with ADHDev Cloud.

bash
adhdev setup
# Opens browser for device authentication
# Stores token in ~/.adhdev/config.json

adhdev daemon

Start the daemon process. Connects to your IDE(s) and the ADHDev server.

bash
adhdev daemon
# Runs in foreground, press Ctrl+C to stop

If you want the local-only standalone server, use the self-hosted docs instead:

adhdev standalone

Start the self-hosted standalone server: local dashboard + embedded daemon + standalone session-host namespace.

bash
adhdev standalone
adhdev standalone --host 0.0.0.0
adhdev standalone --port 8080
adhdev standalone --token mysecret
adhdev standalone --no-open
adhdev standalone --dev

Use this when you explicitly want the self-hosted/local-only path instead of the cloud-connected daemon flow.

Important behavior:

  • standalone stays localhost-only by default unless you pass --host
  • if you expose it on 0.0.0.0 without token auth or a dashboard password, standalone warns that the dashboard is open to your LAN
  • standalone uses its own session-host namespace by default so it does not fight the cloud-connected daemon for hosted runtimes on the same machine

For deeper self-hosted details, see:

adhdev daemon:status

Show current daemon status and local health information.

bash
adhdev daemon:status
adhdev daemon:status --port 19222

This command reports:

  • daemon PID and log path
  • local IPC reachability
  • session-host status when available
  • direct fallback status when daemon IPC is unavailable

adhdev status

Show current machine setup status.

bash
adhdev status

Use this when you want a quick answer to "is this machine configured and logged in?" rather than daemon/runtime diagnostics.

adhdev mcp

Start the ADHDev MCP server over stdio so MCP clients such as Claude Desktop can inspect and control ADHDev sessions.

bash
# Local mode: talks to the standalone daemon on localhost:3847
adhdev mcp
adhdev mcp --port 4000
adhdev mcp --password my-standalone-password

# Cloud mode: talks to ADHDev Cloud with an API key
adhdev mcp --api-key adk_xxx
adhdev mcp --api-key adk_xxx --base-url https://api.adhf.dev

Cloud mode uses the public REST shortcuts API with your adk_* API key. It does not create a dashboard P2P connection and it is not a fallback path for dashboard commands.

Claude Desktop-style config:

json
{
  "mcpServers": {
    "adhdev": {
      "command": "adhdev",
      "args": ["mcp"]
    }
  }
}

Available tools:

ModeTools
Local standalonelist_sessions, read_chat, send_chat, approve, screenshot, git_status
Cloudlist_sessions, read_chat, send_chat, approve

Options:

FlagDescription
--api-key <key>Switch to cloud mode using an ADHDev API key
--base-url <url>Override the cloud API base URL
--port <n>Standalone daemon port for local mode (default: 3847)
--password <pass>Standalone daemon password/token if configured

Launch Commands

adhdev launch [target]

Launch or relaunch an IDE with CDP enabled, or start a CLI agent through the running daemon.

For CLI providers, a normal launch is a fresh session by default. Resume/recovery should only happen when you explicitly choose a saved session or use hosted runtime recovery on purpose.

bash
# IDEs
adhdev launch cursor          # Launch Cursor (CDP port 9333)
adhdev launch antigravity     # Launch Antigravity (CDP port 9335)
adhdev launch windsurf        # Launch Windsurf (CDP port 9336)
adhdev launch vscode          # Launch VS Code
adhdev launch kiro            # Launch Kiro

# CLI Agents
adhdev daemon                 # Start the daemon once
adhdev launch gemini          # Launch Gemini CLI session
adhdev launch claude          # Launch Claude Code session
adhdev launch codex           # Launch Codex CLI session
adhdev launch aider           # Launch Aider session
adhdev launch cursor-cli      # Launch Cursor CLI session
adhdev launch github-copilot-cli # Launch GitHub Copilot CLI session
adhdev launch goose           # Launch Goose CLI session
adhdev launch opencode        # Launch OpenCode CLI session

Options:

FlagDescription
-w, --workspace <path>Open specific workspace/folder
-n, --new-windowOpen in a new window

WARNING

adhdev launch for IDEs will close the existing IDE process and reopen it with CDP enabled. Save your work first.

History Commands

adhdev history list <provider>

List saved provider-native CLI/ACP history for a provider.

bash
adhdev history list claude
adhdev history list hermes-cli --json
adhdev history list codex-cli --limit 10 --offset 10
adhdev history list claude --resumable
adhdev history list claude --sort oldest
adhdev history list claude --sort messages
adhdev history list claude --text "reply with exactly" --workspace remote_vs --model gpt-5.4

Use this first when your real goal is:

  • "what conversations can I continue?"
  • "which provider history has the context I want?"
  • "which saved session still has a resumable workspace?"

This command reads saved history metadata (providerSessionId, workspace, preview, message count) rather than session-host runtime records.

Useful filters and sort modes:

  • --resumable → show only entries that can resume immediately without needing --dir
  • --text <text> → filter by title or preview substring
  • --workspace <text> → filter by workspace path substring
  • --model <text> → filter by model substring
  • --sort recent → newest activity first (default)
  • --sort oldest → oldest activity first
  • --sort messages → highest message count first

adhdev history resume <provider> [historySessionId]

Resume a provider-native saved history session.

bash
adhdev history resume claude 20260414_101931_38d017
adhdev history resume hermes-cli 20260413_163128_d61494
adhdev history resume claude --dir /path/to/worktree   # choose interactively when omitted
adhdev history resume claude --resumable --sort messages
adhdev history resume claude --text "sonnet follow-up" --workspace remote_vs --model gpt-5.4

This is the primary continuity path for normal CLI use. If you want to keep talking in the same provider conversation, prefer this over runtime attach/recover. If you omit historySessionId, ADHDev will:

  • auto-select the only resumable saved history entry, or
  • open an interactive picker when multiple resumable entries exist.

Interactive picker controls:

  • --resumable → hide entries that still need --dir
  • --text <text> → filter by title or preview substring
  • --workspace <text> → filter by workspace path substring
  • --model <text> → filter by model substring
  • --sort recent|oldest|messages → use the same ordering semantics as history list

If the saved entry is missing workspace metadata, pass --dir explicitly.

Runtime Commands

adhdev runtime list

List hosted runtime recovery and diagnostics state using live/recovery/inactive groups instead of raw session-host diagnostics.

bash
adhdev runtime list
adhdev runtime list --all
adhdev runtime list --json

By default this groups records into:

  • live runtimes
  • recovery snapshots
  • inactive records when --all is requested

Use this first when you want to answer:

  • "what is actually live right now?"
  • "what can I recover?"
  • "which record is just a stale snapshot?"

adhdev runtime attach <runtimeTarget>

Attach your current terminal directly to a live hosted runtime.

bash
adhdev runtime attach <runtimeTarget>
adhdev runtime attach <runtimeTarget> --read-only
adhdev runtime attach <runtimeTarget> --takeover

This command only accepts live runtimes. If the target is a recovery snapshot or an inactive stopped record, it fails fast and tells you to recover or restart instead of pretending the target is attachable.

adhdev runtime open <runtimeTarget>

Open an adhmux workspace for a live hosted runtime.

bash
adhdev runtime open <runtimeTarget>
adhdev runtime open <runtimeTarget> --read-only
adhdev runtime open <runtimeTarget> --workspace review-pane

Use this when you explicitly want the advanced mux/pane workflow. Normal terminal attach and recovery flows should still start with adhdev runtime attach, adhdev runtime recover, or adhdev runtime restart.

adhdev runtime recover <runtimeTarget>

Recover or resume a hosted runtime record.

bash
adhdev runtime recover <runtimeTarget>
# alias
adhdev runtime resume <runtimeTarget>

adhdev runtime restart <runtimeTarget>

Restart a hosted runtime record.

bash
adhdev runtime restart <runtimeTarget>

adhdev runtime stop <runtimeTarget>

Stop a hosted runtime record.

bash
adhdev runtime stop <runtimeTarget>

adhdev runtime snapshot <runtimeTarget>

Print the latest terminal snapshot for a hosted runtime record.

bash
adhdev runtime snapshot <runtimeTarget>
adhdev runtime snapshot <runtimeTarget> --json

<runtimeTarget> can be a session ID, runtime key, display name, or a unique prefix from adhdev runtime list.

This is the hosted-runtime recovery and diagnostics surface. Use it when the runtime process itself needs recovery after interruption, not as the normal way to continue provider conversation history.

For the two most common runtime actions, there are also top-level shortcuts:

bash
adhdev attach <runtimeTarget>
adhdev recover <runtimeTarget>
adhdev resume <runtimeTarget>

These are direct shortcuts for adhdev runtime attach and adhdev runtime recover.

Session Host Commands

adhdev daemon:session-host

Inspect and control the local session host.

This is the advanced diagnostics and operator-control surface behind adhdev runtime .... It is intentionally de-emphasized from the primary CLI help because most users should start with the runtime surface first.

bash
# Show diagnostics snapshot
adhdev daemon:session-host

# Use a non-default daemon IPC port
adhdev daemon:session-host --port 19222

# Print raw diagnostics JSON
adhdev daemon:session-host --json

# Restart a hosted runtime
adhdev daemon:session-host --session <sessionId> --restart

# Resume a runtime
adhdev daemon:session-host --session <sessionId> --resume

# Stop a runtime
adhdev daemon:session-host --session <sessionId> --stop

# Send a signal
adhdev daemon:session-host --session <sessionId> --signal SIGINT

# Force-detach a stuck client
adhdev daemon:session-host --session <sessionId> --detach-client <clientId>

# Prune stale duplicate runtimes for the same provider session
adhdev daemon:session-host --prune-duplicates

# Force write ownership
adhdev daemon:session-host --session <sessionId> --acquire-write <clientId> --owner-type user

# Release write ownership
adhdev daemon:session-host --session <sessionId> --release-write <clientId>

Use this when hosted CLI sessions are stuck, disconnected, or need manual recovery.

Hosted runtime recovery is intentionally explicit. Ordinary daemon startup does not automatically re-open hosted CLI sessions unless you opt into that behavior yourself.

Options:

FlagDescription
-p, --port <port>Local daemon IPC port
--jsonPrint JSON output
--limit <count>Number of recent diagnostics entries to include
--session <sessionId>Target runtime session
--restartRestart the target runtime
--resumeResume the target runtime
--stopStop the target runtime
--signal <signal>Send a signal such as SIGINT or SIGTERM
--detach-client <clientId>Force-detach a specific attached client
--prune-duplicatesRemove stale duplicate hosted runtimes
--acquire-write <clientId>Force-acquire write ownership for a client
--release-write <clientId>Release write ownership for a client
--owner-type <type>Owner type for --acquire-write: user or agent

Use this when session-host and daemon state look out of sync, when a runtime is stuck in interrupted, or when write ownership needs manual recovery.

Service Management

adhdev service install

Register the ADHDev daemon as an OS background service that starts automatically on login.

bash
adhdev service install
PlatformMethod
macOSLaunchAgent plist (~/Library/LaunchAgents/dev.adhf.daemon.plist)
WindowsVBScript in Startup folder (hidden console window)
LinuxNo built-in auto-install helper

The daemon restarts automatically if it crashes, but does not restart loop if it exits cleanly (e.g. when another instance is already running).

adhdev service uninstall

Remove the OS background service. A currently running daemon is not affected — stop it separately with adhdev daemon:stop.

bash
adhdev service uninstall

adhdev service status

Show service registration state and live daemon health (PID, uptime, memory, log sizes).

bash
adhdev service status
# ✓ Service is installed.
# ✓ Daemon running — PID 12723, uptime 2h 13m, 58 MB
# Logs: stdout 4.2 KB, stderr 0 B

adhdev service logs

View daemon service logs in real-time (tail -f).

bash
adhdev service logs             # Follow stdout log
adhdev service logs --err       # Follow stderr log
adhdev service logs -n 50       # Show last 50 lines
adhdev service logs --clear     # Truncate all log files

adhdev service restart

Restart the daemon via the OS service. Sends SIGTERM to the current process and lets the service manager (launchd / Windows startup) relaunch it. Also rotates logs over 10 MB.

bash
adhdev service restart

Account & Data

adhdev logout

Log out from ADHDev. Clears auth credentials but keeps IDE and workspace settings.

bash
adhdev logout
adhdev logout -f   # Skip confirmation prompt

adhdev reset

Reset ADHDev configuration. Prompts for confirmation before clearing ~/.adhdev/config.json.

bash
adhdev reset

adhdev uninstall

Completely remove ADHDev from the system. Stops the daemon, removes the OS background service, and deletes all data in ~/.adhdev.

bash
adhdev uninstall
adhdev uninstall -f   # Skip confirmation prompt

This command performs the following steps:

  1. Stops the running daemon process (if any)
  2. Removes the OS background service (LaunchAgent / Startup script)
  3. Deletes ~/.adhdev/ — all configuration, auth tokens, logs, and cached data
  4. Prints instructions to finish with npm uninstall -g adhdev

WARNING

This cannot be undone. All settings, credentials, and downloaded providers will be permanently deleted. Use adhdev logout or adhdev reset if you only want to clear auth or config.

Version & Upgrade

adhdev --version

Show current ADHDev version.

adhdev update

Upgrade ADHDev to the latest version and restart the daemon. Alias for adhdev daemon:upgrade.

bash
adhdev update
adhdev update --no-restart   # Upgrade only, skip daemon restart

adhdev daemon:upgrade

Upgrade the daemon to the latest version.

bash
adhdev daemon:upgrade
# Downloads and installs latest version

adhdev daemon:api [mode]

Manage server REST API relay access. Disabled by default — dashboard traffic always uses P2P/local IPC.

bash
adhdev daemon:api           # Show current status
adhdev daemon:api enable    # Allow server-side REST proxy routes
adhdev daemon:api disable   # Revoke server-side REST proxy routes

This only affects server API proxy routes. The dashboard command/data plane remains P2P-first regardless of this setting.

Advanced Commands

Commands such as adhdev provider ..., adhdev cdp ..., and adhdev daemon --dev are primarily for diagnostics, provider work, or local debugging. They are intentionally left out of the normal user workflow here.

Hosted cloud docs live here. Open-source and self-hosted docs live in the OSS repository.