Reference

apex secret

Secrets: set a repository's secrets from the terminal, values write-only

apex secret [command]

Examples

Set a secret from a pipe; a value never goes on the command line.

printf %s "$NPM_TOKEN" | apex secret set NPM_TOKEN --repo acme/web

Set one value on two repositories, from a file.

apex secret set DEPLOY_KEY --repo acme/web --repo acme/api --from-file key.pem

A repository's secret names — never values.

apex secret list --repo acme/web

Subcommands

apex secret set

Set a secret on one or more repositories; the value is read from stdin, a file or a no-echo prompt

apex secret set [options] <name>
Arguments
ArgumentDescription
<name>secret name, as a workflow reads it: secrets.NAME
Options
OptionDescription
--repo <owner/repo>repository to set it on (repeatable: one value, many repositories)
--from-file <path>read the value from this file (one trailing newline is dropped)

apex secret list

A repository's secret names — never values: the API has none to give

apex secret list [options]
Options
OptionDescription
--repo <owner/repo>repository
--jsonmachine-readable output

apex secret delete

Delete a secret from one or more repositories

apex secret delete [options] <name>
Arguments
ArgumentDescription
<name>secret name
Options
OptionDescription
--repo <owner/repo>repository (repeatable)
-y, --yesdo not ask; required when not on a terminal