---
title: Environment Variables Reference
description: Reference for Capawesome Cloud native build environment variables — the default CI_* variables and the reserved variables you can set.
---

# Environment Variables

This page lists the environment variables available during native builds. To set your own variables and secrets, see [Set Up Environments](environments.md).

## Default variables

These are set automatically by Capawesome Cloud for every build and cannot be overridden. Use them in your build scripts to access information about the build context.

| Name | Type | Description |
| --- | --- | --- |
| `CI` | `boolean` | Always `true` — indicates a CI environment. |
| `CI_APP_ID` | `string` | The ID of the application. |
| `CI_BUILD_ID` | `string` | Unique identifier for the build. |
| `CI_BUILD_NUMBER` | `string` | Sequential number of the build. |
| `CI_GIT_COMMIT_SHA` | `string` | The SHA of the Git commit. |
| `CI_GIT_COMMIT_MESSAGE` | `string` | The commit message. |
| `CI_GIT_REFERENCE` | `string` | The Git branch or tag name. |
| `CI_GIT_USERNAME` | `string` | The username for authenticated Git access to the linked repository (see [Git access](#git-access)). Not set when the repository is accessed without credentials. |
| `CI_GIT_PASSWORD` | `string` | The password or token for authenticated Git access to the linked repository (see [Git access](#git-access)). Masked in build logs. Not set when the repository is accessed without credentials. |
| `CI_PLATFORM` | `string` | The target platform (`ios` or `android`). |

## Git access

Git commands in your build scripts authenticate against the linked repository automatically. Capawesome Cloud clones only the commit being built and registers a Git credential helper that reads `CI_GIT_USERNAME` and `CI_GIT_PASSWORD`, so you can fetch what the shallow clone leaves out, for example tags for versioning:

```bash
git fetch --tags origin
git describe --tags
```

The credentials are those of the app's Git connection. For GitHub App connections, this is a temporary read-only installation token. The credential helper applies to Git commands inside the cloned repository.

To access other repositories, for example a private dependency, store a token as an [environment secret](environments.md) and use it in your build script:

```bash
git clone "https://${GITHUB_TOKEN}@github.com/my-org/shared-module.git"
```

## Git LFS

Capawesome Cloud downloads [Git LFS](https://git-lfs.com/){:target="_blank"} files with the checkout of the commit being built. If your build doesn't need them, you can skip the download.

To skip all Git LFS files, set Git LFS's own `GIT_LFS_SKIP_SMUDGE` variable to `1` in a [custom environment](environments.md) or as an ad-hoc variable. Environment variables are set before the repository is cloned, so the variable applies to the checkout.

To skip only some paths, add a comma-separated list of paths or glob patterns as `fetchexclude` to a `.lfsconfig` file in your repository:

```ini
[lfs]
    fetchexclude = design/**,videos/**
```

After the checkout, the build log shows how many Git LFS files were downloaded or skipped.

!!! warning "Pointer files"

    Skipped Git LFS files stay small pointer files in the build. Only skip files your build doesn't need.

## Reserved variables

These configure platform-specific build behavior. Set them in a [custom environment](environments.md) or as ad-hoc variables.

| Name | Type | Description |
| --- | --- | --- |
| `ANDROID_BUILD_TYPE` | `string` | The Android build type. Applies to every [application module](form-factors.md). |
| `ANDROID_FLAVOR` | `string` | The Android product flavor. Applies to every [application module](form-factors.md). |
| `ANDROID_MODULES` | `string` | Comma-separated Gradle project paths of the [application modules](form-factors.md) to collect (e.g. `:app,:wear`). Defaults to every application module. A listed module without an artifact fails the build. |
| `IOS_PROVISIONING_PROFILE_MAP` | `string` | JSON mapping bundle IDs to target names (see [Custom iOS provisioning profiles](custom-ios-provisioning-profiles.md)). |
| `IOS_SCHEME` | `string` | The iOS scheme name. |
| `NODE_VERSION` | `int` | The Node.js major version (e.g. `22`, `24`, `26`). |
| `JAVA_VERSION` | `int` | The Java major version (e.g. `17`, `21`). |
| `XCODE_VERSION` | `int` | The Xcode major version (e.g. `16`, `26`, `27`). |

!!! note "Tool versions"

    The supported versions for Node.js, Java, and Xcode depend on your build stack — see [Build stacks](build-stacks.md).
