ktm variables create

Create a variable (single | secret | choice)

Create a variable (single | secret | choice)

Usage

ktm variables create [flags]

Examples

ktm variables create --product acme~web --name DB_HOST --type single --default-value localhost
ktm variables create --product acme~web --name ENV --type choice --default-value "dev,staging,prod"
ktm variables create --product acme~web --name DB_HOST --type single --default-value localhost --group 42

Flags

FlagTypeDefaultDescription
--default-valuestringDefault value (for choice: comma-separated)
--descriptionstringDescription (optional, recommended) — explains the variable's purpose; agents and humans use it to disambiguate semantically
--groupintOptional variable group id
--namestringVariable name (required)
--productstringProduct slug (required)
--typestringsingle | secret | choice (required)

Details

Types: single scalar string value in --default-value secret scalar string; platform masks on read choice --default-value is a comma-separated list of allowed values

For group-scoped vars supply --group <id>; omit for a global variable. When --group is set the tool auto-fans variable_values to one entry per variant of that group, all initialised to --default-value. Tune individual variants afterwards with 'ktm variables set-value'.

Secrets: never embed a real secret into shell history. Create via the web UI or feed the value through an env-var ($MY_SECRET) on ephemeral shells.

Global flags (--output, --debug, --host, …) apply to every command. See the command reference overview.

What's next?

All commands

Browse the full CLI reference.

Get started

Install the CLI and authenticate.

Last updated on