# kosa8 cloud secrets

Keep API keys and tokens that sandboxes use without ever holding them

A secret is kept encrypted by kosa8 Cloud. A sandbox created with it
(kosa8 cloud sandbox create --size 2x4 --secret NAME) holds only a placeholder;
the host adds the real value to its requests to the secret's upstream. Mark it
--pipelines to let kosa8 Pipelines hand it to CI jobs as an environment variable.

The value is read from a hidden prompt, from stdin, or with --from-env from a
variable of this shell: never from the command line, and it is never shown again.

Also known as: `secret`

## Example

```
  kosa8 cloud secrets set openai --upstream https://api.openai.com
  printf %s "$NPM_TOKEN" | kosa8 cloud secrets set npm-token --upstream https://registry.npmjs.org --pipelines
  kosa8 cloud secrets set gh --upstream https://api.github.com --from-env GITHUB_TOKEN
  kosa8 cloud secrets ls
  kosa8 cloud secrets rm openai
```

## Subcommands

- [`kosa8 cloud secrets ls`](https://docs.kosa8.com/reference/cloud-secrets-ls.md): List the organization's secrets (names and where each goes; never a value)
- [`kosa8 cloud secrets rm`](https://docs.kosa8.com/reference/cloud-secrets-rm.md): Delete a secret (sandboxes holding it keep it until they are deleted)
- [`kosa8 cloud secrets set`](https://docs.kosa8.com/reference/cloud-secrets-set.md): Store or replace a secret (the value from a prompt, stdin or --from-env)

---
Source: https://docs.kosa8.com/reference/cloud-secrets/
