# pier set

> Change a resource's config

URL: https://pier.run/docs/cli/reference/set

```bash
pier set <command>
```

Change a resource's config.

## Subcommands

### pier set app

```bash
pier set app [<app>] [flags]
```

Change an app's config.

| Argument | Required | Description                   |
| -------- | -------- | ----------------------------- |
| `<app>`  | no       | App ref (slug or slug/target) |

| Flag              | Value         | Default | Description                                                                         |
| ----------------- | ------------- | ------- | ----------------------------------------------------------------------------------- |
| `--plan`          | `STRING`      |         | New plan                                                                            |
| `--replicas`      | `INT`         |         | New replica count (fixed scaling; XOR with --autoscale)                             |
| `--autoscale`     | `STRING`      |         | Autoscale range min-max (e.g. 1-4), or 'off' to return to fixed                     |
| `--trigger`       | `TRIGGER,...` |         | Autoscale trigger type:value (cpu:70, memory:80, rps:50, latency:250ms); repeatable |
| `--idle-after`    | `STRING`      |         | Zero-traffic window before scale-to-zero (with --autoscale 0-N)                     |
| `--image`         | `STRING`      |         | Deploy from a static image (switches off build\_context)                            |
| `--port`          | `INT`         |         | Container port (image-sourced apps only)                                            |
| `--build-context` | `STRING`      |         | Deploy by building a code path, relative to pier.yaml (switches off image)          |
| `-y`, `--yes`     |               |         | Skip confirmation prompt                                                            |
| `--stage`         |               |         | Write the change to pier.yaml only — apply later with 'pier deploy'                 |

### pier set site

```bash
pier set site [<site>] [flags]
```

Change a site's config.

| Argument | Required | Description                    |
| -------- | -------- | ------------------------------ |
| `<site>` | no       | Site ref (slug or slug/target) |

| Flag              | Value    | Default | Description                                                         |
| ----------------- | -------- | ------- | ------------------------------------------------------------------- |
| `--framework`     | `STRING` |         | New framework (e.g. static, nextjs-static, astro, vite, hugo)       |
| `--build-command` | `STRING` |         | New build command                                                   |
| `--output-dir`    | `STRING` |         | New output directory                                                |
| `-y`, `--yes`     |          |         | Skip confirmation prompt                                            |
| `--stage`         |          |         | Write the change to pier.yaml only — apply later with 'pier deploy' |

### pier set pg

```bash
pier set pg [<postgres>] [flags]
```

Change a Postgres instance's config.

| Argument     | Required | Description           |
| ------------ | -------- | --------------------- |
| `<postgres>` | no       | Postgres name or slug |

| Flag           | Value    | Default | Description                                                         |
| -------------- | -------- | ------- | ------------------------------------------------------------------- |
| `--plan`       | `STRING` |         | New plan                                                            |
| `--replicas`   | `INT`    |         | New replica count                                                   |
| `--pg-version` | `STRING` |         | New Postgres major version (e.g. 17)                                |
| `-y`, `--yes`  |          |         | Skip confirmation prompt                                            |
| `--stage`      |          |         | Write the change to pier.yaml only — apply later with 'pier deploy' |

### pier set bucket

```bash
pier set bucket [<bucket>] [flags]
```

Change a bucket's config.

| Argument   | Required | Description         |
| ---------- | -------- | ------------------- |
| `<bucket>` | no       | Bucket name or slug |

| Flag          | Value | Default | Description                                                         |
| ------------- | ----- | ------- | ------------------------------------------------------------------- |
| `--access`    | `""`  |         | Access level: public or private                                     |
| `-y`, `--yes` |       |         | Skip confirmation prompt                                            |
| `--stage`     |       |         | Write the change to pier.yaml only — apply later with 'pier deploy' |

### pier set volume

```bash
pier set volume [<volume>] [flags]
```

Change a volume's config.

| Argument   | Required | Description              |
| ---------- | -------- | ------------------------ |
| `<volume>` | no       | Volume name, slug, or ID |

| Flag          | Value    | Default | Description                                                         |
| ------------- | -------- | ------- | ------------------------------------------------------------------- |
| `--size`      | `""`     |         | New size (e.g. 5GB, 10GB)                                           |
| `-a`, `--app` | `STRING` |         | Bind to an app (slug or slug/target), moving any existing binding   |
| `--mount`     | `STRING` |         | Mount path inside the app (required with --app non-interactively)   |
| `--detach`    |          |         | Remove the volume's app binding                                     |
| `-y`, `--yes` |          |         | Skip confirmation                                                   |
| `--stage`     |          |         | Write the change to pier.yaml only — apply later with 'pier deploy' |

[Global flags](/docs/cli/reference#global-flags) apply to every command.
