# Agentuity CLI Cloud Env Set

> Set an environment variable or secret. Requires authentication. Use for Agentuity cloud platform operations

- Skill: `agentuity-docs/agentuity-cli-cloud-env-set` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentuity-docs/agentuity-cli-cloud-env-set`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentuity-docs/agentuity-cli-cloud-env-set/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: Apache-2.0
- Author: agentuity (https://skillmd.com/u/agentuity-docs)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/agentuity-docs/agentuity-cli-cloud-env-set

---


# Cloud Env Set

Set an environment variable or secret

## Prerequisites

- Authenticated with `agentuity auth login`

## Usage

```bash
agentuity cloud env set <key> <value> [options]
```

## Arguments

| Argument | Type | Required | Description |
|----------|------|----------|-------------|
| `<key>` | string | Yes | - |
| `<value>` | string | Yes | - |

## Options

| Option | Type | Required | Default | Description |
|--------|------|----------|---------|-------------|
| `--secret` | boolean | No | `false` | store as a secret (encrypted and masked in UI) |
| `--org` | optionalString | Yes | - | set at organization level (use --org for default org, or --org <orgId> for specific org) |

## Examples

Set environment variable:

```bash
bunx @agentuity/cli env set NODE_ENV production
```

Set port number:

```bash
bunx @agentuity/cli env set PORT 3000
```

Set a secret value:

```bash
bunx @agentuity/cli env set API_KEY "sk_..." --secret
```

Set an organization-wide secret:

```bash
bunx @agentuity/cli env set OPENAI_API_KEY "sk_..." --secret --org
```

## Output

Returns JSON object:

```json
{
  "success": "boolean",
  "key": "string",
  "path": "string",
  "secret": "boolean",
  "scope": "string"
}
```

| Field | Type | Description |
|-------|------|-------------|
| `success` | boolean | Whether the operation succeeded |
| `key` | string | Environment variable key |
| `path` | string | Local file path where env var was saved (project scope only) |
| `secret` | boolean | Whether the value was stored as a secret |
| `scope` | string | The scope where the variable was set |

