Skip to content
NewiPhone Duo, live in your browser. Try it →

Cloud builds Build variables and secrets

Build Variables & Secrets

Store credentials, tokens, and files your cloud build needs — visibility levels, org and app scopes, file variables, limits, and log masking.

Store credentials, tokens, and other values your cloud build needs, without putting them in vibeview.json or your app’s source. Set them once from the CLI and every matching cloud build picks them up automatically.

This is the recommended way to give a cloud build an API key, a signing credential, or any other sensitive value. For non-secret configuration (a build flavor, a feature flag), the plain build.env map in vibeview.json still works — see Cloud Builds.

Visibility levels

Every variable has one of three visibility levels, set when you create it:

VisibilityReadable back laterMasked in build logs
plainYesNo
sensitiveYesYes
secretNo — not even by youYes

Masking applies to text values only: a file’s content is never masked in build logs (see File variables).

secret is the strictest level, and it’s the default wherever you create a variable without choosing one: vibeview env set stores secret unless you pass --plain or --sensitive, and the dashboard’s add-variable dialog preselects it. Once set, a secret value cannot be retrieved again by anyone, through the CLI, the API, or the dashboard. If you forget a secret’s value, there’s nothing to recover — set it again with a new value.

plain and sensitive values can both be read back later (for example with env pull, below). The difference is only what happens in build logs: sensitive values are masked wherever they appear in output, plain values are not. Use plain only for values you’re comfortable seeing appear in a build log verbatim.

Scopes

A variable is either organization-wide or tied to a specific app. Organization-wide variables apply to every app’s builds; an app-scoped variable applies only to that app. When an organization-wide variable and an app-scoped variable share the same name, the app-scoped one wins for that app’s builds.

Limiting a variable to one build profile

Build profiles and build variables are two different things; see Profiles and build variables if they’re easy to mix up.

A variable can also be limited to one build profile from your vibeview.json: development, preview, production, or a profile of your own. By default a variable applies to All profiles, and every variable created before this option existed does too. Limit one to a profile when the same name needs a different value per build, such as an API_URL that points preview builds at a staging server and production builds at your live one.

The same name can be stored once for All profiles and once per profile, in each scope. When a build runs, each name gets one value:

  1. An app-scoped variable wins over an organization-wide one.
  2. Within each scope, a variable limited to the build’s profile wins over the All-profiles one.
  3. A variable limited to a different profile never applies to the build.

A build from a CLI older than 0.51.0, which doesn’t send a profile, gets the All-profiles values only. Builds started by the GitHub App follow the same rules, using the profile the push, pull request or tag builds.

A profile decides which builds get a value; it doesn’t decide who can get it. Anyone who can start a build can build any profile, so a value limited to production is protected the same way as any other variable: by its visibility and by who can start builds.

For example, with these variables stored for one app:

NameScopeProfileValue
API_URLOrganization-wideAll profileshttps://api.example.com
API_URLThis apppreviewhttps://staging.example.com
SENTRY_DSNThis appproduction(secret)

A preview build of the app gets the staging API_URL and no SENTRY_DSN; a production build gets https://api.example.com and the SENTRY_DSN; a development build gets https://api.example.com only.

A variable’s profile is set when you create it and can’t be changed afterwards: to move a value to another profile, remove it and add it again.

File variables

Some credentials are files rather than short strings — a service-account JSON key, an Android keystore, a signing certificate. Upload one with env set --file, and it’s made available to your build the same way any other variable is: as an environment variable. The variable’s value is the path to the file inside the build environment, not the file’s contents. Reference it in your build command or scripts the same way you’d reference any file path passed in via the environment.

The file itself is kept outside your project’s source tree, so a normal build cannot accidentally pick it up and bundle it into your app’s artifact.

A file can never be read back after saving, whatever its visibility, and its content is never masked in build logs. Don’t print a file in your build command.

File sizes

An organization-wide file can be up to 64 KB, which fits keystores, keys and small config files. A file set on an app can be up to 5 MB, for larger assets such as a bundled font or a configuration archive. To store a file over 64 KB, set it on the app that needs it (--app <id>).

Files over 64 KB have a few extra rules:

  • An app can hold at most 10 of them (counted across its build profiles). Replacing one with a new version doesn’t count twice.
  • They count toward your organization’s storage. If storing one would take you past your plan’s storage, it’s refused and nothing is removed: delete old builds or other large files, or upgrade, then try again. Files of 64 KB or less don’t count toward storage.
  • All the files one build gets, together, can be at most 25 MB. A build over that is refused when you start it. If its files grow past 25 MB while it waits in the queue, it fails before it starts and nothing is charged.

Managing variables from the CLI

vibeview env list [--app <id>] [--profile <name>] [--json]
vibeview env set NAME [VALUE] [--secret|--sensitive|--plain] [--file <path>] [--app <id>] [--profile <name>]
vibeview env rm NAME [--app <id>] [--profile <name>]
vibeview env pull [--app <id>] [--profile <name>] [--out .env]

By default env set stores the value as secret — the safest option. Pass --plain or --sensitive explicitly to choose a different visibility. Add --app <id> to scope a command to one app; omit it for the organization-wide scope. Add --profile <name> to work with the variable limited to that build profile; without it, a command works with the All-profiles one. The --profile options need CLI 0.53.0 or later.

Setting a variable

vibeview env set STRIPE_WEBHOOK_SECRET
# Value for STRIPE_WEBHOOK_SECRET: (hidden input)

Omitting VALUE prompts for it with hidden input when you’re running the command interactively. You can also pass the value directly, which is useful in scripts:

vibeview env set API_BASE_URL "https://api.example.com" --plain
vibeview env set ANDROID_KEYSTORE --file ./release.keystore --app app_abc123
vibeview env set API_URL "https://staging.example.com" --plain --profile preview

Setting a name that already exists in the same scope and profile replaces its value.

Listing variables

vibeview env list --app app_abc123

env list never prints a value, at any visibility — it shows each variable’s name, visibility, scope, profile, and (for plain/sensitive string values) a short hint. secret values and file variables show no hint. Add --profile <name> to list only the variables that can apply to a build of that profile: the ones limited to it and the All-profiles ones.

Removing a variable

vibeview env rm STRIPE_WEBHOOK_SECRET
vibeview env rm API_URL --profile preview

Without --profile, env rm removes the All-profiles variable of that name and leaves any profile-limited ones in place.

Pulling values for local development

vibeview env pull --out .env

env pull writes plain and sensitive values to a local file so you can mirror your cloud build’s configuration during local development. secret values and file variables are never included — pulling them isn’t possible by design. VibeView warns if the target file isn’t covered by your project’s .gitignore, and writes the file so only you can read it.

With --profile <name>, env pull writes the values a build of that profile would get, following the rules in Limiting a variable to one build profile. Without it, it writes the All-profiles values.

Limits

LimitValue
String value size10 KB
File value size, organization-wide64 KB
File value size, on an app5 MB
Files over 64 KB per app10
All file values of one build, together25 MB
Variables per scope and profile (org-wide or per app; All profiles and each profile counted separately)100
Name length256 characters

Names must be valid environment variable names: letters, digits, and underscores, and they can’t start with a digit. A name is unique within its scope and profile.

Who can do what

Setting or removing a variable requires the Admin role in your organization. Listing variables requires any member role. Pulling values with env pull requires the Developer role or above.

Masking in build logs

sensitive and secret values are masked wherever they appear in your build’s log output. Masking has real limits, the same ones any build system with this feature has:

  • Only single-line values are masked. A value that spans multiple lines isn’t matched.
  • Values shorter than 8 characters are not masked. Short values match too much ordinary build output to mask reliably, so they’re left alone.
  • A transformed value can’t be matched. If your build script splits a secret across lines, re-encodes it, base64s it, or otherwise changes its form before printing it, the masked pattern no longer matches and the transformed value will appear in the log unmasked.
  • File variables are not masked. Masking applies to variable values, and a file variable’s value is the path to the file, not its contents. If your build prints the contents of a stored file — for example cat-ing a service-account JSON while debugging — those contents appear in the log unmasked. Treat a file variable’s contents as unmasked everywhere.

Masking protects against accidental disclosure — a value that ends up in a log because a tool prints its environment, or a command echoes an argument. It is not protection against your own build script deliberately printing or exporting one of its variables: a build necessarily has its secrets available in plain text while it runs, the same way any CI system’s build does. Only put a value in a build variable if you trust the build script that will run with it available.

Last updated 27 Nov 2026 Something wrong on this page? Tell us

Search the docs