> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synheart.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Build your app

> Reference for the synheart commands in the Build your app group.

Every command also accepts the [global flags](/cli/reference/index#global-flags).

## `synheart install`

Install SDK artifacts into your project

Downloads Synheart SDK artifacts from the Artifact Registry into your
project's synheart/vendor directory and records them in synheart.lock. Use it
to add the runtime or the Syni packages to an app, or to change runtime
variant.

Needs: you are logged in ('synheart login'), network access, and a project
directory (default: the current directory). For a guided install, open
'synheart ui'.

Products are syni and core; components are runtime and spec. A product installs
every component of it that your plan includes. A component installs across
every product that ships it. Two arguments, in either order, pin one package.

Files go to synheart/vendor/runtime/ for the core runtime and to
synheart/vendor/\<package>/ for everything else.

**Usage**

```bash theme={null}
synheart install <product|component> [component|product] [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--cache-dir` | `string` | - | Download cache directory (default: \~/.synheart/cache) |
| `--channel` | `string` | `latest` | Release channel to install from: latest or stable (stable may not be published yet) |
| `--platform` | `string` | - | Install for one platform only: ios or android (default: all platforms) |
| `--project-dir` | `string` | `.` | Project directory to install into |
| `--variant` | `string` | - | Runtime variant: edge, stable or lab (default: the server picks one based on your plan) |
| `--version` | `string` | - | Exact version to install, such as v1.2.3 or stable; overrides --channel |

**Examples**

```bash theme={null}
# Install the Syni packages your plan includes
synheart install syni
# Install the core runtime
synheart install core
# Install one component for every product that ships it
synheart install runtime
# Pin one package to a variant or version
synheart install runtime --variant edge
synheart install runtime syni --version v0.2.0
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

## `synheart runtime`

Manage the synheart-core-runtime library

Inspect, upgrade, or install the native synheart-core-runtime library in a
project. The runtime is what your app's Synheart SDK loads at launch.

To fetch the runtime from the registry the first time, use
'synheart install runtime'. The subcommands here work on a runtime that is
already pinned in synheart.lock, or on a local build.

**Usage**

```bash theme={null}
synheart runtime
```

**Subcommands**

* `synheart runtime current`: Show the runtime pinned in synheart.lock
* `synheart runtime install`: Install runtime artifacts from a local build
* `synheart runtime upgrade`: Fetch the latest runtime for your variant

**Examples**

```bash theme={null}
# Show which runtime this project is on
synheart runtime current
# Move to the latest runtime for the same variant
synheart runtime upgrade
# Install a runtime you built locally
synheart runtime install --from ../synheart-core-runtime/build/dist/core
```

### `synheart runtime current`

Show the runtime pinned in synheart.lock

Prints the runtime package, variant and version recorded in the project's
synheart.lock. It makes no network call, so it is a quick way to answer "what
am I on?".

Needs a project directory containing synheart.lock (default: the current
directory). Exits 1 with SH-RT-NOLOCK when there is no lockfile yet. With
\--json it prints the same fields as an object.

**Usage**

```bash theme={null}
synheart runtime current [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--project` | `string` | `.` | Project directory containing synheart.lock |

**Examples**

```bash theme={null}
# In a project with a runtime installed
synheart runtime current
# Another project, as JSON
synheart runtime current --project ../my-app --json
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.

### `synheart runtime install`

Install runtime artifacts from a local build

Copies pre-built synheart-core-runtime artifacts from a local build
directory into \<project>/synheart/vendor/runtime/, in the same layout that
'synheart install runtime' produces from the registry. Use it to test a runtime
you built yourself. No login or network needed.

\--from points at the build output, typically from 'make dist-core' in the
synheart-core-runtime repository. Everything at the top level of that directory
is copied as is.

**Usage**

```bash theme={null}
synheart runtime install [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--from` | `string` | - | Directory of built runtime artifacts (required) |
| `--project` | `string` | `.` | Project directory to install into |

**Examples**

```bash theme={null}
# Install a local build into the current project
synheart runtime install --from ../synheart-core-runtime/build/dist/core
# Install into another project
synheart runtime install --from ./build/dist/core --project ../my-flutter-app
```

**JSON output:** not supported. This command does not print a JSON body.

### `synheart runtime upgrade`

Fetch the latest runtime for your variant

Reads the variant (edge, stable or lab) from synheart.lock and runs
'synheart install runtime' against the latest release of that variant. A
project on lab stays on lab; a project on edge stays on edge. With no
lockfile it installs without a variant, so the server picks one from your plan.

Needs: you are logged in and network access.

**Usage**

```bash theme={null}
synheart runtime upgrade [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--platform` | `string` | - | Upgrade one platform only: ios or android (default: all platforms) |
| `--project` | `string` | `.` | Project directory containing synheart.lock |

**Examples**

```bash theme={null}
# Upgrade the runtime in this project
synheart runtime upgrade
# Upgrade a project in another directory
synheart runtime upgrade --project ../my-app
# Upgrade for one platform only
synheart runtime upgrade --platform ios
```

**JSON output:** not supported. This command does not print a JSON body.

## `synheart sync`

Reinstall exactly what synheart.lock pins

Reads synheart.lock in the project directory and installs the versions it
pins, so every machine and CI run gets the same artifacts. Use it after cloning
a project or pulling a lockfile change. It works with single-package and
multi-package lockfiles.

Needs: you are logged in, network access, and a synheart.lock (created by
'synheart install').

**Usage**

```bash theme={null}
synheart sync [flags]
```

**Flags**

| Flag | Type | Default | Description |
| - | - | - | - |
| `--project-dir` | `string` | `.` | Project directory containing synheart.lock |

**Examples**

```bash theme={null}
# Restore the artifacts pinned in this project
synheart sync
# Restore them for a project in another directory
synheart sync --project-dir ../my-app
```

**JSON output:** supported. Add `--json` (or `--format json`) to print a machine-readable body.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.