> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# agent-cards companies wizard

> Run an AI agent that implements Agentcard (OAuth + MCP) into the repo at this

Run an AI agent that implements Agentcard (OAuth + MCP) into the repo at this

```bash theme={null}
agent-cards companies wizard --help
```

```text theme={null}
Usage: agent-cards companies wizard [options]

Run an AI agent that implements Agentcard (OAuth + MCP) into the repo at this
path

Options:
  --path <dir>        Target repo directory (defaults to the current directory)
  -y, --yes           Skip the consent prompt (required in agent mode: explicit
                      consent to modify files)
  --agent             Non-interactive agent mode: no prompts, plain streaming
                      output, machine-readable result line (auto-enabled under
                      CLAUDECODE/CI or without a TTY)
  --email <email>     Email for sign-in when no session exists (interactive:
                      prefills the sign-in prompt)
  --code <code>       Agent mode: sign-in code from the email (only for
                      backends on code sign-in, after a code_required exit;
                      interactive runs prompt for the code)
  --org <id-or-name>  Company to provision under (agent mode: required when the
                      account has several; interactive: skips the picker)
  --app-url <url>     Your app's base URL for the OAuth callback (default
                      http://localhost:3000)
  --app-name <name>   Name for the company (when created) and OAuth client
                      (default: the repo directory name)
  --verbose           Include tool inputs and outputs in the stream
  --engineer          Route Agentcard uncertainty to the LIVE forward-deployed
                      engineer instead of guessing from the static playbook
                      (needs `engineer init` + a running `engineer connect` for
                      this repo)
  -h, --help          display help for command

Agent mode (for AI agents / CI):
  agent-cards companies wizard --agent --yes [--email you@co.com] [--org <id>] [--app-url http://localhost:3000]
  (also reachable as: npx agent-cards-admin wizard --agent --yes — the old name forwards here)

  - auto-enabled without --agent when CLAUDECODE or CI is set, or a TTY is missing
    on either side; AGENT_CARDS_WIZARD_MODE=agent|interactive overrides auto-detection
  - never prompts; anything it needs and doesn't have exits 2 — the result line's
    "hint" names the flag to re-run with and what to ask your user when the value
    isn't derivable (the emailed sign-in code, which company, the app's base URL)
  - sign-in: prints "magic link sent to <email>" and polls up to 15 minutes (env
    AGENT_CARDS_WIZARD_LOGIN_TIMEOUT_MS overrides); re-runs RESUME the pending
    sign-in instead of re-emailing. Backends on code sign-in exit 2 with
    code_required — finish with --email <email> --code <code>
  - runs take 5-20 minutes end to end: use a generous timeout or run in background
  - streams plain progress lines (add --verbose for tool detail); if a connect link
    needs a user tap it appears in the stream — open it to let the run continue
  - the LAST line is machine-readable:  AGENTCARD_WIZARD_RESULT {"ok":true,...}
  - exit codes: 0 success · 1 integration/unexpected error · 2 missing input/consent
    error codes: consent_required, login_required, code_required, invalid_email,
    invalid_path, invalid_app_url, invalid_app_name, org_ambiguous, org_not_found, root_unsupported,
    integration_agent_error, unexpected_error
  - --engineer additionally requires a live engagement; missing pieces exit 2 with
    engineer_engagement_required, engineer_engagement_not_active, or
    engineer_daemon_not_running (the hint names the command a human must run)
```
