# Script

> applane-setup.sh enables the five APIs, grants roles/aiplatform.user to your builders group and adds a budget alert. Add-only, with --dry-run and --check.

Source: https://docs.applane.dev/gcp-admins/setup/script/

**Who:** GCP admin with gcloud signed in as owner or editor  
**Time:** 5 minutes

`applane-setup.sh` is a bash script. It is add-only, prints every command before running it, and supports `--dry-run`. Nothing is deleted. It works with bash 3.2 (the macOS default) and `gcloud` 400 or newer.

Pick this when `gcloud` is already signed in and you want to see each command.

## Get it

The Applane console generates the command below with your values filled in (**Setup > Google Cloud project > Download applane-setup.sh**). Or fetch it from the repository:

```bash
curl -fsSLO <APPLANE_SETUP_REPO_URL>/raw/main/infra/scripts/applane-setup.sh
chmod +x applane-setup.sh
```

## Preview, then apply

```bash
./applane-setup.sh --dry-run \
  --project <GCP_PROJECT_ID> \
  --group applane-builders@<YOUR_DOMAIN> \
  --budget-account <BILLING_ACCOUNT_ID> \
  --budget-amount 50 \
  --extension-id <APPLANE_EXTENSION_ID>
```

`--dry-run` prints every command without running anything. Run the same line without the flag to apply. Leave out `--budget-account` if finance manages budgets elsewhere. All flags are listed in the [script reference](https://docs.applane.dev/reference/setup-script/).

## What it runs

```bash
gcloud config set project <GCP_PROJECT_ID>

gcloud services enable \
  script.googleapis.com \
  aiplatform.googleapis.com \
  sheets.googleapis.com \
  drive.googleapis.com \
  docs.googleapis.com

gcloud projects add-iam-policy-binding <GCP_PROJECT_ID> \
  --member=group:applane-builders@<YOUR_DOMAIN> --role=roles/aiplatform.user

# only with --budget-account
gcloud services enable billingbudgets.googleapis.com
gcloud billing budgets create --billing-account=<BILLING_ACCOUNT_ID> \
  --display-name=applane-vertex-<GCP_PROJECT_ID> --budget-amount=50 \
  --filter-projects=projects/<GCP_PROJECT_ID> \
  --threshold-rule=percent=0.5 --threshold-rule=percent=0.9 --threshold-rule=percent=1.0
```

When it finishes it prints the two console steps and the redirect URIs for the client: [OAuth consent screen](https://docs.applane.dev/gcp-admins/oauth-consent-screen/), [OAuth client](https://docs.applane.dev/gcp-admins/oauth-client/).

## Verify

```bash
./applane-setup.sh --check --project <GCP_PROJECT_ID> --group applane-builders@<YOUR_DOMAIN>
```

Every line reads `PASS`. Two lines read `INFO` because the script cannot see them: the per-user Apps Script API setting and the OAuth client. The [setup checker in the console](https://docs.applane.dev/console/setup-checklist/) verifies those. More in [Verify your setup](https://docs.applane.dev/gcp-admins/verify/).

## Remove it

The script has no remove mode on purpose. The commands are in [Uninstall](https://docs.applane.dev/workspace-admins/uninstall/#gcp-admin).
