> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# jaccard env

> Add, list, remove and pull an agent's environment variables and secrets with jaccard env. Secret values show as Hidden in env ls; only env pull writes them out.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard env add OPENAI_API_KEY               # value from stdin, or a hidden prompt
jaccard env add NODE_ENV --value production --config
jaccard env ls                               # secrets print "Hidden"
jaccard env rm NODE_ENV
jaccard env pull                             # writes .env.local and gitignores .env*
```

> [!WARNING]
>
> Adding or removing a variable restarts the agent. An agent first deployed without any variables picks them up on its next deploy instead.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard env [OPTIONS] <COMMAND>
```

| Option | What it does |
| - | - |
| `--agent <AGENT>` | Agent to act on. Defaults to the current directory's name. |

| Command | What it does |
| - | - |
| `env add <NAME>` | Set a variable. Reads the value from `--value`, else stdin, else a hidden prompt. `--value <VALUE>`: Set the value without a prompt. It lands in your shell history and in `ps`, so prefer stdin. `--config`: Store it as readable configuration rather than a secret. `-f`, `--force`: Replace an existing variable. |
| `env ls` | List variables. Secret values show as `Hidden`. |
| `env rm <NAME>` | Remove a variable. |
| `env pull [FILE]` | Write the environment to a file, secrets included. `[FILE]`: Default `.env.local`. `-y`, `--yes`: Overwrite a file this command did not write. |

`ANTHROPIC_API_KEY`, `OPENAI_API_KEY` and `OPENROUTER_API_KEY` are always stored as secrets, even with `--config`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.