envshed rename-env
Rename an environment, changing its display name and/or slug (key).
Usage
envshed rename-env <slug> [options]
Arguments
| Argument | Description |
|---|---|
slug | Current environment slug |
Options
| Flag | Description | Default |
|---|---|---|
-n, --name <name> | New display name | Unchanged |
-s, --slug <slug> | New slug (key) | Auto-generated from name |
-o, --org <slug> | Organization slug | From config |
-p, --project <slug> | Project slug | From config |
At least one of --name or --slug must be provided.
Examples
# Rename display name (slug auto-updates)
$ envshed rename-env staging --name "Staging v2"
Renamed environment: staging → staging-v2 (Staging v2)
# Change only the slug
$ envshed rename-env staging --slug pre-prod
Renamed environment: staging → pre-prod (Staging)
# Change both name and slug
$ envshed rename-env dev --name "Development" --slug development
Renamed environment: dev → development (Development)
Notes
- If only
--nameis provided, the slug is automatically generated from the new name. - If
--slugis provided, that exact slug is used regardless of the name. - The new slug must be unique within the project.
- Existing secrets, service tokens, and access rules are preserved (they reference the environment by ID, not slug).
- After renaming, update any
.envshed.jsonfiles that reference the old slug indefaultEnv.