DevContract is an open-source repo-first tool for developer onboarding, local setup contracts, and encrypted .env sharing.
It is built for teams that still onboard people through stale docs, copied .env files, chat messages, and tribal knowledge. DevContract lets the repository describe how local development should work, helps teammates receive shared config more safely, and keeps local revision history encrypted on each machine.
Most teams do local setup with some messy mix of:
- README steps that drift over time
- copied
.envfiles in chat or DMs - hand-written onboarding checklists
- "ask someone on the team" as the real setup process
DevContract tries to replace that with one repo-owned contract for setup, health checks, and shared local config workflows.
- The repo can declare a local setup contract in
.devcontract/contract.yaml - The CLI can bootstrap, validate, and run that contract
- Shared
.envupdates can move directly between trusted machines or through an encrypted relay fallback - Local history and backups stay encrypted on the developer machine
- It is designed for development environments, not production secret injection
- small engineering teams with painful onboarding
- solo builders managing more than one machine
- repos that need repeatable local setup, not just secret storage
- teams that want something lighter than a full hosted secrets platform
- production runtime secrets management
- enterprise compliance-heavy environments
- teams that only need a hosted secret dashboard and nothing else
- bootstrap a repository-defined local setup flow
- validate runtimes, services, contract health, and sensitive text surfaces
- invite and join trusted project members
- sync
.envchanges between trusted machines - keep encrypted local revision and backup history
- support scoped relay pull workflows for CI or service principals
- generated assistant/editor instruction files and MCP config
- some extension surfaces
- relay limits messaging
DevContract is for development environments. It is not a production secrets manager or a hosted control plane by itself.
macOS and Linux:
curl -fsSL https://raw.githubusercontent.com/dantwoashim/DevContract/main/scripts/install.sh | bashWindows PowerShell:
irm https://raw.githubusercontent.com/dantwoashim/DevContract/main/scripts/install.ps1 | iexIf a binary release has not been published yet, the installer falls back to building from source when Go is installed.
git clone https://github.com/dantwoashim/DevContract.git
cd DevContract
go build -o devcontract ./For contributors and auditors, the repository includes a devcontainer and a canonical make verify path using Go 1.25.8 and Node 22.
In your own repository:
devcontract init
devcontract bootstrap
devcontract doctorInvite a teammate:
devcontract invite teammateSync changes:
devcontract push
devcontract pullIn a typical repo, you can:
- define local setup in
.devcontract/contract.yaml - run
devcontract init - run
devcontract bootstrap - run
devcontract doctor - share
.envupdates withdevcontract pushanddevcontract pull
Here is a simple example of the intended flow:
devcontract init
devcontract bootstrap
devcontract doctor
devcontract invite teammate
devcontract push
devcontract pullThe goal is to make local setup repeatable, easier to audit, and less dependent on ad hoc handoffs.
devcontract init: create local identity state and scaffold a starter contract in your repositorydevcontract bootstrap: run the repository setup contract after trust reviewdevcontract doctor: check local prerequisites and repository healthdevcontract guard scan: scan repo text surfaces for likely secret leaksdevcontract invite/devcontract join: manage human project membershipdevcontract limits: inspect relay-side limits and usage configured by the current deploymentdevcontract service-key: register scoped relay machine identitiesdevcontract push/devcontract pull: exchange encrypted.envstatedevcontract backup,restore,rollback: inspect and recover local history
- Each repository can define its local setup contract in
.devcontract/contract.yaml. - Human identity comes from an Ed25519 SSH key.
- LAN sync uses direct peer transport when a trusted peer is reachable.
- Relay sync uploads a per-recipient encrypted blob when direct delivery is unavailable.
- Revision and backup history stays local and encrypted at rest.
More detail:
- request authentication uses Ed25519 signatures
- peer-to-peer sync uses a secure transport
- relay payloads are encrypted before upload
- relay metadata is still visible to the relay operator
- local machine compromise still defeats local secrecy
See SECURITY.md for reporting guidance and the current security model.
The repository includes the relay source in relay. You can self-host it on Cloudflare Workers or point the CLI at your own relay deployment. The default public relay URL in the codebase is just a default endpoint, not a promise of hosted service guarantees.
The VS Code extension lives in extension. It shells out to the CLI and is best treated as a companion interface, not a separate implementation.