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

# baseten org secret

> Manage secrets

## list

```sh theme={"system"}
baseten org secret list [OPTIONS]
```

List secrets (metadata only; values are never returned).

### Options

{/* Do not hand-edit. Update OVERRIDES / NOTES / HIDDEN_FLAGS in the generator. */}

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--team" type="TEXT">
  Filter to a specific team by name or ID. Defaults to all teams the caller belongs to.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

List secrets across all accessible teams

```sh theme={"system"}
baseten org secret list
```

List secrets in a specific team

```sh theme={"system"}
baseten org secret list --team <team>
```

### Filter output with `--jq`

Print just the secret names

```sh theme={"system"}
baseten org secret list --jq '.secrets[].name'
```

### Output

**Text mode (`--output text`):** Table with columns: NAME, TEAM, CREATED. When no secrets exist, prints "No secrets found." to stderr.

**JSON mode (`--output json`):** payload type `managementapi.Secrets`.

## set

```sh theme={"system"}
baseten org secret set [OPTIONS]
```

Create or update a secret. The value is read from stdin (or prompted interactively on a TTY). `--value` is supported but discouraged: it leaks the secret into shell history and `ps` output. Pass `--team` to target a specific team; without it the organization's default team is used.

### Options

{/* Do not hand-edit. Update OVERRIDES / NOTES / HIDDEN_FLAGS in the generator. */}

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--name" type="TEXT" required>
  Name of the secret.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID the secret belongs to. Defaults to the organization's default team.
</ParamField>

<ParamField body="--value" type="TEXT">
  Secret value. Discouraged: leaks into shell history and process list. Prefer stdin or prompt.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Set a secret by piping its value through stdin

```sh theme={"system"}
echo $TOKEN | baseten org secret set --name <name>
```

Set a secret scoped to a specific team

```sh theme={"system"}
echo $TOKEN | baseten org secret set --name <name> --team <team>
```

### Filter output with `--jq`

Print the secret's team

```sh theme={"system"}
echo $TOKEN | baseten org secret set --name <name> --jq '.team_name'
```

### Output

**Text mode (`--output text`):** Prints "Set secret `name`" to stderr on success; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.Secret`.

## delete

```sh theme={"system"}
baseten org secret delete [OPTIONS]
```

Delete a secret by name.

### Options

{/* Do not hand-edit. Update OVERRIDES / NOTES / HIDDEN_FLAGS in the generator. */}

<ParamField body="-q, --jq" type="TEXT">
  Filter JSON output with a jq expression; implies --output json (or jsonl for streamed commands)
</ParamField>

<ParamField body="--name" type="TEXT" required>
  Name of the secret to delete.
</ParamField>

<ParamField body="-o, --output" type="TEXT" default="text">
  Output format

  One of: `text`, `json`, `jsonl`, `none`
</ParamField>

<ParamField body="--profile" type="TEXT">
  Use a specific stored profile for this command, overriding BASETEN\_PROFILE and the current profile
</ParamField>

<ParamField body="--team" type="TEXT">
  Team name or ID the secret belongs to. Defaults to the organization's default team.
</ParamField>

<ParamField body="-v, --verbose" type="BOOL">
  Enable verbose logging
</ParamField>

### Examples

Delete a secret by name

```sh theme={"system"}
baseten org secret delete --name <name>
```

### Filter output with `--jq`

Print just the deleted secret name

```sh theme={"system"}
baseten org secret delete --name <name> --jq '.name'
```

### Output

**Text mode (`--output text`):** Prints "Deleted secret `name`" to stderr on success; no stdout output.

**JSON mode (`--output json`):** payload type `managementapi.SecretTombstone`.
