# 5050 environment

> Switch, create, sync and inspect environments.

Switch, create, sync and inspect environments.

## Usage

```sh
5050 environment [NAME]
5050 environment new NAME [--duplicate ENV]
5050 environment delete NAME
5050 environment rename NAME
5050 environment sync --from ENV
5050 environment config
5050 environment edit --service-config SVC DOT.PATH VALUE [--stage]
```

## Flags

| Flag | Meaning |
|---|---|
| `--duplicate ENV` | Copy services, settings and non-sealed variables from ENV (staged) |
| `--from ENV` | Source environment for sync |
| `--stage` | Stage the edit instead of committing it |

## Details

- `config` prints the environment's effective configuration as JSON.
- `edit` changes one setting, for example `deploy.replicas`, using the names in [Service settings](https://5050cloud.com/docs/reference/service-settings).

## Examples

```sh
5050 environment new staging --duplicate production
5050 environment edit --service-config api deploy.replicas 2
```

## Railway equivalent

`railway environment` works the same way through the [railway alias](https://5050cloud.com/docs/cli/railway-alias).

Every command also accepts the [global options](https://5050cloud.com/docs/cli/global-options).
