CLI reference

Install

npm install -g @buildtree/cli

The binary on your PATH is buildtree. Requires Node 22 or later.

buildtree login

buildtree login

Authenticate with buildtree. Authorise the session in the browser when prompted.

buildtree upload

buildtree upload <file> [options]

Upload a build artifact and confirm it on the server.

Arguments

ArgumentDescription
<file>Path to a .ipa, .apk, or .aab. Optional in a TTY.

Options

FlagDescription
--project <slug>Project slug. Required in CI.
--env <name>Environment string. Required in CI.
--branch <name>Branch name. Omit to create a checkpoint.
--release <tag>Attach a release tag such as v1.2.0.

Examples

# Interactive
buildtree upload ./app.apk

# Fully scripted
buildtree upload ./app.apk --project acme --env dev --branch feature/payments

# Promote to dev checkpoint
buildtree upload ./app.ipa --project acme --env dev

# Tag a release
buildtree upload ./app.ipa --project acme --env prod --release v1.2.0

buildtree publish

buildtree publish [platform] [options]

Run buildtree build then buildtree upload in one command.

Arguments

ArgumentDescription
[platform]ios, android, or omitted to use the first configured platform.

Options

FlagDescription
--project <slug>Project slug. Required in CI.
--env <name>Environment string. Required in CI.
--branch <name>Branch name. Omit to create a checkpoint.
--release <tag>Attach a release tag.

buildtree build

buildtree build [platform]

Run the build command declared in buildtree.config.json (or a buildtree field in package.json):

{
  "buildtree": {
    "builds": {
      "ios": {
        "command": "fastlane build_ios",
        "artifact": "build/App.ipa"
      },
      "android": {
        "command": "cd android && ./gradlew assembleRelease",
        "artifact": "android/app/build/outputs/apk/release/app-release.apk"
      }
    }
  }
}

Projects are not auto-detected. If eas.json is present and no buildtree.builds is configured, the CLI falls back to eas build --local --platform <platform>.

buildtree list

# Projects
buildtree list

# Builds within a project
buildtree list --project acme

Options for the builds variant

FlagDescription
--project <slug>Project to list. Required for the builds variant.
--env <name>Filter to a specific environment.

buildtree link

buildtree link --build <buildId>

Generate a temporary download URL for an artifact.

Options

FlagDescription
--build <id>Build UUID. Required.
--expires-in <seconds>URL TTL. Max 86400, default 3600.

buildtree delete-project

buildtree delete-project <slug> [options]

Delete a project, its builds, and its registered devices. Irreversible.

Options

FlagDescription
-y, --yesSkip the confirmation prompt.

Environment variables

VariableDefaultPurpose
BUILDTREE_API_URLhttps://buildtree.shBase URL of the buildtree API.
BUILDTREE_TOKENunsetAPI token. Intended for CI.
CLI reference | buildtree docs