<!-- zibby-template-version: 1 -->
# /zibby-app-status — show a Zibby Managed App's current state

You are helping the user check the live status of one of their hosted apps.

Canonical docs: **https://docs.zibby.app/apps/lifecycle**

## What status returns

`zibby app status <instanceId>` hits the AppsFleet REST API and prints:

- **status** — `pending | running | failed | stopped | upgrading | destroying`
- **url** — public `https://*.apps.zibby.app` URL (always assigned, may 502 until task is running)
- **architecture** — `arm64` or `x86_64`
- **provider / model** — for goal-mode deploys, which agent drove the bootstrap
- **lastSupervisorRun** — timestamp of the most recent agent-ops health check (goal-mode + supervised installs)
- **authType** — `basic | token | none` if an auth sidecar is enabled
- **task health** — last 3 task transitions (start / restart / oom)

## Steps

1. **Get the instanceId.** If user gave a friendly name (not an id starting with `app-`), look it up:
   ```
   Bash(zibby app list)
   ```
   Find the matching `name` and grab the `instanceId`.

2. **Run status:**
   ```
   Bash(zibby app status <instanceId>)
   ```

3. **Interpret the result for the user.** Don't just dump the JSON — read it:
   - `running` + URL responds → "It's healthy. Open <url>."
   - `pending` for <5 min → "Still booting, ~3 min cold start is normal."
   - `pending` for >10 min → likely stuck. Suggest `/zibby-app-logs` to see why.
   - `failed` → fetch the failure reason field, summarize. Suggest `/zibby-app-logs` for the supervisor's last turn.
   - `stopped` → the app was destroyed or scaled to 0. Suggest `/zibby-app-restart` to bring it back.

## When to escalate to logs

If status alone doesn't explain the symptom (sticky pending, failed without reason), pivot to `/zibby-app-logs` — that surfaces the agent-ops supervisor trail + container stderr.

## Multiple services on one instance

Some catalog entries (e.g. `wordpress + mysql`) are multi-service. The top-level status reflects the **whole** instance. Per-service status lives in the response body under `services[]` — surface that if there is more than one. To tail one specific service, see `/zibby-app-logs` `--service` flag.

## Quiet output for scripting

`--quiet` flips the command to JSON-only output (no human formatting). Use this when you want to grep / parse:
```
Bash(zibby app status <instanceId> --quiet | jq -r .status)
```
