Environment Contracts (`runmark.json`)
**Define what a project needs, then prove whether the current environment satisfies those requirements.**
Environment Contracts allow engineering teams to define explicit, version-controlled machine environment requirements directly alongside source code in a runmark.json file.
json
{
"$schema": "https://runmark.dev/schemas/contract-v1.json",
"version": 1,
"project": { "name": "my-service" },
"platform": {
"os": ["linux", "darwin", "windows"],
"architecture": ["x86_64", "arm64", "amd64"]
},
"runtime": {
"python": ">=3.11,<3.13",
"node": ">=20"
},
"dependencies": {
"python": { "fastapi": ">=0.100.0" }
},
"services": {
"postgresql": { "version": ">=14", "required": true },
"redis": ">=7.0"
},
"environment": {
"required": ["DATABASE_URL"],
"optional": ["DEBUG"]
},
"network": {
"ports": {
"8000": { "protocol": "tcp", "required": true }
}
}
}Version Constraint Syntax
| Expression | Description | Matches | Does Not Match |
|---|---|---|---|
3.12.4 | Exact version | 3.12.4 | 3.12.5, 3.11.4 |
3.12.x | Wildcard minor | 3.12.0, 3.12.4 | 3.11.9, 3.13.0 |
>=3.12 | Greater than or equal | 3.12.0, 3.13.1 | 3.11.9 |
<4.0 | Strictly less than | 3.12.4, 3.99.0 | 4.0.0 |
>=3.11,<3.13 | Compound range | 3.11.0, 3.12.4 | 3.10.9, 3.13.0 |