@zibby/skills 0.1.28 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,175 @@
1
+ ---
2
+ sidebar_position: 6
3
+ title: Goal-mode deploys
4
+ ---
5
+
6
+ # Goal-mode deploys
7
+
8
+ **Describe what you want. Get a deployment.**
9
+
10
+ Goal-mode is `zibby app deploy --goal "..."` — a free-form natural-language install path for any app not in the catalog. Claude writes the bash, agent-ops runs and supervises it inside the container, and you get back a stable HTTPS URL pointing at a running app, encrypted EFS volume and all.
11
+
12
+ ```bash
13
+ zibby app deploy --goal "Install n8n on port 5678 with sqlite persistence" \
14
+ --project <project-id> \
15
+ --name automations
16
+ ```
17
+
18
+ That's it. ~5 minutes wall-clock on a healthy run, $0.05-$0.30 in Claude tokens, and you have n8n.
19
+
20
+ ## When goal-mode works well
21
+
22
+ - The install fits in **30 min wall-clock and 8 GB RAM**. (Most things: anything pip / npm / cargo / apt / single Docker run. Not things that need to compile LLVM from source.)
23
+ - The app exposes a **single HTTP port** for verification. (Multi-port apps work — agent-ops just verifies the main one.)
24
+ - You're OK with the app running on a fresh ephemeral EFS volume. (No "restore from my existing database" — start the customer's data flow yourself, post-deploy.)
25
+ - The upstream has a **documented install path**. Random unmaintained GitHub repos with no README work less well than mainstream projects.
26
+
27
+ If your install needs more than that — long compile steps, custom kernel modules, a 50 GB pre-trained model download — bring your own host. Goal-mode isn't trying to replace EC2.
28
+
29
+ ## How it works
30
+
31
+ ```
32
+ zibby app deploy --goal "Install n8n on port 5678 ..."
33
+
34
+
35
+ backend POST /apps:
36
+ - extracts verify port from "on port NNNN" (sniffs goal text)
37
+ - splices AGENT_OPS_BOOTSTRAP_MODE=agent_script
38
+ - splices BOOTSTRAP_PROMPT=<your goal text>
39
+ - splices customer's BYOK Claude token (env or --anthropic-token)
40
+ - splices model / max-turns / timeout / token-budget flags
41
+ - splices AGENT_OPS_BOOTSTRAP_SYSTEM_RULES (curated house rules)
42
+ - defaults to 4 vCPU / 8 GB Fargate (heavier than the catalog tiers,
43
+ because installs are CPU-spiky)
44
+
45
+
46
+ container starts. agent-ops runs the agent_script loop:
47
+
48
+ ┌── Phase 1: PLAN ─────────────────────────────────────────────┐
49
+ │ Claude with Write+Read tools only — no Bash, no Edit. │
50
+ │ Reads your goal + house rules. Writes one complete bash │
51
+ │ script to /tmp/install.sh. ~2 turns, ~$0.05. │
52
+ └──────────────────────────────────────────────────────────────┘
53
+
54
+
55
+ ┌── Phase 2: SUPERVISE LOOP ───────────────────────────────────┐
56
+ │ agent-ops execs /bin/bash /tmp/install.sh in a process group │
57
+ │ (so we can kill the whole tree on intervene). │
58
+ │ │
59
+ │ Every 30s: │
60
+ │ - snapshot stdout/stderr tail + proc status + idle time │
61
+ │ - send to Claude (text-only, no tools) │
62
+ │ - Claude returns one JSON line: │
63
+ │ {"verdict":"continue","note":"..."} │
64
+ │ {"verdict":"done","note":"app responding on :5678"} │
65
+ │ {"verdict":"intervene","reason":"...","note":"..."} │
66
+ │ │
67
+ │ continue: log progress, keep polling │
68
+ │ done: write success, leave the nohup'd app running │
69
+ │ intervene: SIGTERM the pgroup, 5s grace, SIGKILL, replan │
70
+ │ │
71
+ │ Auto-short-circuit: if proc EXITED with code 0 AND verify │
72
+ │ port returns 2xx-499, agent-ops declares done without │
73
+ │ asking the supervisor. Stops false-positive intervenes when │
74
+ │ the app went into the background and Claude can't see its │
75
+ │ "startup logs" in the snapshot anymore. │
76
+ └──────────────────────────────────────────────────────────────┘
77
+
78
+ intervene? ───→ back to Phase 1, with stderr +
79
+ stdout + exit code as new context.
80
+ Claude REWRITES the script (not patches).
81
+ Phase 2 starts fresh.
82
+
83
+
84
+ Hard caps (whichever hits first):
85
+ - 5 iterations
86
+ - 30 min wall-clock (configurable via --timeout-min)
87
+ - $1.00 token budget
88
+ ```
89
+
90
+ Every iteration's script + supervisor turns + final status are persisted under `/var/lib/agent-ops/agent_script-state/` on the per-instance EFS volume. `zibby app logs <id>` surfaces the supervisor verdicts in real time; the persisted state is there for post-mortems.
91
+
92
+ ## CLI flags
93
+
94
+ The flags that matter for goal-mode:
95
+
96
+ | Flag | What |
97
+ |---|---|
98
+ | `--goal "<text>"` | Free-form install description. Mutually exclusive with `[appType]`. |
99
+ | `--model <name>` | Claude model — `claude-sonnet-4-6` (default), `claude-opus-4-8` (heavier installs), `claude-haiku-4-5-20251001` (cheaper). |
100
+ | `--max-turns <n>` | Claude subprocess max turns, 1-200 (default 25). Bump for heavy installs (n8n, OpenHands) that need many supervisor checks. |
101
+ | `--timeout-min <n>` | Bootstrap wall-clock minutes, 1-120 (default 30). |
102
+ | `--anthropic-token <token>` | Per-deploy Claude credential override. Starts `sk-ant-oat01-` (OAuth) or `sk-ant-api03-` (API key). Also accepts `ZIBBY_ANTHROPIC_TOKEN` env. Falls back to workspace credentials if absent. |
103
+ | `--name <name>` | Display name for `zibby app list` / dashboard. |
104
+ | `--auth-type / --auth-user / --auth-password / --auth-token` | Optional Caddy auth sidecar in front of the installed app. See [Auth proxy](./auth). |
105
+
106
+ Goal-mode tasks default to **4 vCPU / 8 GB** Fargate — heavier than catalog tiers — because `npm install -g n8n` and friends are CPU/memory spiky. You can still pass `--cpu` / `--memory` to override.
107
+
108
+ ## Cost expectations
109
+
110
+ Per goal-mode deploy:
111
+
112
+ - **Compute** — 5-15 min of 4 vCPU / 8 GB Fargate at standard Fargate pricing. Single-digit cents per deploy.
113
+ - **Claude tokens** — typically $0.05-$0.30 on Sonnet (the default). Opus-4-8 can hit $1.00 if the install takes 4-5 intervene iterations. Hard-capped at $1.00 by agent-ops — beyond that the deploy fails.
114
+ - **Ongoing** — once the app is running, the deploy is exactly like any catalog app: per-minute Fargate billing at the resource tier you ended up with. No Claude tokens spent after the install converges.
115
+
116
+ Practical: budget $0.20 - $0.50 per goal-mode deploy attempt, including failed ones. Re-runs after a fix are cheaper because the planner gets shorter context.
117
+
118
+ ## When it converges, when it loops
119
+
120
+ It converges fast when:
121
+
122
+ - The install is a single package manager call + a config file + a port to listen on.
123
+ - The app's own README has the exact install steps in a copy-pasteable block.
124
+ - You include the port in your goal (`"on port 5678"`) — saves the planner a guess.
125
+
126
+ It loops or fails when:
127
+
128
+ - The install needs interactive prompts and the planner forgets to `apt-get install -y` / `DEBIAN_FRONTEND=noninteractive`.
129
+ - The app needs a sister service (Postgres + Redis + web) and you didn't tell it. Goal-mode does one task; for multi-service, prefer a [catalog multi-service entry](./index#multi-service-entries) or split into multiple deploys.
130
+ - The download is huge (multi-GB models) and times out the 30-min wall-clock. Use `--timeout-min 60` if you know that's coming.
131
+
132
+ If it fails, the supervisor verdicts in the logs tell you exactly what went wrong on each iteration — paste the goal + the failure output back into the next `--goal "..."` with a hint and it usually converges.
133
+
134
+ ## License responsibility
135
+
136
+ Goal-mode is intentionally a different licensing posture from the catalog:
137
+
138
+ - **Catalog apps** — Zibby pre-cleared the license. We're confident we can ship that bundle as a paid host.
139
+ - **Goal-mode** — **you** are directing the install. You named the upstream project, you accepted whatever license terms apply, you decided to run it on infrastructure you're paying for. Same model as deploying it on your own EC2 instance — Zibby is the compute provider, not the redistributor.
140
+
141
+ This is why n8n (Sustainable Use License — forbids paid commercial hosting by a third party) isn't in the catalog but **can** be installed via goal-mode: when you direct the install, you're the operator. The SUL is between you and n8n GmbH, not between Zibby and them.
142
+
143
+ If you're unsure whether your install is fine for goal-mode, read the upstream license. If it requires you-as-the-operator to accept terms before running it, you're the one accepting — make sure that's a thing you're allowed to do for your use case.
144
+
145
+ ## Worked example: n8n
146
+
147
+ ```bash
148
+ zibby app deploy --goal "Install n8n on port 5678 with sqlite persistence" \
149
+ --project <project-id> \
150
+ --name automations \
151
+ --max-turns 40
152
+ ```
153
+
154
+ Streaming output (abbreviated):
155
+
156
+ ```
157
+ ↑ Goal-mode deploy: "Install n8n on port 5678 with sqlite persistence"
158
+ Fargate task: 4 vCPU / 8 GB
159
+ model: claude-sonnet-4-6, max-turns: 40, timeout: 30 min
160
+ phase 1: planning install script…
161
+ plan turn 1/40: reading house rules
162
+ plan turn 2/40: wrote /tmp/install.sh (47 lines)
163
+ phase 2: executing /tmp/install.sh under supervision…
164
+ [30s ] supervisor: continue — apt-get update in progress
165
+ [60s ] supervisor: continue — installing nodejs 20 from nodesource
166
+ [120s] supervisor: continue — npm install -g n8n (compiling sqlite3)
167
+ [240s] supervisor: continue — n8n starting, binding to :5678
168
+ [270s] auto-short-circuit: process exit 0, port 5678 returns 200
169
+ ✔ Deployed (instanceId: f1e2d3c4)
170
+ → Public URL: https://f1e2d3c4.apps.zibby.dev
171
+ ```
172
+
173
+ Total: ~4.5 min, 1 iteration, $0.07 in Claude tokens. Open the URL, set up your n8n admin account, you're done.
174
+
175
+ → Next: [Auth proxy](./auth) (put basic auth in front of the install you just did) or [Agent operator](./agent-ops) (how the supervise loop works in detail)
@@ -5,15 +5,31 @@ title: Apps overview
5
5
 
6
6
  # Managed Apps
7
7
 
8
- One-click hosted instances of open-source tools (n8n, Grafana, Open WebUI, draw.io, Gas Town, …), each private to your project — with an **autonomous agent-ops sidecar** that handles health checks, self-healing, and upgrades on its own.
8
+ Long-lived, per-tenant containers running open-source tools each behind a stable HTTPS URL, on encrypted EFS, with an **autonomous agent-ops sidecar** that handles health checks, self-healing, and upgrades on its own.
9
9
 
10
10
  ```bash
11
11
  zibby app templates # browse the catalog
12
- zibby app deploy n8n # one-click — ECS service + EFS volume + ALB target group
12
+ zibby app deploy grafana # one-click — ECS service + EFS volume + ALB target group
13
13
  zibby app logs <id> -t # tail logs, SSE auto-reconnect
14
14
  zibby app status <id> # uptime, cost, version, agent-ops activity
15
15
  ```
16
16
 
17
+ ## Two paths to a deployment
18
+
19
+ There are two ways to land a container on the apps fleet, and you pick by **whether the thing you want is in our catalog**:
20
+
21
+ | | **Catalog** | **Goal-mode** |
22
+ |---|---|---|
23
+ | Trigger | `zibby app deploy <slug>` | `zibby app deploy --goal "..."` |
24
+ | Source | Curated bundle (image + EFS layout + defaults) | Free-form natural-language install |
25
+ | Time-to-live | ~45-90 s | 2-15 min (Claude writes + runs the install script) |
26
+ | Licensing | Pre-cleared by Zibby | You direct the install; you accept the upstream license |
27
+ | Best for | Anything in the 20-app catalog | n8n, random GitHub project, anything not in the catalog |
28
+
29
+ Both paths land in the same shape — Fargate task, per-instance EFS volume, ALB target group, agent-ops sidecar — and look identical to every downstream `zibby app logs/status/upgrade` command. The only difference is **who wrote the install recipe**.
30
+
31
+ See [Goal-mode deploys](./goal-mode) for the long form.
32
+
17
33
  ## Why apps (not workflows)
18
34
 
19
35
  Both are pillars of Zibby Cloud. Pick by **how long the thing needs to run**:
@@ -24,7 +40,7 @@ Both are pillars of Zibby Cloud. Pick by **how long the thing needs to run**:
24
40
  | Surface | A graph of agent CLI calls | A whole open-source application |
25
41
  | Billing | Per execution | Per minute, while running |
26
42
  | Persistence | Session JSONL + S3 artifacts | Encrypted-at-rest EFS volume |
27
- | Best for | "When ticket lands, classify it" | "Host n8n for the team" |
43
+ | Best for | "When ticket lands, classify it" | "Host Grafana for the team" |
28
44
 
29
45
  If you find yourself wanting to **run an open-source web app behind a stable URL**, that's an App. If you want **agent-driven business logic that fires on events**, that's a Workflow.
30
46
 
@@ -36,22 +52,78 @@ If you find yourself wanting to **run an open-source web app behind a stable URL
36
52
  - **Per-minute Fargate billing** — including the agent-ops sidecar, pause-to-stop billing
37
53
  - **agent-ops sidecar** (see [Agent operator](./agent-ops)) — hourly health checks, self-healing, upgrades
38
54
  - **SSE log streaming** — `zibby app logs -t` tails any container from anywhere
55
+ - **Optional auth proxy** — `--auth-type basic|token` puts a Caddy sidecar in front of the app (see [Auth proxy](./auth))
39
56
  - **Dedicated egress IP addon** — pin outbound HTTPS through one whitelistable IP for self-hosted GitLab / Salesforce / Oracle Cloud
40
57
 
41
58
  ## The catalog
42
59
 
43
- Each marketplace entry is a curated bundle: container image, EFS volume layout, ALB wiring, secrets pattern, resource defaults. Today's catalog:
60
+ Each catalog entry is a curated bundle: container image, EFS volume layout, ALB wiring, secrets pattern, resource defaults. Today's catalog is **20 apps**, grouped by what they're for:
61
+
62
+ ### AI
63
+
64
+ | App | Tier | Rate | What it does |
65
+ |---|---|---|---|
66
+ | **Open WebUI** | Heavy | $0.25/hr | ChatGPT-style UI for Ollama / OpenAI-compatible endpoints |
67
+ | **OpenHands** | Heavy | $0.25/hr | AI software-engineer agent (V1) |
68
+ | **Gas Town** | Light | $0.05/hr | Multi-agent workspace — coordinate Claude, Codex, Cursor, Gemini |
69
+
70
+ ### Data + APIs
71
+
72
+ | App | Tier | Rate | What it does |
73
+ |---|---|---|---|
74
+ | **PostgREST** | Standard | $0.10/hr | Auto-generated REST API on top of any Postgres schema |
75
+ | **Mathesar** | Heavy | $0.25/hr | Spreadsheet-style front-end for Postgres |
76
+ | **PocketBase** | Light | $0.05/hr | Single-file backend (Auth + DB + file storage + realtime) |
77
+
78
+ ### Knowledge + docs
79
+
80
+ | App | Tier | Rate | What it does |
81
+ |---|---|---|---|
82
+ | **Docmost** | Heavy | $0.25/hr | Wiki + collaboration (multi-service: web + Postgres + Redis) |
83
+ | **SiYuan** | Heavy | $0.25/hr | Notion-like knowledge base, local-first |
84
+ | **draw.io** | Light | $0.05/hr | Diagrams + flowcharts (client-side editor) |
85
+
86
+ ### Monitoring + observability
87
+
88
+ | App | Tier | Rate | What it does |
89
+ |---|---|---|---|
90
+ | **Grafana** | Light | $0.05/hr | Dashboards for metrics, logs, traces |
91
+ | **OpenObserve** | Heavy | $0.25/hr | Unified logs + metrics + traces |
92
+ | **Uptime Kuma** | Light | $0.05/hr | Self-hosted Pingdom-alt |
93
+ | **Beszel** | Light | $0.05/hr | Lightweight single-host server monitor |
94
+ | **ChangeDetection.io** | Standard | $0.10/hr | Web-page change watcher |
95
+
96
+ ### Identity
44
97
 
45
- | App | Category | Tier | Rate |
98
+ | App | Tier | Rate | What it does |
46
99
  |---|---|---|---|
47
- | **n8n** | Workflow automation | Light | $0.05/hr |
48
- | **Grafana** | Metrics + dashboards | Light | $0.05/hr |
49
- | **Gas Town** | Multi-agent workspace | Light | $0.05/hr |
50
- | **draw.io** | Diagrams + flowcharts | Light | $0.05/hr |
51
- | **Open WebUI** | ChatGPT-style UI for Ollama | Heavy | $0.25/hr |
100
+ | **Authentik** | Heavy | $0.25/hr | SSO / IdP |
101
+ | **Zitadel** | Heavy | $0.25/hr | SSO / IdP (alt) |
102
+
103
+ ### Productivity
104
+
105
+ | App | Tier | Rate | What it does |
106
+ |---|---|---|---|
107
+ | **Glance** | Light | $0.05/hr | Personal dashboard |
108
+ | **Homepage** | Standard | $0.10/hr | Self-hosted homepage / app launcher |
109
+ | **Gotify** | Light | $0.05/hr | Self-hosted push-notification + webhook server |
52
110
 
53
111
  `zibby app templates` is the canonical, always-up-to-date list — the table above is a snapshot.
54
112
 
113
+ ### Multi-service entries
114
+
115
+ A catalog entry can declare more than one container in the same task — useful for apps that need a DB + cache alongside the web tier. **Docmost** is the live example: web + `postgres:16-alpine` + `redis:7-alpine` sharing localhost and per-volume EFS access points. You don't have to think about it — `zibby app deploy docmost` reads identically — but `zibby app logs --service db` lets you scope log tails to one container.
116
+
117
+ ### Not in the catalog? Use goal-mode
118
+
119
+ The catalog only includes apps whose licenses permit Zibby (a paid host) to ship them as a one-click bundle. Apps under the Sustainable Use License — most famously **n8n** — aren't in the catalog because the SUL forbids paid commercial hosting. They can still be deployed via goal-mode:
120
+
121
+ ```bash
122
+ zibby app deploy --goal "Install n8n on port 5678 with sqlite persistence"
123
+ ```
124
+
125
+ The customer (you) is directing the install — Zibby just provides compute. License terms of whatever you install are between you and the upstream project. See [Goal-mode deploys](./goal-mode).
126
+
55
127
  ## How tiers work
56
128
 
57
129
  The catalog groups apps into three resource tiers:
@@ -59,10 +131,10 @@ The catalog groups apps into three resource tiers:
59
131
  | Tier | CPU | RAM | Rate |
60
132
  |---|---|---|---|
61
133
  | **Light** | 0.5 vCPU | 1 GB | $0.05/hr |
62
- | **Standard** | 1 vCPU | 2 GB | $0.12/hr |
134
+ | **Standard** | 1 vCPU | 2 GB | $0.10/hr |
63
135
  | **Heavy** | 2 vCPU | 4 GB | $0.25/hr |
64
136
 
65
- Per-instance resource overrides are supported when you need to bump CPU / memory for one specific deployment without forking the catalog entry. See [Managing instances → resource overrides](./managing#resource-overrides).
137
+ Per-instance resource overrides are supported when you need to bump CPU / memory for one specific deployment without forking the catalog entry. See [Managing instances → resource overrides](./managing#resource-overrides). Goal-mode deploys default to 4 vCPU / 8 GB to give the install agent enough headroom.
66
138
 
67
139
  ## Pricing model
68
140
 
@@ -16,7 +16,7 @@ zibby app list --project <project-id> # scope to one project
16
16
 
17
17
  ```
18
18
  ID Name App Tier Status Hourly Uptime
19
- a1b2c3d4 automations n8n@1.97.1 Light running $0.05/hr 7d 14h
19
+ a1b2c3d4 wiki docmost Heavy running $0.25/hr 7d 14h
20
20
  a8f7e6d5 metrics grafana Light running $0.05/hr 21d 3h
21
21
  b2c3d4e5 webui open-webui Heavy paused — —
22
22
  ```
@@ -57,7 +57,7 @@ Behind the scenes:
57
57
  3. ALB drains old tasks while new ones come up; the listener serves the new tasks once they pass health checks
58
58
  4. Old tasks shut down
59
59
 
60
- A load-bearing n8n stays serving traffic the whole time. `--yes` skips the confirmation prompt for automation.
60
+ A load-bearing Grafana stays serving traffic the whole time. `--yes` skips the confirmation prompt for automation.
61
61
 
62
62
  ## Restart
63
63
 
@@ -96,7 +96,7 @@ Changes apply on the next task restart. Use `zibby app restart` to roll immediat
96
96
  Default resources come from the catalog entry's tier. To bump CPU / memory for one instance:
97
97
 
98
98
  ```bash
99
- zibby app deploy n8n --project <id> --cpu 1024 --memory 2048 # 1 vCPU / 2 GB
99
+ zibby app deploy grafana --project <id> --cpu 1024 --memory 2048 # 1 vCPU / 2 GB
100
100
  ```
101
101
 
102
102
  Per-instance overrides survive upgrades; the upgrade flow re-registers the task definition with the same override values unless `--reset-resources` is passed.
@@ -267,17 +267,18 @@ Options on `add`:
267
267
 
268
268
  ## App commands {#app-commands}
269
269
 
270
- `zibby app` manages [Managed App instances](./apps/) — hosted open-source tools (n8n, Grafana, ) with an autonomous agent-ops sidecar. Each verb is keyed by **instance ID** (`a1b2c3d4`-style); `zibby app list` shows IDs alongside display names.
270
+ `zibby app` manages [Managed App instances](./apps/) — hosted open-source tools (Grafana, Open WebUI, Docmost, OpenHands, and 16 more in the catalog, plus anything you install via [goal-mode](./apps/goal-mode)) with an autonomous agent-ops sidecar. Each verb is keyed by **instance ID** (`a1b2c3d4`-style); `zibby app list` shows IDs alongside display names.
271
271
 
272
272
  | Command | What it does |
273
273
  |---|---|
274
- | [`zibby app templates`](#app-templates) | Browse the catalog (n8n, grafana, gas-town, drawio, open-webui, …) |
274
+ | [`zibby app templates`](#app-templates) | Browse the catalog (grafana, uptime-kuma, open-webui, openhands, docmost, …) |
275
275
  | [`zibby app list`](#app-list) | List deployed instances under your account |
276
- | [`zibby app deploy <appType>`](#app-deploy) | Deploy an app from the catalog |
276
+ | [`zibby app deploy <appType>`](#app-deploy) | Deploy an app from the catalog, or `--goal "..."` for free-form goal-mode |
277
277
  | [`zibby app status <id>`](#app-status) | One-screen summary: status, resources, URL, last agent-ops run |
278
- | [`zibby app logs <id>`](#app-logs) | Logs from app + agent-ops, with `-t` tail mode |
278
+ | [`zibby app logs <id>`](#app-logs) | Logs from app + agent-ops, with `-t` tail mode; `--service <name>` to scope multi-service |
279
279
  | [`zibby app upgrade <id>`](#app-upgrade) | Zero-downtime roll to the catalog's current image |
280
280
  | [`zibby app restart <id>`](#app-restart) | Force ECS service to roll the running tasks |
281
+ | [`zibby app set-auth <id>`](#app-set-auth) | Add / rotate / remove the optional Caddy auth proxy |
281
282
  | [`zibby app update-credential <id>`](#app-update-credential) | Rotate a BYOK credential and restart |
282
283
  | [`zibby app destroy <id>`](#app-destroy) | Tear down service + volume (data permanently deleted) |
283
284
 
@@ -303,17 +304,41 @@ Options:
303
304
  ### app deploy {#app-deploy}
304
305
 
305
306
  ```bash
306
- zibby app deploy n8n --project <project-id> --name automations
307
+ zibby app deploy grafana --project <project-id> --name metrics
308
+ zibby app deploy --goal "Install n8n on port 5678 with sqlite persistence" --project <id> --name automations
307
309
  ```
308
310
 
311
+ Two modes:
312
+
313
+ - **Catalog**: pass an `appType` (slug from `zibby app templates`).
314
+ - **Goal-mode**: pass `--goal "<install description>"` instead of `appType`. Claude writes the install script and agent-ops runs it under supervision inside the container. See [Goal-mode deploys](./apps/goal-mode).
315
+
309
316
  Options:
317
+
310
318
  - `--project <id>` — interactive picker if omitted
311
319
  - `--name <name>` — display name in the dashboard / `zibby app list` (defaults to `appType`)
320
+ - `--provider <name>` — `claude` (default) or `codex` — picks which BYOK credential to inject
321
+ - `--arch <name>` — `x86_64` or `arm64` (defaults to catalog's first listed arch)
322
+ - `--api-key <key>` — Zibby API key (or `ZIBBY_API_KEY` env)
312
323
  - `--cpu <units>` — Fargate CPU units (e.g. `1024` for 1 vCPU; default from tier)
313
324
  - `--memory <mb>` — Fargate memory in MB (e.g. `2048` for 2 GB; default from tier)
314
- - `--api-key <key>` — API key (or `ZIBBY_API_KEY` env)
315
325
 
316
- Returns an `instanceId` and the public URL.
326
+ Goal-mode + planner options (used by `--goal` deploys and cheatsheet-mode catalog entries):
327
+
328
+ - `--goal "<text>"` — free-form install description. Mutually exclusive with `[appType]`.
329
+ - `--model <name>` — Claude model identifier. E.g. `claude-sonnet-4-6` (default), `claude-opus-4-8`, `claude-haiku-4-5-20251001`. Overrides the agent-ops bootstrap default.
330
+ - `--anthropic-token <token>` — per-deploy Claude credential override. Must start `sk-ant-oat01-` (OAuth) or `sk-ant-api03-` (API key). SENSITIVE. Also accepts `ZIBBY_ANTHROPIC_TOKEN` env. Falls back to workspace credentials if absent.
331
+ - `--max-turns <n>` — Claude subprocess max turns, 1-200 (default 25). Bump for heavy installs.
332
+ - `--timeout-min <n>` — bootstrap wall-clock minutes, 1-120 (default 30).
333
+
334
+ Auth proxy options (opts into a Caddy sidecar on port 8888 — see [Auth proxy](./apps/auth)):
335
+
336
+ - `--auth-type <kind>` — `basic`, `token`, or `none` (default `none`).
337
+ - `--auth-user <name>` — required for `--auth-type basic`. Printable ASCII, no spaces, 1-64 chars.
338
+ - `--auth-password <pass>` — required for `--auth-type basic`. SENSITIVE. 8-256 chars. Also accepts `ZIBBY_APP_AUTH_PASSWORD` env.
339
+ - `--auth-token <token>` — optional for `--auth-type token`. If omitted, backend auto-generates a 32-char URL-safe token and returns it ONCE on deploy. Also accepts `ZIBBY_APP_AUTH_TOKEN` env.
340
+
341
+ Returns an `instanceId` and the public URL. If `--auth-type token` was used without `--auth-token`, the generated token is included in the response and shown ONCE — save it then, you can't retrieve it later.
317
342
 
318
343
  ### app status {#app-status}
319
344
 
@@ -331,9 +356,17 @@ zibby app logs a1b2c3d4 -t # tail mode, polls every 3s, SSE a
331
356
  zibby app logs a1b2c3d4 --lines 1000 # bigger window
332
357
  zibby app logs a1b2c3d4 --json # raw JSON lines
333
358
  zibby app logs a1b2c3d4 --verbose # full line including JSON body
359
+ zibby app logs a1b2c3d4 -t --service db # scope to one container in a multi-service entry
334
360
  ```
335
361
 
336
- Logs cover **both** containers — the app and the agent-ops sidecar — prefixed by source. Default output is the parsed `<time> <msg>` summary.
362
+ Logs cover **all** containers in the task — the app(s), the agent-ops sidecar, and (if enabled) the Caddy auth proxy — prefixed by source. Default output is the parsed `<time> <msg>` summary.
363
+
364
+ Options:
365
+
366
+ - `-t, --follow` — live tail
367
+ - `--lines <n>` — initial window size (default 200)
368
+ - `--json` / `--verbose` — output format toggles
369
+ - `--service <name>` — scope to one container by name (e.g. `db` on docmost). Useful for multi-service catalog entries.
337
370
 
338
371
  ### app upgrade {#app-upgrade}
339
372
 
@@ -353,6 +386,38 @@ zibby app restart a1b2c3d4
353
386
 
354
387
  Forces the ECS service to roll the current tasks without changing the task definition. Useful when the app gets wedged on a stuck connection.
355
388
 
389
+ ### app set-auth {#app-set-auth}
390
+
391
+ Add, rotate, or remove the [Caddy auth proxy](./apps/auth) on an existing instance.
392
+
393
+ ```bash
394
+ # Add basic auth to a previously-unauthenticated instance
395
+ zibby app set-auth a1b2c3d4 --auth-type basic --auth-user admin --auth-password 'S0me-long-passphrase!'
396
+
397
+ # Rotate just the password (basic auth must already be on)
398
+ zibby app set-auth a1b2c3d4 --auth-password 'N3w-passphrase-2026!'
399
+
400
+ # Switch from basic to token auth (caller-supplied)
401
+ zibby app set-auth a1b2c3d4 --auth-type token --auth-token "$(cat ~/.secrets/bearer.txt)"
402
+
403
+ # Switch to token auth with a freshly-generated token (returned ONCE in response)
404
+ zibby app set-auth a1b2c3d4 --auth-type token
405
+
406
+ # Strip auth entirely — Caddy container is removed; ALB routes straight to the app
407
+ zibby app set-auth a1b2c3d4 --off
408
+ ```
409
+
410
+ PATCH semantics: omitted flags preserve current state. Triggers an ECS rolling task replace (~60-90s); the app container keeps its EFS data, only the proxy config / container set changes.
411
+
412
+ Options:
413
+
414
+ - `--auth-type <kind>` — `basic`, `token`, or `none`
415
+ - `--auth-user <name>` — required when setting `--auth-type basic`
416
+ - `--auth-password <pass>` — set / rotate the basic-auth password. Also accepts `ZIBBY_APP_AUTH_PASSWORD` env.
417
+ - `--auth-token <token>` — set / rotate the bearer token. If `--auth-type token` is set without this flag, backend generates a 32-char URL-safe token and returns it once. Also accepts `ZIBBY_APP_AUTH_TOKEN` env.
418
+ - `--off` — remove auth entirely. Equivalent to `--auth-type none`.
419
+ - `--yes` — skip confirmation prompt.
420
+
356
421
  ### app update-credential {#app-update-credential}
357
422
 
358
423
  ```bash
package/docs/intro.md CHANGED
@@ -56,7 +56,7 @@ zibby template add <name> # add a template later (overwrites =
56
56
  - **Run anywhere** — local with hot reload, or cloud with Heroku-style bundles (~3s cold start).
57
57
  - **Session replay** — every run lands as on-disk JSONL + artifacts. Re-run any node via `--session <id> --node <name>`.
58
58
  - **Cloud-native** — SSE log streaming, dedicated egress IPs for firewalled GitLab / GitHub Enterprise / Salesforce.
59
- - **Hosted apps too** — [Managed Apps](./apps/) host open-source tools (n8n, Grafana, Open WebUI, draw.io) with an autonomous agent-ops sidecar that handles health checks, self-healing, and upgrades.
59
+ - **Hosted apps too** — [Managed Apps](./apps/) host open-source tools (Grafana, Open WebUI, Docmost, Uptime Kuma, Authentik, …) from a curated catalog, OR deploy anything else via natural-language [goal-mode](./apps/goal-mode). Every instance ships with an autonomous agent-ops sidecar that handles health checks, self-healing, and upgrades.
60
60
  - **Drive it from your AI agent** — [`@zibby/mcp-cli`](./packages/mcp-cli) exposes deploy / trigger / logs / debug as MCP tools. Add one snippet to Claude Code, Cursor, Codex, or Gemini and they call Zibby directly from chat. See [Use from your AI agent](./get-started/use-from-agents).
61
61
 
62
62
  ## Two product surfaces
@@ -66,7 +66,7 @@ zibby template add <name> # add a template later (overwrites =
66
66
  | Lifetime | Per trigger (seconds-minutes) | Long-lived |
67
67
  | Surface | Graph of agent CLI calls | A whole open-source application |
68
68
  | Billing | Per execution | Per minute, while running |
69
- | Best for | "When ticket lands, classify it" | "Host n8n for the team" |
69
+ | Best for | "When ticket lands, classify it" | "Host Grafana for the team" |
70
70
 
71
71
  Pick by how long the thing needs to run — see [Apps overview](./apps/) for the decision tree.
72
72
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/skills",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "Built-in skill definitions for Zibby test automation framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",