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

# Project file

> Fields in .gateways.yaml for project, environment, uploads, and deploy commands.

The CLI reads **`./.gateways.yaml`** in your working directory. Create or update it with `gateways init`.

## Sample `.gateways.yaml`

This example is for an upload-type application whose build output is uploaded from `dist/`, then installed and started on the server after deploy.

```yaml theme={null}
project: my-app
environment: production
email: you@company.com
path: dist
push_resource: resource-1wbmwnxvok

start_commands:
  - npm ci
  - npm run build
  - npm start

ignore:
  - node_modules
  - ".env"
  - "*.map"
  - "**/*.log"
  - "**/coverage"
```

For a static website, the target may be saved as `bucket_explorer_id`, `static_website_id`, or `push_resource` depending on the command flow you use. You can also omit target fields and let `gateways push` open the picker the first time.

## Common fields

| Field                                      | Purpose                                                                                                        |
| ------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| `project` / `environment`                  | Slugs for the Gateways project and environment.                                                                |
| `email`                                    | Optional: pin this folder to a Gateways user; tokens are stored per email in `~/.config/gateways/config.json`. |
| `path`                                     | Default directory for uploads (override with `gateways push --path`).                                          |
| `push_resource`                            | Last-used push target (`resource-…` or id); set by `gateways push` or `gateways resource`.                     |
| `start_commands`                           | Lines run on the server after an upload deploy (e.g. `npm ci`, `npm start`).                                   |
| `ignore`                                   | Glob patterns excluded from zips and static uploads (see **`cli/README.md`** in the repo for pattern rules).   |
| `bucket_explorer_id` / `static_website_id` | Used for static deploy and CDN sync flows.                                                                     |

## Related

* **[Commands](/gateways/cli/commands)** — `init`, `reset`, `push`, `resource`, and flags.
* **[Introduction](/gateways/cli)** — Quick start with `gateways init` and `gateways login`.
