# 🚀 Getting Started

There are two ways to install ApexBlueprint, and both deliver the exact same source. For a full comparison of the two paths (test execution during deploys, coverage calculation), see [Installing Apex Stem](/apex-stem/docs/apex-stem-installation).

| Path | Best for | Prerequisites |
|---|---|---|
| **Unlocked Package (recommended)** | New projects, production orgs | Salesforce CLI and an org login — nothing else |
| **Git Submodule** | Projects already on submodules, contributors | Everything in [Prerequisites](/apex-stem/docs/apex-blueprint-prerequisites), including make |


## 📦 Install as an Unlocked Package (recommended)

If you have finished the "Salesforce CLI Setup" and "Target Org" steps of the [Prerequisites](/apex-stem/docs/apex-blueprint-prerequisites), one command is all it takes. No make setup required.

```bash
$ sf package install -p 04tgK000000HaIPQA0 -o <your-org> -w 10
```

To install from the browser instead, open `https://login.salesforce.com/packaging/installPackage.apexp?p0=04tgK000000HaIPQA0` (use `test.salesforce.com` for sandboxes).

The current version is **v2.0.1**. Install IDs for every release are listed on the [GitHub Releases](https://github.com/krile136/ApexBlueprint/releases) page.

Installed as a package, ApexBlueprint's bundled tests are **excluded from `RunLocalTests`**, and its code is **excluded from your org's coverage calculation**. ApexBlueprint's tests create real records, which makes them prone to collisions with org-specific validation rules and required fields — on the package path, that entire failure class disappears.

### Updating

Run the same command with the next version's install ID — the installed package upgrades in place. Check what is installed with `sf package installed list -o <your-org>`.


## 📥 Install as a Git Submodule

### Package Acquisition (First Time Only)

```bash
$ cd force-app/main/default/classes
$ git submodule add https://github.com/krile136/ApexBlueprint.git ApexBlueprint
```

This will add the `ApexBlueprint` directory to your repository and incorporate it into source control.

### Deploy to Organization

With all [Prerequisites](/apex-stem/docs/apex-blueprint-prerequisites) in place, deploy the acquired classes:

```bash
$ make install
```

The `make install` command internally calls Salesforce CLI deploy commands.

On the submodule path, the test classes run as local tests and are **configured to meet the 75% coverage requirement**. However, **if test failures occur due to organization settings or disabled standard fields**, adjust the `*_T.cls` test classes accordingly — or consider switching to the Unlocked Package path.

### Updating

Run the following commands from your project root:

```bash
$ cd force-app/main/default/classes/ApexBlueprint
$ git pull
$ make install
```

:::warning
Submodules maintain information (pointers) about which commit the parent repository references.  
To ensure consistency in production environments, we recommend using `git submodule update --remote` to automatically update the reference to the latest version,  
and then committing in the parent repository as well.
:::


## 🔗 Back to Guide

← [Back to ApexBlueprint Developer Guide](/apex-stem/docs/apex-blueprint-guide)
