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

# Install Bijection

> Install the bijection CLI, add the SDK to a frontend and sign in

Everything in Bijection starts from one program, the `bijection` command line.
Install it with:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
curl -fsSL https://bijection.com/install.sh | sh
```

The installer downloads the CLI build for your platform, checks its SHA-256
against the release manifest, checks that the binary runs on your machine, and
only then installs it at `~/.bijection/bin/bijection`. It installs for your user
only and never uses `sudo`. Running it again reinstalls the latest release, or
does nothing when that exact binary is already installed.

Open a new terminal so it reads the updated PATH, then check the installation.

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection --version
```

## Choose whether the installer updates PATH

By default, the installer adds `~/.bijection/bin` to your shell's startup file.
Set `BIJECTION_MODIFY_PATH=0` to leave the startup file untouched.

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
curl -fsSL https://bijection.com/install.sh | BIJECTION_MODIFY_PATH=0 sh
```

## Install a specific version

Set `BIJECTION_VERSION` to install that release instead of the latest one:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
curl -fsSL https://bijection.com/install.sh | BIJECTION_VERSION=0.1.4 sh
```

## Supported platforms

| Operating system | Processors |
| - | - |
| macOS | Apple silicon (arm64), Intel (x64) |
| Linux (glibc) | arm64, x64 |

The installer needs `curl` or `wget`, and `sha256sum` or `shasum`. On Linux
distributions that use musl libc, such as Alpine, the command line runs but is
qualified only after the release's native checks pass on that platform.

> [!NOTE]
>
> These examples describe the current Bijection CLI and SDK source. Use builds
> from the same source commit for these APIs. The public CLI and npm SDK
> are published independently and may lag this reference.

Native Windows x86-64 support is implemented in the current source. It requires
one release containing the Windows CLI, local runtime and authoring products;
a CLI-only release does not provide local development. Once that release is
published, install from a native 64-bit PowerShell terminal:

```powershell theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
Invoke-RestMethod https://bijection.com/install.ps1 | Invoke-Expression
```

The dispatcher verifies the versioned installer's SHA-256, which verifies the
CLI archive before installing `%USERPROFILE%\.bijection\bin\bijection.exe`.
The installer adds the directory to your user PATH by default. Set
`$env:BIJECTION_MODIFY_PATH = '0'` before installation to opt out.
Native Windows and WSL use separate runtime installations and state. Hosted
actions on Windows require Docker Desktop with Linux containers.

## The toolchain

The backend needs no Node.js: developing, checking and deploying it run in
the one `bijection` binary, which embeds its SDK and the native TypeScript
compiler. The React frontend and [tests on the real kernel](https://docs.bijection.com/development/testing/test-library.md)
(`@bijectionhq/bijection/test`) need Node.js LTS; the test preset,
`vitestPreset()`, sets the flags the kernel needs. The embedded SDK is
materialized under `~/.bijection/sdks/`, keyed by its archive digest.

A frontend app installs the SDK from the npm registry:

Install the Bijection SDK in your app:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npm install @bijectionhq/bijection
```

With pnpm, Yarn or Bun, use the package manager's `add` command. The app tree
imports from `@bijectionhq/bijection`, a frontend from
`@bijectionhq/bijection/client` and `@bijectionhq/bijection/react`, tests from
`@bijectionhq/bijection/test`, and libraries from
`@bijectionhq/bijection`.

A project with `package.json` owns its SDK. CLI upgrades, checks and
deployment never change its dependency declarations or lockfile.
A CLI release and the SDK it embeds share one version: `bijection --version`
prints the SDK version a new project pins.

### Creating projects

> [!NOTE]
>
> These examples describe the current Bijection CLI and SDK source. Use builds
> from the same source commit for these APIs. The public CLI and npm SDK
> are published independently and may lag this reference.

`bijection create . --template bare` needs no package manager. The CLI prepares
`node_modules/@bijectionhq/bijection` so your editor and native compiler can resolve types.

`bijection create my-project` creates a React/Vite app with live shared
notes, a task and a test on the real kernel. Run `cd my-project && bijection dev`
to start the local backend and frontend together; no account or identity
provider is required. The notes table has no label and its functions allow
`role.anyone`; see [access](https://docs.bijection.com/access) for protected data. Restarting preserves
development data. Use `--template business` for the inventory workspace with
AuthKit, sample data and kernel tests, `--template teams` for tasks private to each
organization,
`--template react-vite-authkit` for member-only notes with sign-in, or
`--template files` for authenticated file uploads. Initialization
downloads verified Bijection package files into `vendor/`, writes
`file:vendor/...` dependencies, and installs them with the package manager it
detects: the one whose lockfile is in an enclosing directory, otherwise the
first of pnpm, bun, yarn and npm on your `PATH`. Commit `vendor/`, `package.json` and the lockfile: the managed builder
installs these same packages with the frozen lockfile.

For an existing frontend, the source build can also export the SDK it embeds:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection sdk export vendor/bijection.tgz
npm install ./vendor/bijection.tgz
```

With pnpm, Yarn or Bun, use the package manager's `add` command.

## Log in

Local development does not require a Bijection account. Sign in when you want
to link a project or use the hosted service.

`bijection login` signs this machine in to your Bijection account, once per
machine, on the Bijection hosted service unless `BIJECTION_MANAGEMENT_URL` names
another management service. It prints a link and a code; open the link,
check the code and approve the sign-in. The credential is stored in the
operating system keychain; `~/.bijection/config.json` records its reference and
the service that issued it, and later commands use that service.
`BIJECTION_CREDENTIAL_STORE=file` keeps the credential in that owner-only file
instead, for machines without a keychain.

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection login
```

> [!NOTE]
>
> The CLI connects to the Bijection hosted service by default, and its links
> open the console at `https://console.bijection.com`. To use another
> management service, such as one you were given, set `BIJECTION_MANAGEMENT_URL`
> to its URL in your shell's startup file, so that every later `bijection`
> command sees it too:
>
> ```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
> export BIJECTION_MANAGEMENT_URL=https://<your management service>
> ```

## Upgrade

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection upgrade
```

`bijection upgrade` replaces the binary with the latest release after verifying
it against the release manifest, and reports when you already have the latest
one. The new binary brings its own backend SDK and TypeScript compiler. Projects that
declare the SDK in `package.json` retain their installed version and lockfile;
updating their dependencies is an explicit project change.

## Uninstall

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
rm -rf ~/.bijection
```

This removes the command line, its toolchains, the cached SDK and your login
credential. Also remove the `PATH` line from your shell's startup file if you
added one. Your projects and deployments are not affected.

## Next steps

> [card] [Create your first app](https://docs.bijection.com/start/quickstart.md)
>
> Create the notes starter and read its tree.

> [card] [React](https://docs.bijection.com/clients/react)
>
> Add Bijection to a React app.

> [card] [All clients](https://docs.bijection.com/clients)
>
> Connect from another framework or language.

> [card] [Tutorial: Build a chat app](https://docs.bijection.com/examples/reactive-chat)
>
> Build a real-time chat app step by step.


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