Connect a project
Connect a repository to a Varlatch server you can sign in to. No server yet? Install Varlatch first. No CLI yet? Install the CLI.
Varlatch organizes configuration into Organizations → Projects →
Environments (such as development and production). A project usually maps
to one repository and has a Contract declaring which keys the app needs,
their types, and which ones are Secrets.
The quick way
Section titled “The quick way”In your repository directory, run one interactive command:
varlatch initThe wizard walks you through everything and prints the equivalent command at each step:
- Sign in to your server if you aren’t already.
- Pick or create the organization and project.
- Create environments (
developmentandproductionby default if none exist). - Write
varlatch.tomland the instruction files coding agents read. - Import your
.envfiles, showing names, inferred types, and sensitivity (never values), adding new items to the Contract, and asking before overwriting existing values or activating the Contract. - Clean up by offering to delete each
.envfile once every value is safely stored.
Once that finishes, jump straight to Run your application below.
Step-by-step (manual or scripted)
Section titled “Step-by-step (manual or scripted)”Use the individual commands below if you prefer doing each step manually, or in
scripts / CI where varlatch init does not prompt interactively.
Create the project
Section titled “Create the project”Sign in from your machine. The CLI opens your browser, or prints the address to open, and you approve with your passkey:
varlatch login --server https://vault.example.comThe first server you sign in to becomes your default server, so the
commands below need no --server outside a repository
(The default server).
If you use more than one installation, check which one that is with
varlatch server first, or pass --server.
Create an organization and a project, either in the dashboard, which walks you through the same steps, or with the CLI:
varlatch org create acme "Acme"varlatch project create api --org acmeA project created with the CLI takes its contract from the repository.
Pass --managed to project create to edit the contract in the dashboard
instead.
Then, in the repository:
varlatch init --org acme --project apivarlatch env-create development --tier developmentvarlatch env-create production --tier productionvarlatch init writes varlatch.toml, which names the server (your default
server, unless you pass --server), organization, project, and default
environment (development). It holds no credentials:
commit it, so everyone working on the repository uses the same project. It
also writes the files coding agents read, described in
Coding agents; --no-agent-files skips them.
Add the configuration
Section titled “Add the configuration”Move an existing .env file in
Section titled “Move an existing .env file in”If the project already has a .env file, import it. The CLI reads the file
itself, so values never appear on the command line or in its output:
varlatch import .env --dry-run # the plan: names, types, Secrets; stores nothingvarlatch import .env --contract --delete-source # store the values, then delete the filevarlatch contract activate <revision> # the revision import printed--contract adds the items the contract does not have yet, each as a
Secret unless you name it with --plain <NAME>. The values go to the
default environment; fill another one the same way, for example with
varlatch import .env.production -e production.
Importing has the details.
Or start from a contract
Section titled “Or start from a contract”Describe the items in a .env.schema file in the repository:
# @required# @type=urlDATABASE_URL=
# @publicPORT=8080Then push and activate it, and set the values:
varlatch contract push --schema .env.schemavarlatch contract activate <revision> # the revision push printedvarlatch values set DATABASE_URL # a hidden prompt asks for the valueItems are Secrets unless marked @public.
The .env.schema format lists everything a
contract can say.
Run your application
Section titled “Run your application”varlatch validate # does the environment satisfy the contract?varlatch run -- npm run dev # the default environmentvarlatch run -e production -- node server.jsvarlatch run gives the values to your command as environment variables.
No file of secrets is written to disk. To go further:
varlatch types --out src/config.ts(orapp/varlatch_config.py) generates typed access to the configuration: Type generation.varlatch scan --install-hookadds a pre-commit hook that stops you from committing one of your Secrets: Secret scanning.
Invite your team
Section titled “Invite your team”varlatch invite "Ada Lovelace" # a membervarlatch invite "Grace Hopper" --role admin # an organization adminEach invitation is a one-time link: send it to that person, who follows Join a team. The dashboard does the same under Access, then Members. What members can reach, and removing someone, are in Members and access.
With coding agents
Section titled “With coding agents”Varlatch lets a coding agent use a credential without being able to read it.
varlatch init already wrote the instructions agents read. Then:
- Coding agents: the skill, guardrails, and the agents Varlatch was evaluated with.
- Assisted mode: an agent driving the CLI with your sign-in, with every Secret masked in what it sees.
- Agent-safe runs: an agent that gets placeholders instead of Secrets.
- The MCP server, for MCP hosts without a shell.
A change that needs your approval (such as turning a security control down) never goes through on an agent’s word: the agent stops and shows you an address, and you approve with your passkey. See Security controls and approvals.
Where to go next
Section titled “Where to go next”- CI and other machines: OIDC for CI, credentials for servers, and pushing values to platforms.
- Removing Varlatch: deleting a project or an organization, and what the CLI leaves in a repository.
CONTEXT.md: the vocabulary, from planes and identities to grants and contracts.- Scripting: JSON output and exit statuses.

