Skip to content

Commit 4634cd8

Browse files
committed
Document agent self-setup flow
1 parent 544db26 commit 4634cd8

1 file changed

Lines changed: 37 additions & 6 deletions

File tree

README.md

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,50 @@ run `./install.sh` instead; it uses the checkout in place. Rerun the wizard
5555
anytime with `inkbox-opencode setup` (`setup --print` for the static
5656
checklist), and check the wiring with `inkbox-opencode doctor`.
5757

58-
### Bootstrap an existing identity without prompts
58+
### Bootstrap an assigned identity without prompts
5959

60-
For unattended agent setup, install without opening the wizard and pass the API key through the environment:
60+
An agent that has been given an identity handle, API base URL, and credential can
61+
complete setup without using the signup wizard. First inspect this repository and
62+
`install.sh`, then run the reviewed installer without opening interactive setup:
6163

6264
```bash
63-
curl -fsSL https://raw.githubusercontent.com/inkbox-ai/opencode-plugin/main/install.sh | bash -s -- --no-setup
64-
export INKBOX_API_KEY="ApiKey_..."
65-
inkbox-opencode bootstrap --identity my-agent --project-dir "$PWD" \
65+
installer="$(mktemp)"
66+
curl -fsSL https://raw.githubusercontent.com/inkbox-ai/opencode-plugin/main/install.sh -o "$installer"
67+
cat "$installer"
68+
bash "$installer" --no-setup
69+
rm -f "$installer"
70+
```
71+
72+
Have the human provide the assigned credential through a private secret-input
73+
mechanism that exposes `INKBOX_API_KEY` only to the bootstrap process; do not ask
74+
them to paste it into chat. Do not put it in a command argument, source control,
75+
project instructions, or a checked-in environment file. Replace `<handle>` and
76+
`<url>` with the assigned values, preserving the assigned identity rather than
77+
creating another one:
78+
79+
```bash
80+
inkbox-opencode bootstrap --identity "<handle>" --base-url "<url>" --project-dir "$PWD" \
6681
--voice-ai --rotate-signing-key --start-gateway
6782
unset INKBOX_API_KEY
6883
```
6984

70-
`bootstrap` validates the exact identity, scopes down an admin key before saving it, preserves existing Voice AI settings, and starts or restarts the detached gateway. Signing-key replacement is explicit because it transfers verified webhook delivery away from gateways using the previous key. The command prints a secret-redacted JSON result and is safe to resume.
85+
`bootstrap` is non-interactive and resumable. It validates the exact identity,
86+
scopes down an admin key before saving it in the plugin's private local
87+
configuration, preserves existing Voice AI settings, and starts or restarts the
88+
detached gateway. Signing-key replacement is explicit because it transfers
89+
verified webhook delivery away from gateways using the previous key.
90+
91+
The command prints a secret-redacted JSON result. Handle it by `status`:
92+
93+
- `configured`: run `inkbox-opencode doctor` to verify the installation,
94+
credentials, identity, connectivity, and gateway.
95+
- `requires_human`: show the human every entry in `humanActions`, wait for them
96+
to complete the requested action, then resume by running the same bootstrap
97+
command with the same assigned identity.
98+
- `error`: inspect the redacted `error` and completed `actions`, run
99+
`inkbox-opencode doctor` for diagnostics when configuration was saved, correct
100+
the cause, and retry the same bootstrap command. Do not switch to signup or
101+
create a replacement identity.
71102

72103
### Manual install (per-project, or no installer)
73104

0 commit comments

Comments
 (0)