CLI Reference

All agdesk CLI commands and flags.

The agdesk CLI manages the AgentDesk daemon. All commands accept --home <path> to override the data directory (default ~/.agent-desk/).

agdesk setup

Run the interactive setup wizard to configure AgentDesk.

$ agdesk setup

Flags:

FlagDescription
--yesNon-interactive mode — skip all prompts
--preset <key>LLM provider preset
--credential <key>API key or OAuth token
--base-url <url>Custom provider base URL
--default-model <model>Default model to use

Available presets: anthropic-subscription, anthropic-api-key, z-ai, openrouter, minimax, openai, custom

Setup is idempotent — safe to re-run. It creates ~/.agent-desk/ with config.json, .env, and the SQLite database.

agdesk start

Start the AgentDesk daemon as a background process.

$ agdesk start

Forks a detached daemon, writes the PID to agdesk.pid, and waits up to 15 seconds for the port to become available. Refuses to start if a live process is already recorded.

agdesk stop

Stop the running AgentDesk daemon.

$ agdesk stop

Sends SIGTERM to the daemon process and waits for graceful shutdown.

agdesk restart

Restart the daemon (stop + start).

$ agdesk restart

agdesk status

Show the current daemon status.

$ agdesk status

Prints the PID, dashboard URL, data directory, uptime, and log file size.

agdesk logs

View application logs.

$ agdesk logs        # last 200 lines
$ agdesk logs -f     # live tail (streams new log entries)

Logs are stored in ~/.agent-desk/logs/agdesk.log.

agdesk uninstall

Stop the daemon and optionally remove all data.

$ agdesk uninstall          # stops daemon, keeps data
$ agdesk uninstall --wipe   # stops daemon, deletes ~/.agent-desk/

Warning: --wipe permanently deletes your database, projects, and configuration. Use with caution.

Combine --yes --wipe for non-interactive removal (e.g., in scripts).