bijection env list that use your logged-in credentials run
commands against your personal dev environment as if you ran the commands
yourself. This works well when you’re collaborating with an agent; just like
when the agent runs git commit -am "Fix.", the commit will use your local git
credentials.
But when cloud-based coding agents like Jules, Devin, Codex, or Cursor Cloud
Agents run Bijection CLI commands, they can’t log in. And if you do log in for
them, the agent will use your default dev deployment to develop, conflicting
with your own changes!
Give such an agent its own dev deployment on
the Bijection service, and a deploy key that works only for that deployment. The
CLI never runs a deployment on the agent’s machine: there are no local or
anonymous deployments, so an agent without a login or a deploy key can’t run
bijection dev.
Dev deployment per agent
Provision a fresh dev deployment in your project and hand the agent a deploy key scoped only to it. Run this in a checkout of the project on a machine where you are logged in; creating the deploy key takes a team admin:BIJECTION_DEPLOY_KEY is set in .env.local, the agent can only push to and
develop against its own dev deployment — not prod or other developers’
deployments. Within that deployment the key has full access. Dev deployments do
not expire, so have an admin delete the agent’s deployment when its work is
done; a key created in the console can also carry an expiry. For a cloud agent, copy the key from .env.local into the
agent’s environment as BIJECTION_DEPLOY_KEY; its setup script then only needs
to install the CLI, install dependencies and push code:
bijection env set (which accepts variables on stdin
or via --from-file).
env set needs a deployment to be configured first, so run it after
bijection dev --once --installation <project>:<name> and
before bijection dev --once so the deployed code sees the new values.
See
Creating and deleting deploy keys from the CLI
for the full options on bijection credential create.
Worktree setups
If you use a tool that creates a separate worktree for each agent task (Codex, Conductor, Cursor local worktrees, T3 Code), you can wire the dev deployment-per-agent recipe into the tool’s setup script so each worktree gets its own dev deployment automatically.bijection dev --once --installation <project>:<name> selects the deployment it
creates during setup,
so bijection commands run from that worktree afterward use it. Replace
my-project with your project’s name in the snippets below; a deployment name
is lowercase letters, digits and hyphens. The credential selects the
organization.
These setup scripts run with your login, so the agent acts with your account
authority. Give it an explicitly selected development deployment and scope
any deploy key to that target. Use ordinary source review before publishing
a production deploy.
Using the Codex app
Using the Codex app
Open the Codex app settings and go to Environments. Select the environment for
your project or create one if needed. Use the following setup script:When starting a new worktree, select the environment that you just created.
Using Conductor
Using Conductor
Add the following setup command to the
conductor.json file of your project:Using Cursor local worktrees
Using Cursor local worktrees
Add the following setup command to the
.cursor/worktrees.json file of your
project:Using T3 Code
Using T3 Code
Click on Add action in the top bar. Enable Run automatically on worktree
creation and use the following command:
bijection installation deploy-key create <project>:<name> --save-env step from the
dev deployment recipe after the
bijection dev --once line.
Switching deployments
bijection installation select <ref> switches a worktree to another deployment by
its reference, or to dev (your personal dev deployment) or prod.