Clone an existing cluster environment into a new one.
Copies the source environment's overlay (<sourceDirectory>/clusters/<from>/) and
its root config (ksail.<from>.yaml) into a new environment <name>, repointing the
structured identity along the way: the cluster-meta cluster_name, the
clusters/<env> path segment and content references, the root config's metadata
name, the connection context (distribution-aware), and — when --provider is given
— the provider. Every other byte is preserved, so the kustomize replacements block,
base wiring, version pins and comments survive intact.
SOPS-encrypted files (*.enc.yaml) are copied verbatim with only their path
repointed; re-encrypt them to the new environment's recipients afterwards with
`ksail cipher` if the environments use different keys.
# Clone the "prod" environment into a new "staging" environment
ksail project add-environment staging --from prod
# Clone "prod" into "dev" on a different provider, overwriting any existing files
ksail project add-environment dev --from prod --provider Docker --force
ksail project add-environment <name> [flags]
--force Overwrite existing destination files
-f, --from string Source environment to clone from (required)
-p, --provider string Provider for the new environment (defaults to the source provider)
--benchmark Show per-activity benchmark output
--config string Path to config file (default: ksail.yaml found via directory traversal)
--experimental Enable experimental (unstable) commands and features