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

# App Lifecycle

> Inspect, pause, resume, delete, and tail logs from a deployed Compose app using the Goldsky CLI.

Once your Compose app is deployed, a set of CLI commands let you inspect, pause, resume, delete, tail logs, and review its deploy history, task runs, collections, and deployed source. The per-app commands (`status`, `pause`, `resume`, `logs`, `delete`, `history`, `runs`, `collections`, `source`, `download`) accept either `-n, --name <app>` to target by name, or `-m, --manifest <path>` (default `compose.yaml`) to read the name from your manifest. `list` is project-wide and accepts neither.

Every command also accepts `--json` so you can pipe output into scripts or agents.

## Check status

```bash theme={null}
goldsky compose status
```

Shows the app's name, current runtime status (e.g. `RUNNING`, `PAUSED`, `STARTING`, `ERROR`), and timestamps for when it was created and last updated.

```bash theme={null}
# status for a specific app, as JSON
goldsky compose status -n my-app --json
```

## List apps

```bash theme={null}
goldsky compose list
```

Prints a table of every Compose app in your project.

```bash theme={null}
# list as JSON for scripting
goldsky compose list --json
```

## Pause and resume

```bash theme={null}
goldsky compose pause
goldsky compose resume
```

While paused, cron triggers stop firing and HTTP triggers return an error. State is preserved — `resume` picks up where the app left off. This is useful for:

* Triaging a misbehaving app without deleting it
* Holding execution while you roll out a dependency change
* Temporarily stopping a cron while you investigate its effects

## View logs

```bash theme={null}
goldsky compose logs
```

By default `logs` prints the most recent 100 lines. You can tail live, filter by level or text, and bound the output by time or line count.

```bash theme={null}
# tail live
goldsky compose logs -f

# live, errors and warnings only
goldsky compose logs -f --level error,warn

# last hour
goldsky compose logs --since 1h

# search for a substring across the last 500 lines
goldsky compose logs --tail 500 --search "timeout"

# tail live for 5 minutes, then exit
goldsky compose logs -f --timeout 5m
```

Options cheat-sheet:

| Flag                   | Description                                         |
| ---------------------- | --------------------------------------------------- |
| `-f, --follow`         | Stream logs live                                    |
| `--tail <n>`           | Number of lines to fetch (default: `100`)           |
| `--level <levels>`     | Comma-separated levels (e.g. `error,warn`)          |
| `--search <text>`      | Filter lines by text                                |
| `--since <duration>`   | Logs since a relative time (e.g. `1h`, `30m`, `7d`) |
| `--max-lines <n>`      | Exit after N lines                                  |
| `--timeout <duration>` | Exit after a duration (e.g. `5m`)                   |
| `--json`               | Emit newline-delimited JSON                         |

## Inspect deploy history and task runs

Use `goldsky compose history` to see what was deployed and when:

```bash theme={null}
goldsky compose history -n my-app

# include failed deploys in the list
goldsky compose history -n my-app --include-failures
```

When a task run fails, narrow the `runs` list with `--task`, `--status`, or `--since` to find it, then fetch the full run detail by id:

```bash theme={null}
# recent runs of a specific task
goldsky compose runs -n my-app --task price_fetcher --limit 10

# failing runs in the last hour
goldsky compose runs -n my-app --status error --since 1h

# full detail for one run
goldsky compose runs -n my-app <runId>
```

Pipe `--json` output into `jq` to drive scripts or alerts:

```bash theme={null}
goldsky compose runs -n my-app --status error --json | jq '.runs[].runId'
```

For all flags, see the [CLI reference](./cli-reference#inspecting-a-deployed-app).

## Query collections

List every collection in your app's hosted database, then query one with a JSON filter:

```bash theme={null}
goldsky compose collections list -n my-app

goldsky compose collections query prices -n my-app --filter '{"symbol": "BTC"}' --limit 10
```

For all flags, see the [CLI reference](./cli-reference#inspecting-a-deployed-app).

## View and download deployed source

Print the deployed source for your app, or for a single task:

```bash theme={null}
# list the deployed files
goldsky compose source -n my-app

# print one task's source
goldsky compose source -n my-app bitcoin_oracle
```

Download a runnable copy of the whole app as a zip:

```bash theme={null}
goldsky compose download -n my-app
```

The same source is available in the dashboard's Code tab, with a Download app button that produces the same archive. See [Deploying and monitoring](./deploy-monitor#viewing-and-downloading-deployed-source) for details.

For all flags, see the [CLI reference](./cli-reference#inspecting-a-deployed-app).

## Delete an app

```bash theme={null}
goldsky compose delete
```

By default `delete` is interactive: it asks you to type the app name to confirm, and separately asks whether you also want to delete the app's hosted Postgres database.

```bash theme={null}
# non-interactive (CI-safe) — skip all prompts
goldsky compose delete -f

# non-interactive, also drop the Postgres database
goldsky compose delete -f --delete-database
```

See [Deploying and monitoring](./deploy-monitor#deleting-a-compose-app) for how database deletion interacts with active pipelines.

<Warning>
  Deleting an app is permanent. Deleting its database is permanent too, and cannot be undone. Back up anything you care about first.
</Warning>

## Next Steps

<CardGroup cols={2}>
  <Card title="Deploying your App" icon="file-code" href="./deploy-monitor">
    Learn about deploying your app to the cloud.
  </Card>

  <Card title="Full CLI Reference" icon="parentheses" href="./cli-reference">
    View the full CLI command reference.
  </Card>
</CardGroup>


## Related topics

- [Compose CLI Reference](/compose/cli-reference.md)
- [Deploying and Monitoring](/compose/deploy-monitor.md)
- [Environments and RPCs](/compose/environments.md)
- [Deploy a Compose App](/compose/quick-start.md)
- [How Mirror pipelines work: sources, transforms, sinks](/mirror/about-pipeline.md)
