Skip to main content
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.
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

FieldPurpose
project / environmentSlugs for the Gateways project and environment.
emailOptional: pin this folder to a Gateways user; tokens are stored per email in ~/.config/gateways/config.json.
pathDefault directory for uploads (override with gateways push --path).
push_resourceLast-used push target (resource-… or id); set by gateways push or gateways resource.
start_commandsLines run on the server after an upload deploy (e.g. npm ci, npm start).
ignoreGlob patterns excluded from zips and static uploads (see cli/README.md in the repo for pattern rules).
bucket_explorer_id / static_website_idUsed for static deploy and CDN sync flows.
  • Commandsinit, reset, push, resource, and flags.
  • Introduction — Quick start with gateways init and gateways login.