---
title: esc env set | CLI commands
url: /docs/esc/cli/commands/esc_env_set/
---

Set a value within an environment.

## Synopsis

Set a value within an environment

This command fetches the current definition for the named environment and modifies a
value within it. The path to the value to set is a Pulumi property path. The value
is interpreted as YAML.

```
esc env set [<org-name>/][/]<environment-name>  <value> [flags]
```

## Options

```
      --draft string[="new"]   set flag without a value (--draft) to create a draft rather than saving changes directly. --draft=<change-request-id> to update an existing change request.
  -f, --file -                 If set, the value is read from the specified file. Pass - to read from standard input.
  -h, --help                   help for set
      --plaintext              true to leave the value in plaintext
      --secret                 true to mark the value as secret
      --string                 true to treat the value as a string rather than attempting to parse it as YAML
```

## Options inherited from parent commands

```
      --env string   The name of the environment to operate on.
```

## SEE ALSO

* [esc env](/docs/esc/cli/commands/esc_env/)	 - Manage environments


