kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

CLI / cloud / secrets / set

kosa8 cloud secrets set

Store or replace a secret (the value from a prompt, stdin or --from-env)

Usage#

kosa8 cloud secrets set NAME

NAME is 1-32 of a-z, 0-9 and -. --upstream is the only place the value is ever sent (https://host, no path). It goes in the Authorization header as "Bearer …" unless --header and --scheme say otherwise. A sandbox gets NAME_API_KEY (the placeholder) and NAME_BASE_URL (the broker's address) unless --env maps others, e.g. --env OPENAI_API_KEY={{placeholder}} --env OPENAI_BASE_URL={{url}}/v1.

Also known as: put, add

Options#

FlagTypeWhat it doesDefault
--envstringArraya variable the sandbox gets, NAME={{placeholder}} or NAME={{url}}… (repeatable)[]
--from-envstringread the value from this variable of the shell—
--headerstringthe header that carries it (default Authorization)—
--methodstringArrayonly these HTTP methods (repeatable)[]
--pathstringArrayonly these upstream path prefixes, e.g. /v1/ (repeatable)[]
--pipelinesboollet kosa8 Pipelines hand the value to CI jobs—
--schemestringwhat goes before the value (default "Bearer " for Authorization)—
--upstreamstringhttps://host the value is sent to (required)—

Example#

  kosa8 cloud secrets set openai --upstream https://api.openai.com --from-env OPENAI_API_KEY
  printf %s "$NPM_TOKEN" | kosa8 cloud secrets set npm-token --upstream https://registry.npmjs.org --pipelines
  kosa8 cloud secrets set db-url --env DATABASE_URL

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA