diff --git a/README.md b/README.md index 072ed60313..50eb6424f4 100644 --- a/README.md +++ b/README.md @@ -446,21 +446,16 @@ AgentDesk keeps settings in multiple surfaces on purpose. The contract is per-su ### Environment Variables -| Variable | Purpose | -|----------|---------| -| `AGENTDESK_ROOT_DIR` | Override runtime directory (default: `~/.adk/release`) | -| `AGENTDESK_CONFIG` | Override config file path | -| `AGENTDESK_REPO_DIR` | Override resolved AgentDesk repo path used by `git`/`gh` exec helpers | -| `AGENTDESK_SERVER_PORT` | Override HTTP server port (default: 8791) | -| `AGENTDESK_INSTALL_PORT` | Override the macOS installer-created config port; sandbox install roots derive a non-8791 loopback port by default | -| `AGENTDESK_API_URL` | Override base URL the CLI client uses to reach the local API | -| `AGENTDESK_TOKEN` | Optional Discord bot token forwarded to `dcserver` at startup. **Not** used by `discord-send*` CLI commands (those load configured bot tokens via the wizard, or require `--key`) and **not** used for `/api/*` auth — that comes from `server.auth_token` in `agentdesk.yaml` | -| `AGENTDESK_DCSERVER_LABEL` | Override launchd service label | -| `AGENTDESK_STATUS_INTERVAL_SECS` | Status polling interval (default: 5) | -| `AGENTDESK_TURN_TIMEOUT_SECS` | Turn watchdog timeout in seconds (default: 3600) | -| `AGENTDESK_HEADLESS_DISCORD_NONCE` | Opt in (`1` or `true`) to an enforced Discord nonce for trusted durable `headless_turn` outbox rows on the <=2,000-character manual/v3 inline path. Default is off. Retries of one parsed positive row ID reuse the same nonce, but Discord applies duplicate suppression only within its bounded recent-nonce retention window; this is not indefinite deduplication, and oversize attachment/chunk paths are outside this rollout. | -| `AGENTDESK_GH_PATH` / `AGENTDESK_CODEX_PATH` / `AGENTDESK_GEMINI_PATH` | Override resolved provider/CLI binary paths | -| `RUST_LOG` | Standard tracing filter (default: `agentdesk=info`) | +The full list of environment variables the binary reads is generated from the +source tree: see [docs/generated/env-reference.md](docs/generated/env-reference.md) +(regenerate with `python3 scripts/generate_env_reference.py`; CI fails when it +drifts). The most commonly used ones: + +- `AGENTDESK_ROOT_DIR` — runtime directory (default: `~/.adk/release`) +- `AGENTDESK_CONFIG` — config file path +- `AGENTDESK_API_URL` — base URL the CLI client uses to reach the local API +- `AGENTDESK_TOKEN` — optional Discord bot token forwarded to `dcserver` at startup. **Not** used by `discord-send*` CLI commands and **not** used for `/api/*` auth (that comes from `server.auth_token` in `agentdesk.yaml`) +- `RUST_LOG` — standard tracing filter (default: `agentdesk=info`) ## Customization @@ -631,73 +626,30 @@ Each agent maps to a Discord channel where it receives and responds to tasks. ## CLI Reference +Every subcommand, nested subcommand, flag, and positional argument is generated +from the clap definitions in `src/cli/args.rs`: see +[docs/generated/cli-reference.md](docs/generated/cli-reference.md) (regenerate +with `python3 scripts/generate_cli_reference.py`; CI fails when it drifts). +`agentdesk --help` and `agentdesk --help` print the same information +at runtime. + +Frequently used entry points: + ``` -# Server agentdesk dcserver # Start Discord control plane agentdesk init # Interactive setup wizard -agentdesk reconfigure # Re-run setup (preserves data) -agentdesk restart-dcserver # Graceful restart with crash context -agentdesk doctor [--json] [--profile quick|deep|security] -agentdesk doctor --fix --allow-restart # Explicit service restart repair -agentdesk doctor --fix --repair-sqlite-cache # Explicit legacy SQLite cache repair -agentdesk emit-launchd-plist --flavor release|dev [--label