Claude Code and Bijection
Point the assistant at the actual app tree (bijection/app.ts),
its tables, labels, roles and guards, and the committed bijection.lock. Types
catch a call to a function that does not exist or with the wrong arguments, and
bijection check explains label flow and lexicon problems in remedy sentences.
Review the lock diff and the tasks a change submits as you would a person’s.
The assistant runs bijection with the same verbs and tree paths as the code:
bijection check checks the source and writes the lock,
bijection query notes.list and bijection mutate notes.add text=Hi call
functions, bijection trial shows what a mutation would write without
committing it, bijection list notes.items --first 5 reads facts and
bijection watch sys.logs follows function logs. bijection status request observes or resumes
a deploy request whose reply was lost.
Set up the Bijection CLI
Install the CLI, then add Bijection’s guidance for coding agents from your project directory:AGENTS.md and
CLAUDE.md, a bijection stub skill for each selected agent (Claude Code and
Codex by default) and a bijection entry in .mcp.json that runs
bijection mcp serve. The guidance itself ships as Agent Skills inside the
installed @bijectionhq/bijection, so it matches the project’s SDK version:
the MCP server serves it with the Skills extension, and bijection skills list
and bijection skills show <name> print it.
An application can also declare an MCP server for its
queries and mutations. Connect the host to that HTTP
endpoint as a person or an issued session. Each tool call runs under the
caller’s own grants, and a write carries its once, so a retry is the same
effect.
Starting a new project
Install the CLI. Local development can use the starter’s development identity. For hosted work, runbijection login yourself
or configure a deployment-scoped credential before the non-interactive agent
starts. From an empty directory, launch Claude Code with what you want to build:
bijection create and push it with
bijection dev --once. If you’d rather scaffold the project yourself first and
then bring in Claude Code, the manual sequence is:
Adding to an existing project
If your project already has Bijection set up, set up the CLI and start asking Claude Code questions like:- Review my tables and indexes, and suggest the index a selection needs
- Which functions are exposed, and to which roles? (read
bijection.lock) - Run
bijection trialon theorders.placemutation and explain its writes
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 so the agent can iterate on code, run tests, and call functions without needing full deployment permissions. A good 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.