> ## 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.

# Using Claude Code with Bijection

> Build and scale apps with Claude Code and Bijection, and get the full power of Bijection out of the official Claude Code plugin: MCP tools, hooks, and skills.

[Claude Code](https://claude.com/claude-code), Anthropic's agentic coding tool,
makes it easy to write and maintain apps built with Bijection. Let's walk through
how to set up Claude Code for the best possible results with Bijection.

## Claude Code and Bijection

Claude Code works great with Bijection out of the box. Because Bijection is a
TypeScript backend with end-to-end type safety, Claude Code's mistakes surface
as compile errors, ACID transactions keep concurrent writes consistent, and apps
scale without extra infrastructure. That's all you need to build anything from a
real-time chat app to an AI agent backend. Adding the plugin lets you leverage
the full power of Bijection: Claude Code reads your live deployment through the MCP
server, catches its own errors with the built-in hooks, and applies the
idiomatic Bijection patterns its skills and subagents know.

## Install the Bijection plugin in Claude Code

The official Bijection plugin makes Claude Code work better with your Bijection
project. It includes:

* **Tools** that let your agent securely interact with your dev deployment (e.g.
  read the data/logs/insights or run functions).
* **Hooks and monitors** that keep your generated types in sync and surface
  errors as the agent works.
* **Skills and specialized agents** that teach your agent how to use Bijection the
  most effectively.

See the [Agent Plugins overview](/ai/bijection-plugins) for everything the
plugin bundles.

To install the plugin, run the following command in Claude Code:

```
/plugin install bijection@claude-plugins-official
```

## Starting a new project

From an empty directory, launch Claude Code with what you want to build:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
claude "build me a todo app with Bijection" --permission-mode auto
```

Claude Code handles the rest. It runs `bijection init` and
`bijection dev --once`. The agent's shell is non-interactive, so
[install the CLI](/get-started/install) and run `bijection login` yourself
first; the agent then uses that login.

If you'd rather scaffold the project yourself first and then bring in Claude
Code, the manual sequence is:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
bijection init my-app --template react-vite
cd my-app
claude
```

## Adding to an existing project

If your project already has Bijection set up,
[install the Bijection plugin](#install-the-bijection-plugin-in-claude-code) to make
Claude Code Bijection-aware.

Now start asking Claude Code questions like:

* Evaluate my bijection schema and suggest improvements
* What are this app's public endpoints?
* Run the `my_bijection_function` query

## Running Claude Code with Bijection in the cloud

When running Claude Code in a remote environment (e.g. Claude Code on a CI
runner or a cloud VM), use Bijection's [Agent Mode](/cli/background-agents) so the agent
can iterate on code, run tests, and call one-off functions without needing full
deployment permissions.

A good setup script:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
curl -fsSL https://bijection.com/install.sh | sh
export PATH="$HOME/.bijection/bin:$PATH"
npm i # your app's own dependencies, if it has a package.json
bijection dev --once
```

In non-interactive shells (the typical case for an agent's setup script),
`bijection` won't prompt the agent to log in, so give the environment a
`BIJECTION_DEPLOY_KEY` for the deployment the agent works on.

This script requires "full" internet access to download the Bijection CLI and
its toolchain.

For per-agent cloud dev deployments scoped to a single throwaway deploy key, see
[Cloud dev deployments per agent](/ai/overview#cloud-dev-deployments-per-agent).
