This guide is for agent-driven setup.
Use it when adcom is running on a remote VM, container, CI worker, OpenClaw instance, or any environment where the browser is not on the same machine as the CLI process.
Canonical command
code
adcom setup --json --no-open --print-urlThis is the recommended bootstrap command for Codex, Claude Code, and other automation.
What the agent does
The agent can complete these steps on its own:
- install
adcom - start CLI authentication
- wait for browser approval
- wait for Meta to be connected in the app
- select a default account when needed
- create and validate
.adcom/context.yaml - verify hosted MCP readiness
What the user does
The user only needs to:
- open the URL from the
login_urlevent - sign in and approve CLI access
- finish Meta authentication at the app integrations page if prompted
Event stream
adcom setup --json emits newline-delimited JSON events.
Example sequence:
code
{"event":"login_url","authorize_url":"https://app.ad.computer/cli/authorize?request_id=..."}
{"event":"login_complete","workspace_id":"user_123"}
{"event":"meta_connection_url","url":"https://app.ad.computer/integrations"}
{"event":"default_account_selected","default_account_id":"act_123"}
{"event":"context_initialized","path":"/workspace/.adcom/context.yaml"}
{"event":"setup_complete","report":{"ready":true}}One-shot readiness
Use this when you want the current state without re-running setup:
code
adcom status --jsonIt returns overall readiness, detailed checks, and blocking remediation.
SSH and headless notes
- No localhost callback is required.
- The browser can run on a different machine from the CLI process.
--no-open --print-urlis the safest default for remote agents.- The command keeps running until approval and Meta connection complete, or until the timeout is reached.
Recovery
If setup times out:
- rerun
adcom setup --json --no-open --print-url - reuse the new
login_url - then verify the final state with
adcom status --json
Local bridge
If the client needs stdio MCP after setup:
code
adcom mcp serve