# ModernCI: full text > PRs move. No reds that aren't yours. No queue. ModernCI is a cloud CI service and merge queue that lands pull requests from people and coding agents, on any forge, using compute you already own, and charges per landed PR. It is in early access (pre-launch): features are labelled "In development", "Coming" or "Target", and the one measurement so far (ModernCI's own repo, about five hours) is 6.8x cheaper than standard CI, 3.9x excluding checks that never started, and 2.0-2.7x against a tuned standard setup. This file concatenates the Markdown twin of every page and doc on https://modernci.dev. Each part starts with front matter naming its URL. ================================================================================ --- title: "ModernCI: PRs move. No reds that aren't yours. No queue." description: "PRs move. No reds that aren't yours. No queue. ModernCI is CI and a merge queue in one engine, on compute you already own, with signed builds and releases, and it costs less as it learns. Early access." url: https://modernci.dev/ --- CI and merge queue, one engine # PRs move. No reds that aren’t yours. No queue. Within days of connecting, your team feels it — and every PR’s receipt shows what it saved. [Sign in](https://app.modernci.dev/sign-in) · [Why ModernCI](/why.md) - **Hundreds of PRs landed per hour, per repo** (Target) - **Push to landed ≈ your own check time** (Target) - **Flaky or infra reds reaching a person ≈ 0** (Target) - **Queue wait p90 < 5 min** (Target) (In development)Early access · pre-launch > Illustrative: PR 412 is pushed, pre-checked with reused tests, batched, and landed on main in 9 minutes; its receipt shows $1.20 of compute saved and a $0.06 fee. Illustrative mock with example numbers. ## Built for every push, from your people and your agents ModernCI has no AI of its own. It’s the CI your AI agents use: they push, ModernCI checks, explains reds in a form agents can act on, verifies their fixes, and lands the result. Agents connect over MCP. [Agents and MCP →](/agents.md) ``` $ mci run --on 64cpu npm run e2e # runs on a clean machine, streams like local $ mci runner up --labels linux,x86_64 # this server is now in your compute pool $ mci mcp # your agent can run, watch and read reds ``` Illustrative session. Command surface is in development. ``` ✗ integration failed parser::handles_crlf why red your diff touches src/parser.rs, which this test reads. Nothing else differs. not flaky 0 failures in the last 200 runs on main repro mci repro r-8f2c --test parser::handles_crlf ``` Illustrative why-red card, as designed. The same card goes to the PR, the CLI and agents. ## Faster PRs, and it costs less as it learns A merge queue only orders PRs; ModernCI also runs the checks, on your compute. So it reuses exact results, picks the tests that matter and verifies fixes: PRs land sooner, and every receipt shows what it saved next to what it cost. [How every PR gets faster →](/savings.md) > Example receipt for PR 412: saved $1.20 of compute; ModernCI fee $0.06; landed in 9 minutes, against 31 minutes alone. Saved by reuse, test selection and batching. Example, not a measurement. Required checks always run in full. ## Land it, build it, sign it, ship it Build, sign and publish from the engine that landed the PR. (In development) Keys generated by ModernCI, provenance signed by the platform, and every channel published from one declared file. [Build & Release →](/build.md) ``` # Example extends: ci.yaml release: sign: keys: repo: { kind: openpgp, generate: true, rotate: 90d } publish: [homebrew-tap, apt, dnf, winget, npm, crates, oci] ``` Example config, not a working file yet. ## Your machines, one command Running on your own machines is the default path and costs $0 from us; ModernCI-provided compute is an optional add-on. Bring your own compute (BYOC) is included on every plan; `mci runner up` adds a server, a Mac or a GPU box, and ModernCI places work across all of it. Free machines fill first, and every placement comes with a plain-English reason. Overflow to your own cloud account, only when you allow it, is (Coming). [How runners work →](/runners.md) | Compute | Where | Placement reason | |---|---|---| | mac-build-3 | Your Mac | Chosen: only free `macos arm64` machine. | | build-box-1 | Your server | Chosen: free, 4 jobs running. | | your-cloud-a | Your cloud account | Not used: free machines are enough. | Illustrative. The live Compute screen is in development. ## Everything else, one engine ### Merge queue Batching, bisect and flaky tests that never block you. [Merge queue →](/merge-queue.md) ### mci run Run anything on your own compute, on demand. [mci run →](/run.md) ### Security model Separate processes and keys; people approve, agents never do. [Security →](/security.md) ### Migration Import Actions or GitLab CI and run in shadow mode first. [Migration →](/migration.md) ### Compared with the rest A merge queue vs the whole pipeline, row by row. [Why ModernCI →](/why.md) ### Pricing Planned: pay per PR that lands. Agents never take a seat. Billing is (Coming); usage is metered today. [Pricing →](/pricing.md) ## Try it when early access opens up Sign in to the console, or read how the pieces fit together. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Why ModernCI: compared with GitHub Actions, GitLab CI, CircleCI and Buildkite" description: "A fair comparison of ModernCI with GitHub Actions, GitLab CI, CircleCI and Buildkite for landing every PR your team and agents push." url: https://modernci.dev/why/ --- Why ModernCI # The whole pipeline, not just the queue. Other queues decide when your PRs merge. ModernCI is the whole pipeline — queue, CI and your compute — billed per PR that lands. [Sign in](https://app.modernci.dev/sign-in) · [Migration plan](/migration.md) (In development)Early access · pre-launch > Illustrative summary: a merge queue only merges; ModernCI also runs the checks on your own compute, signs and releases, and bills per landed PR. A summary of the table below. ## Six reasons PRs move. No reds that aren’t yours. No queue. ### 1. Queue and CI in one engine (In development) Landing runs the checks itself, so it reuses exact results and puts a cost receipt on every PR. Batching and bisect come as standard. ### 2. Your machines are first-class (In development) Bringing your own machines costs $0 from us (ModernCI-provided compute is an optional add-on). `mci runner up` makes your own hardware effortless, and ModernCI fills free machines first. ### 3. Compute on demand (In development) `mci run` runs any command on a clean machine from your laptop or agent, and reuses the result in CI. ### 4. You see why it is red (In development) One card: the failing line, what changed since the last green run, flaky history and a repro command. ### 5. Agents are teammates (In development) ModernCI is an MCP server. It has no AI of its own: it is the CI your AI agents use. ### 6. No lock-in to a forge or cloud (In development) Forge and compute are plugins behind published contracts. Mix them per repo. ## Side by side Based on each product's publicly documented behaviour. ModernCI's column describes the design; it is pre-launch, so read every entry as intent unless it says otherwise. If we got an entry wrong, tell us and we will fix it. | | GitHub Actions | GitLab CI | CircleCI | Buildkite | ModernCI | |---|---|---|---|---|---| | Merge queue | Built-in merge queue; checks run on its merge group | Merge trains | Reports checks; landing is your forge's job | Reports checks; landing is your forge's job | Built into the CI engine: batching and bisect, plus exact reuse and a cost receipt per PR (In development) | | Run a command on remote compute | Trigger a workflow | Trigger a pipeline | Trigger a pipeline | Trigger a build | `mci run ` from a laptop or agent (In development) | | Add your own machine | Install the runner app and register it with a token; autoscaling is separate tooling | `gitlab-runner register`; autoscaling through executors | Install a self-hosted runner with a token | Install the agent with a token; you run the fleet | `mci runner up`; outbound only; goal under 60 s (In development) | | Who earns from your hardware being easy | Hosted runner minutes are a paid product | Hosted runner minutes are a paid product | Hosted compute is a paid product | Hosted agents are a paid product | Bring your own compute is the default path and costs $0 from us; ModernCI-provided compute is an optional add-on | | Shell into a failed job | None built in; third-party actions relay through a public server | Web terminal for running jobs on self-managed runners; needs an inbound address | Rerun with SSH | None built in; SSH into your own agents | Outbound only, recorded, secrets withheld (Coming) | | Why is it red | Annotations from problem matchers | Test report widget | Test results and insights | Test analytics, a separate product | One card with the diff against the last green run (In development) | | Cost per PR | Billing and usage reports | Usage reports | Usage reports | Usage reports | Shown on every PR, check and runner; budgets (In development) | | Agents | API and webhooks | API and webhooks | API and webhooks | API and webhooks | `mci mcp`; reds delivered to the agent (In development) | | Signing and provenance | Artifact attestations (Sigstore, SLSA provenance) | ID tokens; Sigstore keyless signing | OIDC tokens | OIDC tokens | Same model; provenance signed by the platform; SLSA Build L3 is the goal for builds on ModernCI builders; builds on your own machines are L2 (In development) | | Forge and compute | Built around GitHub | Built around GitLab | Works with your forge | Works with your forge | Plugins: GitHub, GitLab, Forgejo, plain git (In development) | GitHub's artifact attestations are the model for our signing. Credit where it is due. ## A merge queue vs the whole pipeline Other queues decide when your PRs merge. ModernCI is the whole pipeline — queue, CI and your compute — billed per PR that lands. | | Merge queue (e.g. Mergify) | ModernCI | |---|---|---| | Merge queue (batching, bisect, parallel lanes for unrelated changes) | ✓ | ✓ (In development) | | Runs the builds and tests | ✗your CI vendor does | ✓ (In development) | | Compute | ✗bought from your CI vendor | ✓your own machines, placed by ModernCI (In development) | | Flaky-test and CI analytics | ✓from other vendors’ results | ✓from runs it did itself (In development) | | Signing, provenance, release | ✗ | ✓keys generated by ModernCI, Sigstore and SLSA provenance, OpenPGP repo signing, publish everywhere (In development) | | Forges | GitHub | GitHub, GitLab, Forgejo (In development) | | Bill | per seat, plus your CI bill and compute | planned: per landed PR (billing is Coming), plus the compute you already own | Mergify is a proven GitHub merge queue; credit where it’s due. ModernCI also runs the checks. ## Where the others are ahead - **Ecosystem.** Actions has a marketplace for nearly everything. ModernCI has none and is not pretending to. - **Maturity.** These products have years in production. ModernCI is pre-launch. - **One platform.** If you want code, issues and CI in one place, GitHub or GitLab already give you that. - **Deliberately not built.** A general workflow DAG engine. ModernCI runs checks and a landing flow, not arbitrary pipelines of pipelines. ModernCI works alongside your forge, so you can adopt it for landing and runners first and keep the rest. ## Judge it on your own repo Start in shadow mode next to your current CI. [Sign in](https://app.modernci.dev/sign-in) · [Migration plan](/migration.md) ================================================================================ --- title: "How ModernCI makes every PR faster" description: "ModernCI runs the checks itself, so exact reuse, test selection, verified fixes, batching and flaky-test handling make every PR land sooner, and it costs less as it learns. Every PR shows what it saved." url: https://modernci.dev/savings/ --- Faster PRs # Every PR, faster. ModernCI runs the checks itself, so it reuses proven results, picks the tests that matter and verifies fixes. It costs less as it learns. [Sign in](https://app.modernci.dev/sign-in) · [Pricing](/pricing.md) (In development)Early access · pre-launch > Example receipt for PR 412: saved $1.20 of compute; ModernCI fee $0.06; landed in 9 minutes, against 31 minutes alone. Saved by reuse, test selection and batching. Example, not a measurement. Every landed PR will show its own receipt. ## Speed first, never by cutting corners - **Faster:** less queue time, fewer runs, reds found sooner. - **Costs less as it learns:** the same proof from less compute. - **Never by cutting corners:** required checks always run in full on the exact tree that lands. ## Only possible when you run the checks A queue-only tool sees pass or fail. ModernCI sees every input and result, and none of this skips a required check. ### Exact result reuse (In development) Only when the inputs are identical: same tree, toolchain, image and secrets scope. Then the proven result is reused, not run again. ### Learned test selection (Coming) ModernCI learns from your run history, so likely failures run first and reds show up sooner. Tests are skipped only where proven safe, and never in a required check. ### Verified fixes (Coming) Automatic fixes for formatting, lint and lockfiles; your agent proposes the rest. ModernCI re-runs the checks on every fix before it can land. ### A receipt on every PR (In development) Measured time and cost for each landed PR, next to what it would have cost alone, with the reasons. ## The merge-queue basics, included What you would expect from any good merge queue, built into the same engine. ### Batching with bisect (In development) Standard on the [merge queue](/merge-queue.md). ### Flaky-test handling (In development) Flaky tests never block you; [how](/merge-queue.md#flakes). ### Pipelining (Coming) The next batch starts before the last one finishes. Plus what a queue alone does not cover: any forge, your own runners, platform signing and [build and release](/build.md). ## The honesty rules - **We never skip required checks.** Savings come from running less redundant work, never from proving less. - **Every landed tree is verified.** The exact tree that lands has passed every required check. - **Bisect reruns and retries are subtracted.** A receipt counts what batching cost as well as what it saved. (In development) - **Net savings are shown even when negative.** If running alone would have cost less, the receipt says so. (In development) - **First measurement, with its caveats.** On ModernCI’s own repo, over about five hours with one tenant and 148 PRs, we spent $12.17 and standard CI (GitHub Actions, 8-core runners, every check on every head, no reuse, no batching) would have cost $83.07. That is **6.8× cheaper**. About half of that saving came from checks that never started during a burst of 109 held PRs; excluding it, the figure is **3.9×**. Against a hand-tuned standard setup (only the checks that ran, no batching) it is **2.0–2.7×**. The traffic was a synthetic flood on one repo, so a real team’s numbers will differ. Other figures on this page are still labelled Example or Target. ## You pay only for PRs that land And each one shows what it saved. [Sign in](https://app.modernci.dev/sign-in) · [Pricing](/pricing.md) ================================================================================ --- title: "Runners: any machine in your compute pool with mci runner up" description: "Bring your own compute. mci runner up registers any machine; ModernCI places work across your Macs, servers, GPUs and clouds." url: https://modernci.dev/runners/ --- Bring your own compute # Your machines. One command. `mci runner up` turns a server, a Mac or a GPU box into a runner, outbound only. ModernCI places work across all of it. [Sign in](https://app.modernci.dev/sign-in) · [Runner docs](/docs/runners.md) (In development)Early access · pre-launch > Illustrative: a new server installs mci, runs mci runner up, connects outbound and receives its first job. Illustrative mock, not a real run. ## From a new server to a runner Goal: under 60 seconds on any new server. (Target) (Measured) 14 s median (18 s worst of 10) from `curl | sh` to a finished first job — Apple silicon Mac, 20 Mbit/s download, local test region, with a pre-release installer. The public installer at get.modernci.dev is (Coming); a remote-region measurement is too. [Method](/docs/runners.md#time-to-first-job) - **Outbound only.** A long-poll to your region. No inbound ports, so it works behind NAT. - **A real service.** systemd, launchd or Windows Service. Drain, deregister and status are commands. - **Capabilities, not labels you invent.** The runner reports OS, architecture, CPU, memory, GPU and your labels. Checks say what they need; ModernCI matches. - **Signed auto-update.** The runner is the same signed `mci` binary. (In development) - **Linux, macOS and Windows,** on x86_64 and arm64. ## Gets smarter with every PR You register your Macs, servers, GPU boxes and your own cloud accounts. ModernCI learns from every run and picks where each job goes by matching capabilities and weighing speed, cost and load. (In development) ### Free machines fill first Hardware you already own costs nothing extra, so it goes first. ### Your cloud spills over only when allowed (Coming) You choose per class of work whether overflow may go to a cloud account, and under what budget. ### Every decision has a plain-English reason "Waiting for a runner: your Macs are all in use." No internal jargon. ## One live Compute screen (In development) The console shows all your compute in one place: every registered runner and cloud account, with health, capabilities, live jobs, utilisation and cost, plus the reason for every placement. **Compute**Mock data · last 1 h · 6 registered | Name | Health | Capabilities | Live jobs | Utilisation | Cost | Why work was placed here | |---|---|---|---|---|---|---| | mac-build-3 | (Healthy) | macos arm64 8cpu | 2 | 71% | $0.00 | Only free machine with `macos` and `arm64`. | | build-box-1 | (Healthy) | linux x86_64 32cpu | 5 | 88% | $0.00 | Free, and fastest for this check right now. | | gpu-rig | (Draining) | linux x86_64 gpu | 1 | 40% | $0.00 | Finishing its last job. No new work. | | dev-laptop-pool | (Offline) | linux arm64 4cpu | 0 | – | $0.00 | Not reachable since 09:12. | | your-cloud-a | (Healthy) | linux x86_64 64cpu | 0 | 0% | $0.00 | Not used: free machines have room. | | your-cloud-b | (Healthy) | linux arm64 16cpu | 3 | 55% | $1.14 | Spill-over allowed for `e2e`. Waiting for a free x86_64 machine would be slower. | A static mock with made-up data, to show the design. The screen is in development. ## Self-hosted runners, without the chores Self-hosted runners on the big platforms work, but you carry the cost of making them work: - Each runner is installed, registered with a token and kept up to date by you. - Scaling them up and down is a separate project, often a separate tool. - Persistent hosts need care so one job cannot affect the next. - The platform's own runner minutes are a paid product, so there is little pull toward making your hardware effortless. GitLab's runner registration is a fair model, and we learned from it. What ModernCI does, as designed: - **Isolation.** Each job runs as a separate low-privilege user, in a container or microVM where available, with the workspace wiped. (In development) - **Policy per runner.** You decide which projects and branches may use it. Fork and untrusted PRs are off by default. - **Metering.** Your own runner costs $0 from ModernCI and is still metered, so you can see what it saves. - **Laptops never satisfy CI.** A personal machine's results are visible only to its owner and never count as a CI result. - **Compute is a plugin.** SSH and local pools today. Cloud accounts you own, more clouds and macOS hosts are (Coming) ## Plug in the first machine Get the binary, register it, and watch it appear on the Compute screen. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "mci run: compute on demand from your laptop or agent" description: "Run any command on a clean machine from your laptop or agent. Streams like local; results reused in CI." url: https://modernci.dev/run/ --- $ mci run # Any command. Any machine. On demand. Run tests, builds or a fuzzer on a clean, right-sized machine from your laptop or your agent. Output streams as if it were local. [Sign in](https://app.modernci.dev/sign-in) · [Install the CLI](/docs/install.md) (In development)Early access · pre-launch > Illustrative: mci run --on 32cpu cargo test is placed on a free 32-CPU machine, streams the test output, and finishes in 48 seconds. Illustrative mock, not a real run. - **Any command.** Not a workflow file you have to push. Tests, builds, a migration dry run, a fuzzer. - **Local and remote feel the same.** Streamed output works today. Forwarded ports and `mci repro`, to reproduce a CI failure locally, are (Coming). - **Reuse, with trust rules.** Today a remote `mci run` never satisfies a CI check, so CI runs its own proof. Letting a green run on a trusted pool count toward CI, so identical inputs are not run twice, is (Coming). Results computed on a laptop will never satisfy a CI gate. - **Your machines first.** It runs on the compute pool you registered, and spills over only where you allow it. $0 when idle. - **Agents too.** Over MCP, agents will run and verify a patch before pushing ([agents](/agents.md)). (Coming) ## The honest limits - Fast never weakens correct. Merge-queue gates still run the full declared checks on the exact tree that will land. `mci run` results speed up advice and reuse; they do not skip gates. - Every cost is shown. Runs count against the budget you set. - Not released. The command surface may change before launch. ## Try it when early access opens up Sign in to the console, or read how the pieces fit together. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Agents: ModernCI is an MCP server for your coding agents" description: "ModernCI is an MCP server: Claude Code, Codex and Cursor push, get reds they can act on, have fixes verified and land PRs. ModernCI has no AI of its own; it is the CI your agents use." url: https://modernci.dev/agents/ --- MCP server # Your agents talk to CI over MCP. ModernCI has no AI of its own. It’s the CI your AI agents use: they push, ModernCI checks, explains reds in a form agents can act on, verifies their fixes, and lands the result. [Sign in](https://app.modernci.dev/sign-in) · [Connect an agent](#connect) (In development)Early access · pre-launch > Illustrative: an agent submits a branch over MCP, gets a red with the reason, reads the log, pushes a fix, and ModernCI verifies and lands it. Illustrative mock, not a real run. ## Connect in one command ModernCI is an MCP server. Point your agent at it with `mci mcp`, or use remote MCP over HTTPS with no CLI at all. ### Claude Code ```sh claude mcp add modernci -- mci mcp ``` ### Codex ~/.codex/config.toml ``` [mcp_servers.modernci] command = "mci" args = ["mcp"] ``` ### Cursor.cursor/mcp.json ``` { "mcpServers": { "modernci": { "command": "mci", "args": ["mcp"] } } } ``` ### Remote MCP over HTTPS (Live) No CLI needed: point any MCP client at your region’s `/mcp` endpoint with an agent token. ``` claude mcp add --transport http modernci \ "$MCI_URL/mcp" \ --header "Authorization: Bearer $MCI_TOKEN" ``` Set `MCI_URL` to your region’s URL from the console. ### Set up every agent at once (Built, release coming) `mci agents install` finds Claude Code, Codex and Cursor on your machine and writes their MCP config. Agent Skills bundles for all three teach your agent the loop: push, read the receipt, fix reds. ```sh mci agents install ``` `mci mcp` (the stdio bridge) and `mci agents install` are built; the client download is coming. Remote MCP over HTTPS works on the pre-launch service today. ## MCP tools Every tool is also in the REST API, and most are in the CLI. Full reference: [MCP tools docs](/docs/mcp.md). | Tool | What an agent does with it | CLI | Status | |---|---|---|---| | `queue_status` | List PRs with their status and wait reason | `mci prs list` | (Live) | | `done` | Submit a pushed branch as a PR and leave | `mci prs done` | (Live) | | `my_work` | My open work: reds, conflicts, approvals | `mci work` | (Live) | | `claim` | Claim a work item | `mci work claim` | (Live) | | `report` | Report progress and agent spend | REST only | (Live) | | `ask` | Ask a person a question about a work item | REST only | (Live) | | `release` | Let go of a claimed work item | `mci work release` | (Live) | | `dequeue` | Take my PR out of the merge queue | `mci prs dequeue` | (Live) | | `why_left_queue` | Why a PR left the merge queue | `mci prs why-left` | (Live) | | `activity` | Activity log of a PR: pushes, checks, approvals, queue exits | `mci prs activity` | (Live) | | `pause_request` | Ask a person to pause or resume runs in a project | `mci request pause` | (Live) | | `config_check` | Check.ci files: schema errors with file and line | `mci config check` | (Live) | | `config_simulate` | What a.ci change would run, and whether it changes the gate | `mci config simulate` | (Live) | | `savings` | Spend, waste and agent spend for a project | `mci savings` | (Live) | | `watch` | Stream my events with replay from a sequence number | `mci watch` | (Live) | | `log` | Read a run's log | `mci log` | (Live) | | `promotions` | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | `mci promotion list` | (Live) | | `promotion_status` | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | `mci promotion status` | (Live) | | `ack` | Acknowledge my events up to a sequence number | `mci ack` | (Live) | | `why_red` | The why-red card: computed from your logs and the last green run | – | (Coming) | | `run` | Run a command on your compute before pushing | – | (Coming) | | `verify_patch` | Run the pre-checks on a patch before pushing | – | (Coming) | | `debug_exec` | Run bounded commands in a kept environment, where the tenant allows it and the job had no secrets | – | (Coming) | ## Trusted with the work, not the keys - **Reds come to the owner.** Failure, repro, log excerpt and diff, delivered to the agent that owns the PR, on a durable stream it can replay after a disconnect. - **Your agent proposes, ModernCI verifies.** A fix lands only after ModernCI re-runs the checks on it; applying a fix automatically under your policy is (Coming). - **People approve.** Agents cannot approve. Their changes to guarded paths always wait for a person’s passkey approval. - **Agents never take a seat (planned).** Their spend is counted today, so cost per landed PR includes it. Seats and billing are (Coming). ## Try it when early access opens up Sign in to the console, or read how the pieces fit together. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Merge queue: every push, landed green" description: "A merge queue for every push your team and agents make, all day: batching, bisect, reuse and flaky-test handling, with the checks run by ModernCI itself." url: https://modernci.dev/merge-queue/ --- Merge queue # Every push, landed green. A merge queue for every push your team and agents make, all day. Batching, bisect and flaky-test handling come as standard, and ModernCI runs the checks itself. [Sign in](https://app.modernci.dev/sign-in) · [How PRs get faster](/savings.md) - **Hundreds of PRs landed per hour, per repo** (Target) (In development)Early access · pre-launch > Illustrative: a batch of four PRs goes red, bisect finds the culprit, three land on main and the fourth goes back to its author. Illustrative mock, not a real run. ## How it lands - **Merge exactly what was checked.** A PR lands only on checks run against the current tip, with current approvals. - **Batches.** Several PRs are tested together. If the batch is red, bisect finds the culprit; the rest land. - **The target stays green.** A red target never blocks a merge into it, and a test that also fails on the target is not charged to the PR. - **Reuse.** Results are reused when nothing relevant changed ([how](/savings.md)). - **No cap on PRs in the queue.** Work is bounded by real compute and your budget. Agent sessions do have rate, budget and loop limits. - **Promotions.** `branch → dev → qa → main → released`, through the same engine. ``` #412 red test failed on line 88. Author to fix. #409 approval changes a guarded path; owner to approve #407 waiting waiting for a runner: all in use #405 in queue batch 2, checks running #401 landed on main ``` Illustrative. Every wait reads like a sentence a developer would write. Every feature can be switched off safely. With the merge queue off, a PR still lands alone, after its own checks run on the current tip. Plain git works as a forge too. ## Flakes, handled with evidence (In development) - A failing test is re-run alone. If it passes on identical inputs, that is evidence of a flake. - Flaky tests are re-checked with evidence: they never block you, and never hide a real failure. - A new flake that a PR touched goes back to its author with both logs. - **Verified fixes (Coming).** Automatic or from your agent, re-checked before they land ([how](/savings.md)). Target: at least 95% of flaky failures labelled before they reach an author, with 0 known flakes charged to authors. (Target) ## Cost follows speed You pay per landed PR, and every PR’s receipt shows what it saved. [How PRs get faster](/savings.md) · [Pricing](/pricing.md) ## Try it when early access opens up Sign in to the console, or read how the pieces fit together. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Build & Release: land it, build it, sign it, ship it" description: "ModernCI builds your release on the right machines, signs it with keys it generates itself (Sigstore, SLSA provenance, OpenPGP) and publishes to Homebrew, APT, DNF, winget, npm, crates.io and OCI. Early access." url: https://modernci.dev/build/ --- Build & Release # Land it, build it, sign it, ship it. The engine that lands your PR builds the release, signs it with keys it generated itself, and publishes it everywhere your users install from. [Sign in](https://app.modernci.dev/sign-in) · [Verify a download](#verify) (In development)Early access · pre-launch > Illustrative: release 1.4.0 is built for four platforms, signed with Sigstore, SLSA provenance and OpenPGP, published to seven channels and install-tested. Illustrative mock, not a real run. ## Before and after Merge queues and runner services stop at a green check. ModernCI carries the same commit through build, signing and publishing. ### Today: GoReleaser on Actions - A release workflow to write and maintain in every repo - GPG and cosign private keys pasted into CI secrets, readable by any job that asks - Rotation done by hand, or not at all - Provenance produced by the same job that ran your code - A script per channel: Homebrew, APT, winget, npm, and so on ### ModernCI: one declared key - Declare the key; ModernCI generates it in its signer and keeps it non-exportable by default. Scheduled rotation is (In development) - No private key ever reaches a job, a log, a laptop or a person - Provenance generated and signed by the platform, not the job - Every channel published, then install-tested; a release is done only when every channel passes (Coming) ``` # Example extends: ci.yaml release: sign: keys: repo: { kind: openpgp, generate: true, rotate: 90d } publish: [homebrew-tap, apt, dnf, winget, npm, crates, oci] ``` Example config. Adding or changing a declared key is a guarded change, approved once by a project admin with a passkey. - **Signing.** Sigstore signatures, Rekor entries and SLSA provenance, plus OpenPGP for package repositories, key files or your KMS. (In development) - **Publishing.** Homebrew, APT, DNF, pacman and apk repositories signed by ModernCI, winget, Scoop, npm, crates.io, PyPI, OCI registries, GitHub and GitLab releases. (Coming) - **Placement.** Release builds go to machines with the right OS and architecture, your own first. (In development) - **Reuse.** The same inputs give the same artifact, so an unchanged build is reused, never rebuilt. Optionally verify reproducibility. (In development) - **Versions and notes from commits.** Release notes come from the PRs that landed. (In development) ## Anyone can verify a download Every artifact carries a sha256, a signature and SLSA provenance. Releases are signed with a key held by the signer; Sigstore signatures and Rekor transparency-log entries are (In development). Check them with our CLI or, once the Sigstore bundle ships, with stock Sigstore tools. ``` $ mci attestation verify ./app-linux-x86_64.tar.gz ✓ sha256 matches the signed release manifest ✓ signature valid; transparency-log entry found (once Sigstore ships) ✓ SLSA provenance: built by ModernCI from a landed main commit ``` Illustrative output. The command is in development. Prefer stock tools? For a file you downloaded, once the Sigstore bundle ships, Sigstore’s own CLI checks the provenance (use `verify-blob-attestation`; `verify-attestation` is for container images): ``` $ cosign verify-blob-attestation \ --bundle app-linux-x86_64.tar.gz.sigstore.json \ --type slsaprovenance1 \ --certificate-identity-regexp '' \ --certificate-oidc-issuer https://oidc.modernci.dev \ ./app-linux-x86_64.tar.gz ``` ModernCI releasing itself this way, every channel signed and published by ModernCI, is the acceptance test. (In development) [Signing and provenance](/security.md) ## Ship from the engine that landed it One pipeline, from push to a signed release. [Sign in](https://app.modernci.dev/sign-in) · [Release config](/docs/config.md#release-steps) ================================================================================ --- title: "Security and signing: Sigstore, SLSA provenance, residency" description: "Sigstore keyless signing, platform-generated SLSA provenance, verifiable artifacts and regional data residency." url: https://modernci.dev/security/ --- Security # Separate keys. People approve. Every process holds only the key it needs, no signing key is reachable from a job, and guarded changes need a person’s passkey. [Sign in](https://app.modernci.dev/sign-in) · [Security model](/docs/security.md) (In development)Early access · pre-launch > Illustrative: the engine holds a read-only forge key, the landing process the landing key, the signer the release key; jobs get only their own secrets; agents cannot approve. Illustrative mock. ## Job identity ### ModernCI is an OIDC provider for jobs (In development) Short-lived, audience-scoped tokens say exactly which repo, ref, commit, check and run a job is. Use them for cloud federation without stored secrets. [OIDC docs](/docs/oidc.md) ### Signing and provenance Releases are signed by the platform, never by the job. How it works, and how to verify a download: [Build & Release](/build.md). ## Trust by design - **ModernCI signs everything itself.** Repo keys are generated on the server from your declared config, stored non-exportable, and only the public half is ever published. Nothing to leak from a laptop or a log. (In development) - **A light client, a separate server.** The `mci` client you install holds no server code. First-party plugins are compiled in. Third-party extensions, from a signed and sandboxed catalogue, are (Coming). - **Approvals are people.** Guarded paths need an owner's passkey approval, tied to the exact commit. Agents never approve. - **Secrets withheld** from unapproved CI and from debug sessions by default. (In development) Secrets cannot be written yet, and debug sessions do not exist yet. - **Tenant isolation** of runners, caches and secrets, with a tenant on every row, key and log. ## Regions and residency (Live: one region) - **One region is live; more are coming.** The region list is served by the live service today. - **Regions are data.** Each region registers itself. The console and CLI read the list at run time. Any set works: one region, two, or a single-country project. - **Sign in once.** A global layer handles identity and routing, with no tenant content. The console talks to your region's API directly, so your data does not pass through another region. - **You choose where it lives.** Store, logs and blobs are pinned per project. - **Regions from code.** Regions and disaster-recovery peers are provisioned from code, the same way every time. - **SaaS, or Enterprise self-install,** with the same UI and behaviour either way. ## Reporting a vulnerability - Email [hello@modernci.dev](mailto:hello@modernci.dev?subject=Security) (subject: Security) with what you found and how to reproduce it. Please do not open a public issue. - We acknowledge reports, keep you informed while we fix them, and credit you if you wish. - Good-faith research that avoids privacy violations, data destruction and service disruption is welcome. Machine-readable contact: [security.txt](/.well-known/security.txt). ## Try it when early access opens up Sign in to the console, or read how the pieces fit together. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Migration: from GitHub Actions and GitLab CI to ModernCI" description: "Import your GitHub Actions or GitLab CI config and run ModernCI in shadow mode before switching. Goal: ten minutes." url: https://modernci.dev/migration/ --- Migration # Keep your forge. Switch when ready. Import your GitHub Actions or GitLab CI config, run next to your current CI, and switch when you trust it. [Sign in](https://app.modernci.dev/sign-in) · [Migration docs](/docs/migration.md) (Coming)Early access · pre-launch > Illustrative: mci import reads GitHub Actions workflows, writes .ci files, flags two steps to finish by hand, and starts in shadow mode. Illustrative mock, not a real run. - **1. Connect your forge.** GitHub, GitLab, Forgejo or plain git. Sign in at the console. - **2. Import.** Importers turn GitHub Actions and GitLab CI config into ModernCI checks, and infer inputs so work is reused. - **3. Run in shadow.** Each new check can report without blocking today. Shadow for a whole repo, next to your current CI, is (In development). - **4. Switch.** Make ModernCI the required check, then turn the old pipeline off. ``` $ mci import github-actions # planned command name; may change $ git add .ci/ && git commit -m "Add ModernCI checks" ``` Illustrative. Importers are planned. Checks live in your repo under `.ci/`. ## What carries over, and what does not - **Carries over:** your commands, your tests, your toolchain. ModernCI has no language-specific engine code. - **Wrappers:** a GitHub Action and a GitLab component that call `mci`, so you can adopt in steps. (Coming) - **Does not carry over:** marketplace actions that exist only on one platform, and complex workflow graphs. ModernCI deliberately has no general workflow DAG engine. The importer will tell you what it could not convert. ## Start in shadow mode Nothing changes for your team until you decide. [Sign in](https://app.modernci.dev/sign-in) · [Get the CLI](/download.md) · [Why ModernCI](/why.md) ================================================================================ --- title: "Get the mci CLI: ModernCI" description: "ModernCI runs in the cloud; there is nothing to host. mci is the optional light client for running commands, adding runners and connecting agents. Planned; nothing is published yet." url: https://modernci.dev/download/ --- The mci CLI # Nothing to host. One small CLI. ModernCI runs in the cloud: sign in and connect your forge. The optional `mci` client runs commands, adds runners and connects agents. [Sign in](https://app.modernci.dev/sign-in) · [Install the CLI](#install) (Coming)Early access · pre-launch > Illustrative: install mci with Homebrew, verify it, sign in, and run a command on remote compute. Illustrative mock, not a real run. ## What `mci` is for Tiny and invisible: a single signed binary, with nothing running in the background unless you register a runner. - **2.4 MB binary** - **2.3 MiB RAM** for `--version` - **3.4 MiB** for a typical CLI call - **Idle runner: 4 MiB, 1 thread, 0% CPU** (Measured) on Apple silicon, Nov 2026. [Method](/docs/install.md#footprint) ### `mci run ` Run any command on your compute, on demand. [mci run →](/run.md) ### `mci runner up` Turn this machine into a runner in seconds. Bring your own compute. [Runners →](/runners.md) ### `mci mcp` Connect your coding agents to checks, reds and logs. [Agents →](/agents.md) ### `mci import` Bring over an Actions or GitLab CI setup. [Migration →](/migration.md) ## Install (Coming) This shows the planned distribution. Names and commands are provisional, and none of them work yet. Pick your system. If JavaScript is on, we highlight the one we detect. ### macOS Apple silicon and Intel. Needs macOS 12 or later. ```sh brew install modernci/tap/mci ``` ```sh curl -fsSL get.modernci.dev | sh ``` The client needs macOS 12 or later. ### Linux x86_64, arm64, armv7 (static musl) ```sh curl -fsSL get.modernci.dev | sh ``` Also APT, DNF, pacman and apk repositories signed by ModernCI, plus Snap, Nix,.deb,.rpm and a static tarball. ### Windows x86_64 and arm64 ```sh winget install modernci.mci ``` ```sh scoop install mci ``` Also Chocolatey and a portable.zip. ### Anywhere else Containers, agents and CI An npm shim for agent sandboxes, a multi-arch container image and a GitHub Action. (Coming) ## Verified by ModernCI signatures We do not use Apple or Windows code-signing certificates, so your system may warn about a direct download. Instead, every release is signed by ModernCI and published with checksums. The install script checks the signatures and checksums before it installs anything, and `mci self-verify` checks a downloaded release yourself. Package repositories are signed with OpenPGP. [Verify a download yourself](/build.md#verify). The `mci` CLI is the only download. Running ModernCI in your own environment? [Enterprise](/pricing.md#enterprise) ================================================================================ --- title: "Pricing: pay per landed PR. Bring your own compute." description: "ModernCI pricing: you only pay when a PR lands. Free, Pro, Team and Enterprise (SaaS, or self-installed for Enterprise). Your own compute is included." url: https://modernci.dev/pricing/ --- Pricing # Pay per PR that lands. Failed attempts, retries and agents never cost you. Bring your own compute is included on every plan. [Sign in](https://app.modernci.dev/sign-in) · [Compare plans](#plans) (In development)Early access · pre-launch > Example invoice for the Team plan: 8,412 landed PRs within the 10,000 included; failed attempts, retries, agents and your own runners cost nothing; total $500. Example invoice with made-up numbers. ## Plans ### Free **$0** - 100 landed PRs / month - 5 seats - Unlimited agents - Bring your own compute - Need more? Pro is $50 ### Pro **$50** / month - 1,000 landed PRs included - $0.06 / extra PR - 15 seats, then $5/seat (max 50) - Unlimited agents - Bring your own compute ### Team **$500** / month - 10,000 landed PRs included - $0.03 / extra PR - 50 seats, then $5/seat - Unlimited agents - SSO and audit export (Planned) - Bring your own compute ### Enterprise **Custom** - Volume pricing - Unlimited seats - Unlimited agents - SCIM (Planned) - SaaS or self-install - Dedicated region (Planned) - Data residency - SLA (Planned) ## Every PR shows what it saved next to what it cost. [How PRs get faster →](/savings.md) > Example receipt for PR 412: saved $1.20 of compute; ModernCI fee $0.06; landed in 9 minutes, against 31 minutes alone. Saved by reuse, test selection and batching. ## What it replaces Other queues decide when your PRs merge. ModernCI is the whole pipeline — queue, CI and your compute — billed per PR that lands. ### A typical stack - A merge queue, billed per seat - CI orchestration or runner minutes, billed separately - Compute, bought again on top ### ModernCI - Queue, CI and orchestration of your own compute, in one engine - One bill, per landed PR (billing itself is (Coming); usage is metered today) ### What counts A PR that ModernCI lands on its target branch. Pushes, failed attempts, retries and PRs that never land are free, within fair use. ### Seats are people (Coming) Seats are for people who sign in and approve. Agents never take a seat, on every plan. Seats and billing are coming; usage is metered today. ### Your compute is yours (Built, release coming) Bring your own compute is included: runners you register cost $0 from us. ModernCI-provided compute, macOS and GPU pools, extra regions, DR and long retention are optional add-ons, priced separately. ### Budgets are hard stops (In development) Set them per project. Nothing spends past them. Cost per landed PR on the console is in development. **Startups and open source:** credits are available by application, and the console form is (Coming). We will review every application. **Access is by request.** Self-serve sign-up is (Coming). For now, access is by invitation: sign in if you have one. ModernCI is in early access. Prices are planned and may change before general availability. (Coming) [Sign in](https://app.modernci.dev/sign-in) · [Why ModernCI](/why.md) ================================================================================ --- title: "ModernCI docs: ModernCI docs" description: "Documentation for ModernCI: install the CLI, configure checks, connect agents, use the API and understand the security model." url: https://modernci.dev/docs/ --- # ModernCI docs ModernCI is a cloud service: contact hello@modernci.dev for access, then sign in at https://app.modernci.dev and host nothing. These docs cover the optional `mci` client, your `.ci/` config, agents, the API and the security model. ModernCI is pre-launch; each page says what is built and what is coming. ## Get started - [Install the CLI](/docs/install.md): Install the optional mci client on macOS, Linux or Windows, and verify it (coming). - [Quickstart](/docs/quickstart.md): From sign-in to a first PR landed by ModernCI. - [Concepts](/docs/concepts.md): PRs, targets, the merge queue, checks, runs, regions and processes, in plain words. ## Configure - [.ci config reference](/docs/config.md): The .ci/.yaml and .ci/repo.yaml files: checks, inputs, promotions and release steps. - [Runners](/docs/runners.md): Bring your own compute with mci runner up: placement, trust and isolation (coming). - [Migration](/docs/migration.md): Move from GitHub Actions or GitLab CI with an importer and shadow mode (coming). ## Agents and API - [Agents](/docs/agents.md): How agents connect, submit work and get their reds. - [MCP tools](/docs/mcp.md): The MCP tools agents can call today, and the ones that are coming. - [CLI reference](/docs/cli.md): Every mci command available today, and the client commands that are coming. - [REST API](/docs/api.md): Every REST operation, its path and its auth; OpenAPI at /openapi.json. ## Security - [Security model](/docs/security.md): What ModernCI guarantees, which process holds which key, and how to verify it. - [Job identity (OIDC) and signing](/docs/oidc.md): Short-lived job tokens for keyless signing and cloud federation. ## Enterprise - [Enterprise self-install](/docs/self-hosted.md): Run ModernCI in your own environment, licensed and delivered directly by ModernCI. ## For machines - [/llms.txt](/llms.txt) and [/llms-full.txt](/llms-full.txt) - [/openapi.json](/openapi.json) and [/pricing.json](/pricing.json) - Every page has a Markdown twin: add `.md` to its path, or send `Accept: text/markdown`. ================================================================================ --- title: "Install the CLI: ModernCI docs" description: "Install the optional mci client on macOS, Linux or Windows, and verify it (coming)." url: https://modernci.dev/docs/install/ --- # Install the mci CLI > **Status: coming.** Nothing below is published yet. Names and commands are provisional. ModernCI runs in the cloud, so there is nothing to host. Access is by invitation for now (an operator creates your tenant; self-serve sign-up is coming). Sign in at https://app.modernci.dev and connect your forge. The `mci` client is an optional helper for your laptop, your machines and your agents. ## What the client does | Command | What it is for | |---|---| | `mci run ` | Run any command on your compute, on demand. | | `mci runner up` | Turn this machine into a runner. Bring your own compute. | | `mci mcp` | Connect your coding agents (stdio MCP bridge). | | `mci import` | Import GitHub Actions or GitLab CI config. | The client needs macOS 12 or later on a Mac. It is a single signed binary with nothing running in the background unless you register a runner. It is the only thing you download: the ModernCI server is never downloaded by users. ## Footprint Measured on Apple silicon (aarch64 macOS), November 2026: | What | Measured | |---|---| | Binary size | 2.4 MB | | Memory for `mci --version` | 2.3 MiB | | Memory for a typical CLI call | 3.4 MiB | | Idle runner agent | 4 MiB memory, 1 thread, 0% CPU | Method: - **Build:** `cargo build -p mci --no-default-features --profile client` on aarch64 macOS (Apple silicon). - **Size:** the stripped binary, 2,374,928 bytes. - **Memory:** peak resident memory reported by `/usr/bin/time -l`: 2,352 KiB for `mci --version` and 3,504 KiB for a typical CLI call. - **CPU:** compared by instruction counts rather than wall time, because the machine was under other load. - **Idle runner agent:** registered with 4 slots and no job running, then observed: 4,080 KiB resident, 1 thread, 0% CPU. Numbers on other platforms will differ; we will publish them as we measure them. ## Install | System | Command | |---|---| | macOS (Homebrew) | `brew install modernci/tap/mci` | | macOS and Linux (script) | `curl -fsSL get.modernci.dev \| sh` | | Windows | `winget install modernci.mci` or `scoop install mci` | | Node (agent sandboxes) | Coming | | Containers | Coming | On macOS the client needs macOS 12 or later. Also planned: APT, DNF, pacman and apk repositories signed by ModernCI, Snap, Nix, Chocolatey, `.deb`, `.rpm`, a static tarball and a portable `.zip`. ## Verify ModernCI does not use Apple or Windows code-signing certificates, so your system may warn about a direct download. Integrity never depends on them: every release is signed by ModernCI and published with a sha256 for each file, and the install script checks the signed release metadata, the signatures and the checksums before it installs anything. Package repositories (APT, DNF, pacman, apk) are signed with OpenPGP. To check a release you downloaded, run the client's own check. It verifies the whole chain, and that the binary and its archive are the ones the signed release names: ```sh mci self-verify --root-key ed25519:<64 hex> --keys keys.json --manifest \ --channel stable --timestamp timestamp.json --snapshot snapshot.json --archive ``` Release provenance can be checked with `mci attestation verify `. ## Update Updates are silent and signed, on stable, beta and nightly channels: `mci self-update`. Package-manager installs update through their package manager. ================================================================================ --- title: "Quickstart: ModernCI docs" description: "From sign-in to a first PR landed by ModernCI." url: https://modernci.dev/docs/quickstart/ --- # Quickstart: from sign-in to a landed PR This takes a repo from nothing to its first PR landed by ModernCI. It works the same on the hosted service and on an [Enterprise self-install](/docs/self-hosted.md); only the URL differs. Status today, so nothing here surprises you: | Piece | Status | |---|---| | Sign in with a passkey | works on the hosted service today | | Sign in with GitHub, Google, or email and password | built, but not turned on for the hosted service yet (passkey only today) | | Plain git remotes (any git host over SSH, including Gitea and Forgejo) | built and wired | | GitHub, GitLab and Gitea/Forgejo PR mirroring (status, comments) | built and wired per repo; push webhooks are not received yet, so ModernCI polls | | Self-service sign-up and tenant creation | coming (an operator creates your tenant today) | | `mci run` (run a check on demand) and `mci runner up` (register your machine) | built; the download is coming (Built, release coming) | | `mci mcp` (stdio bridge for agents) | built; the download is coming (Built, release coming). Agents use the HTTP endpoint today ([agents](/docs/agents.md)) | ## 1. Sign in Open the console (`https://app.modernci.dev` for the hosted service) and choose a method: passkey, GitHub, Google, or email and password. The operator decides which are on, and a method is offered only if it is configured. On the hosted service today that is the passkey only. Then pick your project; the console talks to the region that holds it. Signing in does not give you API access by itself. Your tenant admin creates an API token for the CLI and for agents: ```sh mci tokens create --tenant "$TENANT" --project "$PROJECT" --role agent \ --kind agent --name builder ``` The token is printed once. Put it in the environment, together with your region's URL: ```sh export MCI_URL=https://.modernci.dev export MCI_TOKEN=... mci me ``` Approving guarded changes always needs a passkey, whichever way you signed in. ## 2. Create the project and connect a repo A tenant admin (ModernCI creates the tenant and its first admin for you) runs: ```sh mci projects create --tenant "$TENANT" --name web mci repos add "$PROJECT" --name app --url "$REPO_URL" --targets '["main"]' ``` `--url` is the git remote ModernCI fetches from and lands to. `--targets` lists the branches that receive landings (default `main`). Writing secrets (`mci secrets put`) is in the API but answers "not implemented" today; configuration never holds secrets either way. ### What the git host must allow ModernCI lands by pushing a fast-forward with its own **landing key**. Give that key push access to the target branches, and make it the only key that can push to them (a protected branch whose push allow-list is the landing key). ModernCI checks this by pushing to a sentinel branch `mci/probe/`, which must carry the same protection. Everyone else pushes branches and opens PRs. A separate read-only key lets the engine fetch. | Host | Notes | |---|---| | Plain git / Gitea / Forgejo | Works today. PRs are branches pushed under `mci/`. The engine polls every 30 seconds (`MCI_REFRESH_SECS`); receiving push webhooks to skip the wait is coming. | | GitHub | Built and wired (GitHub App or token, PR mirroring, commit status `ci`). | | GitLab | Built and wired (project or group token, merge request mirroring). | ## 3. Add checks Checks live in your repo, one file per target branch. Commit this as `.ci/main.yaml` on `main`: ```yaml checks: build: run: make build test: run: make test needs: [build] ``` Everything about this file is in [config](/docs/config.md). Settings such as budgets and approvers are not in the repo; they are set in ModernCI. A new install starts **paused** so nothing runs before you are ready. The operator resumes it (`mci resume`; on the hosted service this is already done). You also need a compute connection before jobs can start: ```sh mci computes connect --tenant "$TENANT" --plugin local \ --provided_by modernci --config '{"slots": 4}' ``` ## 4. Push a PR and watch it land ```sh git switch -c mci/add-feature git commit -am "Add feature" git push origin mci/add-feature ``` A branch under `mci/` becomes a PR. If you pushed with a key ModernCI does not know it is *unclaimed*; submit it as yours: ```sh mci prs done --repo app --branch mci/add-feature --head "$(git rev-parse HEAD)" ``` Watch it: ```sh mci prs list "$REPO" # status and wait reason for each PR mci prs show "$PR" # diff, checks, logs, approvals, cost mci log "$RUN" # a run's log mci watch # your events: reds, landings, approvals needed ``` or open the PR page in the console. When every required check is green the merge queue batches it with other PRs, re-checks it on the current tip, and the landing process fast-forwards `main`. A red shows the failing check, a log excerpt and how to reproduce it. If you change `.ci/` in a way that changes what blocks landing, the PR waits for a person's passkey approval ([gate changes](/docs/config.md#gate-changes)). ## 5. Run a check yourself, and add your own machine (coming) `mci run ` (run a check on demand, locally or remotely) and `mci runner up` (enrol this machine as a runner) are planned and are not in this branch's `mci`. Until then, reproduce a red from the command in its `run:` line. ## Next - [Configuring checks](/docs/config.md) - [Agents over MCP](/docs/agents.md) - [Security and verification](/docs/security.md) - [Concepts](/docs/concepts.md) ================================================================================ --- title: "Concepts: ModernCI docs" description: "PRs, targets, the merge queue, checks, runs, regions and processes, in plain words." url: https://modernci.dev/docs/concepts/ --- # Concepts The words ModernCI uses, in the terms you already know. The status of each piece today is noted where it is not built yet. ## Code flow - **PR**: a proposed change to a target branch. It is a pull or merge request on a forge, or a branch pushed under `mci/` on a plain git remote. A PR pushed with no known author is *unclaimed* until someone claims it (`mci prs claim`) or submits it (`mci prs done`). - **Target**: a branch that receives landings, for example `dev` or `main`. Each target has its own merge queue and its own `.ci/.yaml`. - **Merge queue**: ModernCI re-checks PRs against the current target tip, in batches, and lands the ones that pass. A pre-check on the PR itself is advice; the queue is the judge. - **Landed**: the target branch now contains the PR's checked commit. A landing is a fast-forward by the landing process; it never rewrites history. - **Promotion**: a fast-forward of one target to a checked commit of another, for example `dev -> qa -> main`, configured with `promotes` in `.ci/` (see [config](/docs/config.md#promotion-targets)). - **Release**: a versioned, signed set of build outputs made from a landed `main` commit. See [Build & Release](/build/). ## Checks and results - **Check**: a named command in `.ci/.yaml`. It passes when it exits 0. - **Class**: `gate` checks block landing, `after` checks run on landed commits, `release` steps build and publish. A gate check can be `required` (default) or advisory. - **Job**: one execution of a check on one machine. **Run**: the record of one execution, with its log. - **Red**: a failed check with evidence (log excerpt, how to reproduce). **Infra failure**: the machine or network failed, not the code; it is never reported as a red. - **Reuse**: if a check's inputs (the files it reads, its command, its tools) are unchanged, ModernCI reuses the earlier result instead of running it again. `inputs:` narrows what a check reads. - **Baseline**: the tests already failing on the target. A PR is not blamed for a failure that was already there. - **Wait reason**: the one sentence on every open PR saying what it waits for, who acts and by when. The UI, the CLI, MCP and webhooks show the same text. - **Work item**: a task someone owns: fix a red, resolve a conflict, give an approval. Work items escalate from the owner to a person if left (see [agents](/docs/agents.md)). ## Guarded changes and approvals - **Gate change**: a PR that changes what blocks landing (a gate check, `setup`, `toolchain`, ...). It needs a person's approval and lands alone ([config](/docs/config.md#gate-changes)). - **Approval**: a person's decision on a guarded change, made with a **passkey**. The signature is bound to the PR's exact head commit and the guarded files, so a later push invalidates it. - **Settings**: budgets, who may approve, which forge and compute are allowed. They are set by people in ModernCI, never read from a file in the repo. Each setting has a value, a source level and possibly a lock. ## Tenancy - **Operator**: whoever runs the install (ModernCI, for the hosted service and for Enterprise self-installs). - **Tenant**: one customer organisation. **Project**: a group of repos with shared members and budgets. **Repo**: one git repository. - **Identity**: a person or an agent in a tenant, with a role (tenant admin, project member, agent, approver, ...). An API token belongs to one identity and is shown once when created. - **Region** and **residency zone**: where your project's data lives, and the jurisdiction it stays in. **Global layer**: sign-in and the console; it holds no repo data. - **Support access**: a tenant admin can let the operator in for a limited time, and revoke it. ## Compute - **Compute**: where jobs run. Today: SSH hosts and compute ModernCI manages for you. EC2, GCP, Azure and bring-your-own runners are coming. - **Runner**: the job-side agent that runs the command and reports the result. `mci runner up` (register your own machine) is coming. ================================================================================ --- title: ".ci config reference: ModernCI docs" description: "The .ci/.yaml and .ci/repo.yaml files: checks, inputs, promotions and release steps." url: https://modernci.dev/docs/config/ --- # Configuring checks: `.ci/*.yaml` Checks live in your repo, next to the code they check, and change through pull requests like any other file. One file per target branch: | File | What it holds | |---|---| | `.ci/.yaml` | The checks for PRs **into** that branch (`.ci/dev.yaml`, `.ci/main.yaml`). | | `.ci/repo.yaml` | The few repo-level keys that live in the repo. | Your editor can validate and complete these files. Add this as the first line: ```yaml # yaml-language-server: $schema=https://modernci.dev/schema/ci.json ``` The schema is published as `crates/mci-config/schema/ci.schema.json` (branch files) and `repo.schema.json` (`.ci/repo.yaml`). The loader is stricter than any editor: it refuses unknown keys and names the file and line. ## The smallest file ```yaml # .ci/dev.yaml checks: test: run: make test ``` Every key under a check except `run` is optional. A check is a command; it passes when it exits 0. ## What a file may contain | Key | Meaning | |---|---| | `checks` | The checks, by name, in the order shown to people. | | `setup` | Commands every check runs first (see below). | | `env` | Environment for every check. Names starting `MODERNCI_` are reserved. | | `toolchain` | Pinned tool versions, for example `rust: "1.98.0"`. | | `promotes` | Marks a promotion file; see [Promotion targets](#promotion-targets). | Anything else is an error: `.ci/dev.yaml:4: unknown key `retries``. ### What is not here Who may approve, which paths are guarded, budgets, compute, secrets, webhooks and which branches are judged are **ModernCI settings**, changed by a person in the repo's settings. They are never read from a file in the repo, because anyone who can push a branch could then change how your CI runs. A file that contains one (`guard`, `budget`, `compute`, `targets`, `webhook`, `shadow`, and so on) is refused with a message pointing at settings. ## Check keys | Key | Default | Meaning | |---|---|---| | `run` | required | The command line. | | `setup` | the file's `setup` | Commands to run first instead of the file's, or `false` for none. | | `inputs` | whole tree | Globs of the only files the check reads. | | `tools` | none | Tools the check needs, name to version. | | `needs` | none | Checks that must pass before this one starts. | | `shards` | 1 | Split across 1 to 32 machines. | | `class` | `gate` | `gate`, `after` or `release`. | | `on` | from `class` | `pr` (gate checks) or `landed` (`after` and `release`). `on: landed` alone makes a release step. | | `publish` | none | Release steps only: what the release publishes (see [Release steps](#release-steps)). | | `stage` | 1 | Pre-check stage, 1 to 9 (gate checks only). | | `queue_only` | false | Run only in the merge queue (gate checks only). | | `required` | true | `false` makes a red advisory. | | `timeout` | none | `90`, `45s`, `30m`, `1h30m`; at most 24 hours. | | `tests` | none | Test report format: `nextest`, `libtest` or `junit`. | | `env` | none | Environment on top of the file's `env`. | Check names are lowercase letters, digits, `-`, `_` and `.`, up to 64 characters. `@` is reserved for shards. ## Shared setup Put commands every check needs first in `setup:`. They run before each check's `run`, in the same shell, and the first one that fails fails the check. A check can run its own list instead, or none. ```yaml # .ci/dev.yaml env: CARGO_HOME: ${cache}/cargo setup: - cargo fetch --locked checks: test: run: cargo test --locked docs: run: ./tools/lint-docs setup: false wasm: run: cargo build --target wasm32-unknown-unknown setup: [rustup target add wasm32-unknown-unknown] ``` A check's setup is part of what its result depends on: editing `setup:` re-runs only the checks that run it. ## Narrow what a check reads: `inputs` By default a check's result is reused only when the whole tree is identical. If a check only reads some files, say so: ```yaml # .ci/dev.yaml checks: fmt: run: cargo fmt --check inputs: ["**/*.rs", Cargo.toml, rustfmt.toml] docs: run: ./tools/lint-docs inputs: ["docs/**", "tools/lint-docs"] ``` The check then runs in a **sparse, read-only checkout of just those paths**, and its result is reused on every commit where those files are unchanged. A read outside the list fails to find the file, so the check goes red; it cannot pass by accident. When a red looks like that, the log excerpt says "possibly an undeclared input". Globs are repo-relative, with no `..`. Changing `inputs` is a gate change (below). ## Order and stages: `needs`, `stage` `needs: [build]` starts a check only after `build` passes. A gate check can only need gate checks; `after` and `release` checks can need gates and each other. Loops and unknown names are errors. On a PR's pre-check, checks run in **stages** so cheap failures arrive first: ```yaml # .ci/dev.yaml checks: fmt: run: cargo fmt --check stage: 1 clippy: run: cargo clippy --locked -- -D warnings stage: 1 test: run: cargo test --locked stage: 2 needs: [clippy] ``` Everything in a stage runs, so all of that stage's reds arrive together; the next stage starts when the earlier ones pass. A check cannot need a check in a later stage. The merge queue runs every gate at once and ignores stages, to land as fast as possible. ## Merge-queue-only checks: `queue_only` Slow or expensive checks can skip the PR pre-check and run only when a PR is in the merge queue: ```yaml # .ci/dev.yaml checks: test: run: cargo test --locked load-test: run: ./load-test queue_only: true timeout: 20m ``` A pre-check cannot wait for a `queue_only` check, so a check that `needs` one must be `queue_only` too. ## Split a check across machines: `shards` ```yaml # .ci/dev.yaml checks: build: run: make tool e2e: run: ./e2e --shard "$MODERNCI_SHARD" needs: [build] shards: 4 ``` - The check runs as `e2e@0` to `e2e@3`. Each is told `MODERNCI_SHARD_INDEX` (from 0), `MODERNCI_SHARD_COUNT` and `MODERNCI_SHARD` (`2/4`). - Each shard is its own job: placed, retried, billed, logged (`log --check e2e@2`) and reused on its own. The PR passes only when every shard passes, and a red names the shard. - `needs: [e2e]` waits for every shard. `needs: ["e2e@1"]` and a check named `e2e@1` are errors. - `shards` is 1 to 32. Long checks on the merge queue should be sharded so the queue's wall time stays short. ## Classes: `gate`, `after`, `release` ```yaml # .ci/dev.yaml checks: test: run: cargo test --locked soak: run: ./soak class: after timeout: 1h publish: run: ./publish class: release needs: [soak] ``` - `gate` (default) blocks landing. - `after` runs on the newest landed tip. A red is reported as a **landed red** and attributed to the change that caused it; it never blocks other PRs. - `release` is a step of the release after landing. `on:` says the same thing from the other side: `on: pr` for gate checks (pre-check and merge queue), `on: landed` for `after` and `release` checks. A check with `on: landed` and no `class` is a release step. `on: landed` on a gate check, and `on: pr` on an `after` or `release` check, are errors. Landed steps run only on a checked tip of the target, never on an unchecked one. `stage` and `queue_only` apply to gate checks only. ## Release steps Release steps run after a PR lands on the release target (usually `main`). They build and package; ModernCI signs and publishes. A step **never sees the signing key**: after its `run` passes, ModernCI asks its separate signer process to sign the artifacts' digests, writes signed SLSA build provenance for them, and publishes the signed channel metadata (a key set, a snapshot and a short-lived timestamp) for the release. ```yaml # .ci/main.yaml checks: test: run: cargo test --locked release: on: landed needs: [test] timeout: 1h run: >- v="$(mci release version)" && for t in x86_64 aarch64; do cargo build --release --locked --target "$t-unknown-linux-gnu" && mci release package --arch "$t-linux" --version "$v" --binary "target/$t-unknown-linux-gnu/release/mci" --out out || exit 1; done publish: channel: stable rollback_safe: true artifacts: - { arch: x86_64-linux, path: "out/mci-*-x86_64-linux.tar.gz" } - { arch: aarch64-linux, path: "out/mci-*-aarch64-linux.tar.gz" } ``` The artifacts a step publishes are the files it wrote in its own job. `mci release package` writes `mci--.tar.gz` (one `mci` binary inside) and its `.sha256`; an artifact `path` may contain `*`, which must match exactly one file. | `publish` key | Default | Meaning | |---|---|---| | `artifacts` | required | One `{arch, path}` per architecture: `x86_64-linux`, `aarch64-linux`. Paths are repo-relative. | | `channel` | `stable` | Channel name: lowercase letters, digits and `-`. | | `rollback_safe` | `true` | `false` when the release cannot be rolled back to the previous one (a migration that cannot be expanded). Such a release is installed only after the owner approves it. | The version is never configured: it comes from the commit (`.`). See [Build & Release](/build/) for signing and provenance. ## Required and advisory `required: false` runs the check and shows its result without blocking landing. A new check also starts in **shadow**: it runs, but does not block until it has passed once on the target. Shadow follows what the check does, not its name, so renaming a check does not reset it. ## Promotion targets `.ci/qa.yaml` and `.ci/main.yaml` usually share most checks with `dev`. A promotion file says `promotes:` and lists only what it **adds**; the target's checks are the source's checks plus those. ```yaml # .ci/dev.yaml toolchain: rust: "1.98.0" checks: test: run: cargo test --locked lint: run: cargo clippy --locked -- -D warnings ``` ```yaml # .ci/qa.yaml promotes: dev checks: smoke: run: ./smoke needs: [test] ``` ```yaml # .ci/main.yaml promotes: qa checks: release-notes: run: ./release-notes class: release needs: [smoke] ``` Re-using a source check's name, a loop of `promotes`, a missing source file and conflicting toolchain pins are errors. Because checks unchanged from the source have the same definition, their results are reused in the promotion. ## Gate changes Changing what blocks landing is itself reviewed. A PR that changes a gate check's `run`, `setup`, `inputs` or `tools`, adds or removes a gate check, changes `required`, `shards` or `queue_only` on one, or changes a `toolchain` pin: - is shown as `gate changed`, with the change in cost per landed PR; - needs a person's approval (it is a guarded change); - lands on its own, never batched with other PRs, so no PR lands under a gate it was not shown. Not gate changes: renaming a check, changing `timeout`, `stage`, `needs`, `env` or `tests`, and anything about `after` or `release` checks, including `on` and `publish`. ## A broken file never falls back If `.ci/.yaml` is missing or does not parse, PRs into that target report a configuration error naming the file and line. ModernCI never substitutes an older copy of the file. ## `.ci/repo.yaml` ```yaml # .ci/repo.yaml agents: true ``` `agents` says whether agents may take the repo's work items. Every other key is refused. ## Reference `.ci/` files are YAML. The JSON Schemas are `crates/mci-config/schema/ci.schema.json` and `crates/mci-config/schema/repo.schema.json`; they are generated from the loader's own types and a test fails if they drift. ## Where each kind of configuration lives | What | Where | How to change it | |---|---|---| | Checks, setup, env, toolchain, promotions | `.ci/.yaml` in the repo (this page) | A PR. Gate changes need a person's approval. | | `agents` | `.ci/repo.yaml` | A PR. | | Budgets, approvals required, data regions, which forge and compute kinds are allowed, feature flags | ModernCI settings, by level (operator, tenant, project) with a source and optional lock | `mci settings list `, `mci settings get `, `mci settings set --value '{...}'`, or the console's settings page. | | Forge and compute connection | Settings `forge.plugin` and `compute.plugin` with their config | `mci forges connect`, `mci computes connect` . | | Secrets | A write-only secret store, never the repo | `mci secrets put` (coming). | The reasons settings never come from the repo are in [security](/docs/security.md#who-can-change-what). Concepts such as class, gate change and reuse: [concepts](/docs/concepts.md). ================================================================================ --- title: "Runners: ModernCI docs" description: "Bring your own compute with mci runner up: placement, trust and isolation (coming)." url: https://modernci.dev/docs/runners/ --- # Runners: bring your own compute > **Status: coming.** `mci runner up` is not released yet. Today, checks run on the runners an operator configures for your tenant. Bring your own compute (BYOC) is included on every plan. A runner you register costs $0 from ModernCI and is still metered, so you can see what it saves. ## Register a machine ```sh curl -fsSL get.modernci.dev | sh mci runner up --project my-org/app --labels linux,x86_64 ``` The command uses a one-time token from the console. Goal: under 60 seconds on any new server (a target). ## Time to first job Measured: 14 s median (18 s worst of 10) from `curl | sh` to a finished first job, on an Apple silicon Mac with a 20 Mbit/s download and a local test region, using a pre-release installer. The public installer at `get.modernci.dev` is not published yet, and a remote-region measurement is coming. Method: - **Start:** a brand-new, empty home directory with the network up and no `mci`, config or caches. The documented one-liner runs: the installer downloads the release, verifies its signature and sha256, installs `mci`, and runs `mci runner up`. Install and download time are included. - **End:** the first real job, an `mci run` whose labels match only the new runner, is recorded as finished. - **Excluded:** setting up the machine itself, and creating the one-time registration token. The admin created the token beforehand and passed it in, the way MDM or cloud-init would. - **Environment:** the download was throttled to 20 Mbit/s; the region ran on the same machine, so region round trips were local; the Mac was under heavy load from other work. - **Results:** 10 runs, all passed: median 13.9 s, p90 17.8 s, worst 18.7 s. - **Outbound only.** The runner connects out to your region. No inbound ports, so it works behind NAT. - **A real service:** systemd, launchd or a Windows service. Drain, deregister and status are commands. - **Capabilities, not invented labels.** The runner reports OS, architecture, CPU, memory, GPU and your labels. Checks say what they need, and ModernCI matches. - **Signed auto-update.** The runner is the same signed `mci` client. - **Linux, macOS and Windows,** on x86_64 and arm64. ## Placement ModernCI places each job across everything you registered (Macs, servers and GPU boxes), weighing speed, cost and load. Free machines fill first. Overflow to your own cloud accounts, only where you allow it, is coming. Every decision has a plain-English reason. ## Trust and isolation - Each job runs as a separate low-privilege user, in a container or microVM where available, with the workspace wiped and a fresh keychain and user state. - You decide which projects and branches may use a runner. Fork and untrusted PRs are off by default. - Runner enrolment is approved by an admin with a passkey. - **Laptops never satisfy CI.** Results from a personal machine are visible only to its owner and never count as a CI result. ================================================================================ --- title: "Migration: ModernCI docs" description: "Move from GitHub Actions or GitLab CI with an importer and shadow mode (coming)." url: https://modernci.dev/docs/migration/ --- # Migrate from GitHub Actions or GitLab CI > **Status: coming.** The importers are planned; the command name may change. You can write `.ci/` files by hand today (see the [config reference](/docs/config.md)). Keep your forge and your tests. ModernCI reads what you already have, infers what it can, and runs next to your current CI until you trust it. 1. **Connect your forge.** GitHub, GitLab, Forgejo or plain git. Once an operator has created your tenant (contact hello@modernci.dev), sign in at https://app.modernci.dev. See the [quickstart](/docs/quickstart.md). 2. **Import.** The importer turns GitHub Actions or GitLab CI config into ModernCI checks, and infers inputs so work is reused. 3. **Run in shadow.** New checks report without blocking, next to your current CI. 4. **Switch.** Make ModernCI the required check, then turn the old pipeline off. ```sh mci import github-actions git add .ci/ && git commit -m "Add ModernCI checks" ``` ## What carries over - **Carries over:** your commands, your tests and your toolchain. ModernCI has no language-specific engine code. - **Wrappers (coming):** a GitHub Action and a GitLab component that call `mci`, so you can adopt in steps. - **Does not carry over:** marketplace actions that exist on only one platform, and complex workflow graphs. ModernCI deliberately has no general workflow DAG engine. The importer tells you what it could not convert. ================================================================================ --- title: "Agents: ModernCI docs" description: "How agents connect, submit work and get their reds." url: https://modernci.dev/docs/agents/ --- # Agents: MCP, tools, and how reds reach them An agent (a coding assistant, a script) pushes a branch, submits it, and leaves. ModernCI checks and lands the PR. If something needs the agent, the news is waiting for it when it comes back. ## Connect Today MCP is served by your region's API over HTTP: JSON-RPC 2.0 on `POST /mcp` of your region's URL There is no `mci mcp` command yet; a stdio bridge `mci mcp` is coming. Use an MCP client that supports HTTP servers and a bearer token. For Claude Code: ```sh claude mcp add --transport http modernci "$MCI_URL/mcp" \ --header "Authorization: Bearer $MCI_TOKEN" ``` Create the token as an **agent** identity (it is shown once, and stored only as a hash): ```sh mci tokens create --tenant "$TENANT" --project "$PROJECT" --role agent \ --kind agent --name builder ``` Agents act with the permissions of that identity, through the same checks as the CLI and REST API. They cannot approve guarded changes: approvals need a person's passkey. An admin can switch agent access off per tenant (`feature.mcp`); calls then fail with "agent access (MCP) is turned off for this tenant". ## The tools The tool list is generated from the API's operation table, so it is always what the server accepts (`tools/list`). | Tool | What it does | Status | |---|---|---| | `done` | Submit a pushed branch as a PR (`repo`, `branch`, optional `head`, `agent_cost_micros`) and leave. | built | | `my_work` | Your open work items: reds, conflicts, approvals. | built | | `watch` | Your event stream. Arguments: `after` (sequence number), `ack`, `limit` (1-500), `wait` (seconds, up to 25, long poll). | built | | `ack` | Acknowledge events up to a sequence number. | built | | `log` | Read a run's log (`run`). | built | | `claim` | Take a work item. | coming (answers "not implemented") | | `report` | Report progress and agent spend on a work item. | coming | | `ask` | Ask a person a question about a work item. | coming | Typical loop: 1. `git push origin mci/my-change`, then `done` with the repo, branch and head commit. 2. Leave. Later, call `my_work` (what is open now) and `watch` with `after` set to the last sequence you saw (what happened since). 3. For a `pr_red`, read the excerpt, call `log` for the full output, fix, push to the same branch, and call `done` again. 4. `ack` what you handled. ## How reds reach agents When a check fails, ModernCI writes the event and a work item in the same database transaction as the result. Nothing is lost if the engine restarts or the agent is offline. - **Stream**: each identity has its own event stream with increasing sequence numbers. `watch` replays from any point, so an agent that disconnected after `done` gets its events when it reconnects. Acknowledgement is per identity and per channel, so MCP and a webhook never move each other. - **Events** are JSON with a `type`: `pr_red` (the failing check, head commit, a readable summary, the log location and how to reproduce), `pr_landed` (target and landed commit), `conflict` (target and files), `approval_needed`, `stuck`, `wait_changed`. Wait text is the same sentence the UI shows. - **Work items**: a red or conflict becomes a work item owned by the PR's author. If it is left, it escalates to a person after a deadline. Escalation always happens; only the notifications depend on the feature flags. - **Webhook** (`feature.notifications_webhook`): the engine can POST an identity's stream to an HTTPS endpoint with retries and an HMAC signature (`X-ModernCI-Signature: sha256=`, over `"."`, with `X-ModernCI-Event-Id` for de-duplication). The webhook sender is built; wiring it to a configured endpoint is coming. ## Cost reporting `done` accepts `agent_cost_micros` (millionths of a dollar the agent spent on the change), recorded against the PR. `report` will update it during work (coming). ================================================================================ --- title: "MCP tools: ModernCI docs" description: "The MCP tools agents can call today, and the ones that are coming." url: https://modernci.dev/docs/mcp/ --- # MCP tools for agents > Generated from the operation table in the ModernCI source (`crates/mci-api/src/ops.rs`, commit `32cae87556`), so the REST API, MCP tools and CLI stay in step. ModernCI is pre-launch: names and fields may change. ModernCI speaks the Model Context Protocol so coding agents can submit work, see their reds and read logs with the same permissions as the identity behind their token. See [Agents](/docs/agents.md) for the full flow. ## Connect Today MCP is served over HTTP: JSON-RPC 2.0 on `POST /mcp` of your region's API, with a bearer token for an **agent** identity. A stdio bridge, `mci mcp`, is built; its download is coming. ```sh claude mcp add --transport http modernci \ "$MCI_URL/mcp" \ --header "Authorization: Bearer $MCI_TOKEN" ``` ## Tools available today | Tool | What it does | REST equivalent | |---|---|---| | `queue_status` | List PRs with their status and wait reason | `GET /v1/repos/{repo}/prs` | | `done` | Submit a pushed branch as a PR and leave | `POST /v1/prs` | | `my_work` | My open work: reds, conflicts, approvals | `GET /v1/work` | | `claim` | Claim a work item | `POST /v1/work/{item}/claim` | | `report` | Report progress and agent spend | `POST /v1/work/{item}/report` | | `ask` | Ask a person a question about a work item | `POST /v1/work/{item}/ask` | | `release` | Let go of a claimed work item | `POST /v1/work/{item}/release` | | `dequeue` | Take my PR out of the merge queue | `POST /v1/prs/{pr}/dequeue` | | `why_left_queue` | Why a PR left the merge queue | `GET /v1/prs/{pr}/queue-exits` | | `activity` | Activity log of a PR: pushes, checks, approvals, queue exits | `GET /v1/prs/{pr}/activity` | | `pause_request` | Ask a person to pause or resume runs in a project | `POST /v1/requests/pause` | | `config_check` | Check .ci files: schema errors with file and line | `POST /v1/config/check` | | `config_simulate` | What a .ci change would run, and whether it changes the gate | `POST /v1/config/simulate` | | `savings` | Spend, waste and agent spend for a project | `GET /v1/projects/{project}/savings` | | `watch` | Stream my events with replay from a sequence number | `GET /v1/events` | | `log` | Read a run's log | `GET /v1/runs/{run}/log` | | `promotions` | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | `GET /v1/repos/{repo}/promotions` | | `promotion_status` | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | `GET /v1/repos/{repo}/promotion-status` | | `ack` | Acknowledge my events up to a sequence number | `POST /v1/events/ack` | All string parameters are named after the REST path and body fields. Agents never approve guarded changes: approvals need a person's passkey. ## Designed, not built yet | Tool | What it will do | Status | |---|---|---| | `why_red` | The same why-red card the console shows | Coming | | `run` | Run a command on your compute before pushing | Coming | | `verify_patch` | Run the pre-checks on a patch before pushing | Coming | | `debug_exec` | Run bounded commands in a kept environment, where the tenant allows it and the job had no secrets | Coming | ================================================================================ --- title: "CLI reference: ModernCI docs" description: "Every mci command available today, and the client commands that are coming." url: https://modernci.dev/docs/cli/ --- # CLI reference > Generated from the operation table in the ModernCI source (`crates/mci-api/src/ops.rs`, commit `32cae87556`), so the REST API, MCP tools and CLI stay in step. ModernCI is pre-launch: names and fields may change. Every command below is also a REST operation; see the [API reference](/docs/api.md). ## Commands available today | Command | What it does | Auth | |---|---|---| | `mci health` | Is this install up | none | | `mci health detail` | Health with the engine lease holder, server version and standing alarms | token | | `mci auth methods` | Which sign-in methods this install offers | none | | `mci tokens create` | Create a person or agent with a token (shown once) | token | | `mci support grant` | Let the platform operator support this tenant for a limited time | token | | `mci support revoke` | End operator support access to this tenant | token | | `mci audit` | Read a tenant's audit log | token | | `mci delegated set` | Turn delegated-approval mode on or off for the named tenant | token | | `mci prs list` | List PRs with their status and wait reason | token | | `mci prs show` | Show one PR: diff, checks, logs, approvals, cost, wait reason | token | | `mci prs done` | Submit a pushed branch as a PR and leave | token | | `mci prs claim` | Claim an unclaimed PR | token | | `mci work` | My open work: reds, conflicts, approvals | token | | `mci work claim` | Claim a work item | token | | `mci work release` | Let go of a claimed work item | token | | `mci prs dequeue` | Take my PR out of the merge queue | token | | `mci prs why-left` | Why a PR left the merge queue | token | | `mci prs activity` | Activity log of a PR: pushes, checks, approvals, queue exits | token | | `mci request pause` | Ask a person to pause or resume runs in a project | token | | `mci config check` | Check .ci files: schema errors with file and line | token | | `mci config simulate` | What a .ci change would run, and whether it changes the gate | token | | `mci savings` | Spend, waste and agent spend for a project | token | | `mci watch` | Stream my events with replay from a sequence number | token | | `mci log` | Read a run's log | token | | `mci passkeys list` | My passkeys in this region and whether each is confirmed; for a tenant admin, members' passkeys waiting for confirmation | token | | `mci settings get` | Effective value of a setting, where it comes from, and its lock | token | | `mci settings set` | Set or lock a setting at a level | token | | `mci tenants create` | Create a tenant | token | | `mci projects create` | Create a project | token | | `mci repos add` | Add a repo to a project | token | | `mci forges connect` | Choose the forge plugin for a tenant or project, with its config | token | | `mci computes connect` | Choose the compute plugin for a tenant or project, with its config and overflow classes | token | | `mci roles grant` | Grant a role | token | | `mci roles revoke` | Take a role away | token | | `mci members` | List a tenant's people and agents with their roles | token | | `mci pause` | Pause new runs at a scope | token | | `mci resume` | Resume runs at a scope | token | | `mci stop` | Stop: pause and cancel running jobs | token | | `mci me` | Who I am: identity, tenant, roles, passkeys | token | | `mci users link` | Link a globally signed-in user to an identity of this tenant | token | | `mci repos list` | Repos I can see, with open and red PR counts | token | | `mci prs search` | Search PRs across the repos I can see | token | | `mci prs diff` | A PR's diff against its target, guarded files marked | token | | `mci promotion list` | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | token | | `mci promotion show` | Show one promotion, revert or reconcile PR with its checks, approvals and hold reason | token | | `mci promotion status` | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | token | | `mci promotion approve` | Approve a promotion, or reject it with a reason (which opens the revert), with a person's passkey | token + passkey | | `mci settings list` | Every setting and feature at a level, with value, source and lock | token | | `mci stats` | Merge queue flow: PRs arrived, landed and red, cost, time to land | token | | `mci ack` | Acknowledge my events up to a sequence number | token | | `mci compute` | Runners, pools, cloud accounts, placement and spend at a glance | token | | `mci runners enrolment` | A runner enrolment by its code: the machine, its scope and status | token | | `mci runners token` | Create a one-time registration token for unattended runners (shown once) | token + passkey | | `mci runners show` | One runner: health, jobs, capabilities, policy | token | | `mci runners drain` | Let a runner finish its jobs and take no new ones | token | | `mci runners resume` | Let a drained runner take jobs again | token | | `mci runners remove` | Remove a runner (it must be idle) | token | | `mci log search` | Search a run's whole log | token | ## Client commands, built, release coming These work in the `mci` client build; the public download is coming. | Command | What it does | |---|---| | `mci run ` | Run any command on your compute, on demand | | `mci runner up`, `status`, `drain`, `deregister` | Register and manage this machine as a runner | | `mci mcp` | A stdio MCP bridge for agents | | `mci agents install` | Write the MCP config for Claude Code, Codex and Cursor | | `mci import` | Import GitHub Actions, GitLab CI and Forgejo or Gitea workflows (server build only for now) | | `mci attestation verify` | Verify an artifact's signature and provenance (server build only for now) | ## Coming | Command | What it will do | |---|---| | `mci checks rerun` | Re-run a check with a stated reason | | `mci secrets put` | Write a secret (write-only) | | `mci plan` | Jobs and worst-case cost that would start now | | `mci repro` | Reproduce a CI failure locally | | `mci self-update` | Update the client, verified before install | See [Install the CLI](/docs/install.md). ================================================================================ --- title: "REST API: ModernCI docs" description: "Every REST operation, its path and its auth; OpenAPI at /openapi.json." url: https://modernci.dev/docs/api/ --- # REST API reference > Generated from the operation table in the ModernCI source (`crates/mci-api/src/ops.rs`, commit `32cae87556`), so the REST API, MCP tools and CLI stay in step. ModernCI is pre-launch: names and fields may change. The API is served by the region that holds your project. Send a bearer token created by a tenant admin. A machine-readable description is at [/openapi.json](/openapi.json). | Method and path | Operation | What it does | Auth | Status | |---|---|---|---|---| | `GET /health` | `health.get` | Is this install up | none | available | | `GET /v1/health/detail` | `health.detail` | Health with the engine lease holder, server version and standing alarms | token | available | | `GET /v1/auth/methods` | `auth.methods` | Which sign-in methods this install offers | none | available | | `POST /v1/probe/canned` | `probe.canned` | Run the canned PR request end to end for the outside prober | token | available | | `POST /v1/tokens` | `tokens.create` | Create a person or agent with a token (shown once) | token | available | | `POST /v1/support-access` | `support.grant` | Let the platform operator support this tenant for a limited time | token | available | | `DELETE /v1/support-access/{tenant}` | `support.revoke` | End operator support access to this tenant | token | available | | `GET /v1/audit` | `audit.list` | Read a tenant's audit log | token | available | | `PUT /v1/delegated-approval` | `delegated.set` | Turn delegated-approval mode on or off for the named tenant | token | available | | `GET /v1/repos/{repo}/prs` | `prs.list` | List PRs with their status and wait reason | token | available | | `GET /v1/prs/{pr}` | `prs.get` | Show one PR: diff, checks, logs, approvals, cost, wait reason | token | available | | `POST /v1/prs` | `prs.done` | Submit a pushed branch as a PR and leave | token | available | | `POST /v1/prs/{pr}/claim` | `prs.claim` | Claim an unclaimed PR | token | available | | `GET /v1/work` | `work.mine` | My open work: reds, conflicts, approvals | token | available | | `POST /v1/work/{item}/claim` | `work.claim` | Claim a work item | token | available | | `POST /v1/work/{item}/report` | `work.report` | Report progress and agent spend | token | available | | `POST /v1/work/{item}/ask` | `work.ask` | Ask a person a question about a work item | token | available | | `POST /v1/work/{item}/release` | `work.release` | Let go of a claimed work item | token | available | | `POST /v1/prs/{pr}/dequeue` | `prs.dequeue` | Take my PR out of the merge queue | token | available | | `GET /v1/prs/{pr}/queue-exits` | `prs.queue_exits` | Why a PR left the merge queue | token | available | | `GET /v1/prs/{pr}/activity` | `prs.activity` | Activity log of a PR: pushes, checks, approvals, queue exits | token | available | | `POST /v1/requests/pause` | `requests.pause` | Ask a person to pause or resume runs in a project | token | available | | `POST /v1/config/check` | `config.check` | Check .ci files: schema errors with file and line | token | available | | `POST /v1/config/simulate` | `config.simulate` | What a .ci change would run, and whether it changes the gate | token | available | | `GET /v1/projects/{project}/savings` | `savings.get` | Spend, waste and agent spend for a project | token | available | | `GET /v1/agents/bundle` | `agents.bundle` | The agent skill bundle for a client, generated from this table | none | available | | `GET /v1/agents/errors` | `agents.errors` | The closed agent error catalogue | none | available | | `GET /v1/events` | `events.watch` | Stream my events with replay from a sequence number | token | available | | `GET /v1/runs/{run}/log` | `runs.log` | Read a run's log | token | available | | `POST /v1/prs/{pr}/checks/{check}/rerun` | `checks.rerun` | Re-run a check with a stated reason | token | coming (not implemented yet) | | `POST /v1/prs/{pr}/approvals` | `approvals.create` | Approve or reject a guarded change with a passkey | token + passkey | available | | `GET /v1/signer/keys` | `signer.keys.pending` | Signer keys waiting for owner approval: each key's purpose, kind, rotation and new public key | token | available | | `POST /v1/signer/keys/challenge` | `signer.keys.challenge` | Get a passkey challenge bound to the exact signer key request | token | available | | `POST /v1/signer/keys/approve` | `signer.keys.approve` | Approve the signer key request with a passkey; the signer verifies it itself | token | available | | `GET /v1/passkeys` | `passkeys.list` | My passkeys in this region and whether each is confirmed; for a tenant admin, members' passkeys waiting for confirmation | token | available | | `POST /v1/passkeys/bind/challenge` | `passkeys.bind.challenge` | Get a passkey challenge that confirms one passkey here (cosigned by another of mine, confirmed by a tenant admin, enrolled with a code from the operator) or proves I hold it | token | available | | `POST /v1/passkeys/bind` | `passkeys.bind` | Confirm a passkey here with an assertion by a passkey already confirmed here (mine, or a tenant admin's for a member) | token | available | | `POST /v1/passkeys/enrol` | `passkeys.enrol` | Confirm my first passkey here with the one-time code from the operator and an assertion by that passkey | token | available | | `POST /v1/passkeys/revoke` | `passkeys.revoke` | Revoke a passkey here (mine, or a member's as a tenant admin): it never approves again | token | available | | `GET /v1/settings/{level}/{scope}/{setting}` | `settings.get` | Effective value of a setting, where it comes from, and its lock | token | available | | `PUT /v1/settings/{level}/{scope}/{setting}` | `settings.set` | Set or lock a setting at a level | token | available | | `POST /v1/tenants` | `tenants.create` | Create a tenant | token | available | | `POST /v1/projects` | `projects.create` | Create a project | token | available | | `POST /v1/projects/{project}/repos` | `repos.create` | Add a repo to a project | token | available | | `POST /v1/forges` | `forges.connect` | Choose the forge plugin for a tenant or project, with its config | token | available | | `POST /v1/computes` | `computes.connect` | Choose the compute plugin for a tenant or project, with its config and overflow classes | token | available | | `POST /v1/roles` | `roles.grant` | Grant a role | token | available | | `POST /v1/roles/revoke` | `roles.revoke` | Take a role away | token | available | | `GET /v1/members` | `members.list` | List a tenant's people and agents with their roles | token | available | | `PUT /v1/projects/{project}/secrets/{name}` | `secrets.put` | Write a secret (write-only) | token | coming (not implemented yet) | | `POST /v1/pause` | `runs.pause` | Pause new runs at a scope | token | available | | `POST /v1/resume` | `runs.resume` | Resume runs at a scope | token | available | | `POST /v1/stop` | `runs.stop` | Stop: pause and cancel running jobs | token | available | | `GET /v1/plan` | `runs.plan` | Jobs and worst-case cost that would start now | token | coming (not implemented yet) | | `GET /v1/me` | `me.get` | Who I am: identity, tenant, roles, passkeys | token | available | | `POST /v1/users/link` | `users.link` | Link a globally signed-in user to an identity of this tenant | token | available | | `GET /v1/repos` | `repos.list` | Repos I can see, with open and red PR counts | token | available | | `GET /v1/prs` | `prs.search` | Search PRs across the repos I can see | token | available | | `GET /v1/prs/{pr}/diff` | `prs.diff` | A PR's diff against its target, guarded files marked | token | available | | `POST /v1/prs/{pr}/approvals/challenge` | `approvals.challenge` | Get a passkey challenge bound to a PR's exact head and guarded files | token | available | | `GET /v1/repos/{repo}/promotions` | `promotions.list` | List promotion, revert and reconcile PRs: kind, source, target, promoted commit, hold reason, checks | token | available | | `GET /v1/promotions/{pr}` | `promotions.get` | Show one promotion, revert or reconcile PR with its checks, approvals and hold reason | token | available | | `GET /v1/repos/{repo}/promotion-status` | `promotion.status` | Each promotion pair of a repo (dev -> qa -> main): tips, what is ahead, held and why | token | available | | `POST /v1/promotions/{pr}/challenge` | `promotion.challenge` | Start a passkey ceremony bound to a promotion's exact commit and the guarded files it changes | token | available | | `POST /v1/promotions/{pr}/approvals` | `promotion.approve` | Approve a promotion, or reject it with a reason (which opens the revert), with a person's passkey | token + passkey | available | | `GET /v1/settings/{level}/{scope}` | `settings.list` | Every setting and feature at a level, with value, source and lock | token | available | | `GET /v1/stats` | `stats.flow` | Merge queue flow: PRs arrived, landed and red, cost, time to land | token | available | | `POST /v1/events/ack` | `events.ack` | Acknowledge my events up to a sequence number | token | available | | `GET /v1/projects/{project}/runs` | `runs.list` | Runs started with `mci run`, newest first, by status and requester | token | available | | `POST /v1/projects/{project}/runs/quote` | `run.quote` | Estimate the cost and duration of an on-demand run | token | available | | `POST /v1/projects/{project}/runs` | `run.create` | Start an on-demand run, or reuse an identical earlier result of yours | token | available | | `POST /v1/projects/{project}/workspace/sync` | `workspace.sync` | Find the nearest commit the region already has, to send only a diff | token | available | | `PUT /v1/runs/{run}/context` | `run.upload` | Upload an on-demand run's working tree | token | available | | `GET /v1/runs/{run}/events` | `run.attach` | Stream an on-demand run's output and result | token | available | | `POST /v1/runs/{run}/cancel` | `run.cancel` | Stop an on-demand run (Ctrl-C) | token | available | | `GET /v1/runs/{run}/context` | `run.context` | A runner downloads the working tree of the on-demand run it runs | job token | available | | `GET /v1/compute` | `compute.overview` | Runners, pools, cloud accounts, placement and spend at a glance | token | available | | `POST /v1/compute/runners/enrol` | `runners.enrol` | Add a runner from the console: the commands to run and an enrolment to watch | token + passkey | available | | `GET /v1/compute/runners/enrol/{code}` | `runners.enrolment` | A runner enrolment by its code: the machine, its scope and status | token | available | | `POST /v1/compute/runners/enrol/{code}/approve` | `runners.approve` | Approve or deny a machine that asked to become a runner | token + passkey | available | | `POST /v1/compute/runners/tokens` | `runners.tokens.create` | Create a one-time registration token for unattended runners (shown once) | token + passkey | available | | `GET /v1/compute/machines/{machine}` | `runners.status` | One runner: health, jobs, capabilities, policy | token | available | | `PUT /v1/compute/machines/{machine}` | `runners.update` | Set a runner's labels and which jobs may use it | token | available | | `POST /v1/compute/machines/{machine}/drain` | `runners.drain` | Let a runner finish its jobs and take no new ones | token | available | | `POST /v1/compute/machines/{machine}/resume` | `runners.resume` | Let a drained runner take jobs again | token | available | | `DELETE /v1/compute/machines/{machine}` | `runners.deregister` | Remove a runner (it must be idle) | token | available | | `PUT /v1/compute/pools/{pool}/spill` | `pools.spill` | When a pool's jobs wait too long, run them on another pool within a daily spend | token | available | | `GET /v1/runs/{run}/live` | `runs.live` | A running job live: phases, log, tests, resources, then the result | token | available | | `GET /v1/runs/{run}/log/search` | `runs.log_search` | Search a run's whole log | token | available | | `POST /v1/runs/{run}/report` | `runs.report` | A runner reports a job's result | job token | available | | `POST /v1/hooks/push/{forge}` | `hooks.push` | Push notification from a git host | forge hook | coming (not implemented yet) | **Auth:** *token* is an API token whose identity holds the needed permission; *token + passkey* also needs a fresh passkey assertion from a person; *forge hook* and *job token* are used by forges and runners, not by people or agents. ================================================================================ --- title: "Security model: ModernCI docs" description: "What ModernCI guarantees, which process holds which key, and how to verify it." url: https://modernci.dev/docs/security/ --- # Security: the trust model, signing, and how to verify What ModernCI protects, who and what it trusts, and the commands that let you check it yourself. ## What it guarantees A commit lands on a target branch only if it is a fast-forward of the tip that was checked, every required gate check passed on exactly that tree, and any guarded change has a current approval from a person. The landing process re-checks all of this itself, from the store, before it pushes. A PR counts as landed only when the landing log says so, and the landing process raises `integrity.branch_rewritten` for any target move that is not in that log. Out of scope today: a compromised engine that forges check results (runners do not sign results yet). ## Separate processes, separate keys | Process | Holds | Cannot | |---|---|---| | Engine | A read-only forge key. | Push to a target branch: the git host allows only the landing key there. | | Landing process | The landing key; its own OS user and directory. | Be reached except through a local Unix socket from the engine's user. Its database role can read and append the landing log, nothing else. | | Signer | The release signing key; its own OS user. | Sign anything but a content digest or a ModernCI provenance statement. It never sees artifact content. | | Jobs | Only the secrets released to that job, and a job token. | Read the engine's, landing or signing keys, or other tenants' data. | The git host enforces the landing rule: protect each target branch so only the landing key can push. ModernCI verifies the protection by pushing to a sentinel branch `mci/probe/`. ## Who can change what - **Settings** (budgets, approvers, forges, compute, features) are changed by a person in ModernCI, never read from a file in the repo. A `.ci/` file containing such a key is refused. Anyone who can push a branch therefore cannot change how CI is judged. - **Guarded files** (everything under `.ci/`) and gate changes need an **approval**: a passkey (WebAuthn) assertion over a challenge bound to the tenant, repo, PR, kind, exact head commit and the guarded content at the base. A new push, or a different base, invalidates it. The API verifies the assertion and the landing process verifies it again. A passkey is required whichever way the person signed in. - **Roles and tokens**: an API token belongs to one identity (person or agent) with a role at tenant or project level. Tokens are shown once and stored as hashes. Agents cannot approve. Rights stop at the tenant boundary; the operator has none inside a tenant unless the tenant grants **support access** for a limited time (`mci support grant` / `mci support revoke`). - **Audit**: tenant admins read the audit log with `mci audit --tenant "$TENANT"`. - **Delegated approval** is an operator-only development mode for one named tenant. It is counted as a bypass in the landing log and raises a standing alarm while on. Do not enable it for customers. ## Secrets Secrets are write-only and are released to a job only through the job's secret channel (never a command line), redacted from logs. A forge or compute connection's config is refused if it contains a secret-looking key. Writing secrets (`mci secrets put`) is not available yet. ## Job identity A running job can fetch a short-lived OpenID Connect token that names its tenant, repo, ref, commit, check and run. It is used for keyless signing and cloud federation with no stored credentials. Tokens live at most 10 minutes, are audience-scoped, and only a running job can get one. Claims, key rotation and the Fulcio certificate extensions: [oidc](/docs/oidc.md). ## Releases: signing and provenance A release built by a landed release step is, in order (ModernCI's own release step is in development; it is not yet configured): 1. packaged reproducibly (`mci release package`); 2. signed by the signer process (Ed25519 key file; Sigstore keyless, KMS and HSM plugins follow behind the same seam); 3. accompanied by SLSA v1.0 build provenance that **the platform** generates, not the job: the repository, `refs/heads/main`, "landed", the config hash, the source commit and tree, and the builder (`modernci`), signed as a DSSE envelope; 4. published as signed channel metadata: a key set signed by the root key, then a snapshot and a short-lived timestamp signed by an update key, naming the signed release manifest. An install accepts an update only if the manifest signature, the artifact sha256 and signature, and the provenance policy all verify, the version is higher, and it was never rolled back. ## Verify it yourself Verify the latest release of a channel, as an updater would (the signed metadata chain, sha256, provenance policy): ```sh mci release verify --channel https://releases.example.net/channels/stable \ --root-key ed25519:<64 hex> --repository https://git.example.net/modernci.git ``` Verify any artifact with its Sigstore bundle and a policy file: ```sh mci attestation verify widget.tar.gz \ --bundle widget.tar.gz.sigstore.json --policy policy.json ``` The command checks the signature, the signing identity, the transparency log entry (when the policy requires one) and the provenance policy, and exits non-zero with `verification failed: ...` on any mismatch. Policies for key-signed releases and for keyless signatures from jobs are in [oidc](/docs/oidc.md#verifying-moderncisigned-artifacts). Add `--trusted-root ` to verify against a private Sigstore instance or offline. Inside a job, `mci attestation sign --bundle ` signs with the job's token. Check the version a commit would get, from the repository alone (no state outside it): ```sh mci release version --repo . --main main --commit HEAD ``` Check a downloaded tarball against its published checksum: ```sh sha256sum -c mci-0.1.42-x86_64-linux.tar.gz.sha256 ``` ================================================================================ --- title: "Job identity (OIDC) and signing: ModernCI docs" description: "Short-lived job tokens for keyless signing and cloud federation." url: https://modernci.dev/docs/oidc/ --- # Job identity (OIDC) and signing ModernCI is an OpenID Connect identity provider for jobs. A running job can ask for a short-lived token that says exactly which repository, ref, commit, check and run it is. Use the token for keyless signing with Sigstore, and for cloud federation (AWS, GCP, Azure) without stored secrets. This is the same pattern as GitHub Actions OIDC. - Issuer: `https://oidc.modernci.dev` (one global issuer). - Discovery: `https://oidc.modernci.dev/.well-known/openid-configuration`. - Keys (JWKS): `https://oidc.modernci.dev/.well-known/jwks`. - Signing algorithm: `ES256`. ## Getting a token inside a job The runner puts two variables in the job's environment: | Variable | Meaning | |---|---| | `MCI_ID_TOKEN_REQUEST_URL` | the token endpoint of the region running the job | | `MCI_ID_TOKEN_REQUEST_TOKEN` | a credential for this job only; it is a secret and is redacted from logs | ```sh curl -sH "Authorization: Bearer $MCI_ID_TOKEN_REQUEST_TOKEN" \ "$MCI_ID_TOKEN_REQUEST_URL?audience=sigstore" | jq -r .value ``` The answer is `{"value": "", "expires_at": }`. `audience` is required: use `sigstore` for Sigstore, `sts.amazonaws.com` for AWS, and so on. ## Token claims | Claim | Example | Meaning | |---|---|---| | `iss` | `https://oidc.modernci.dev` | issuer | | `sub` | `repo:git.example.com/acme/widgets:ref:refs/heads/main` | `repo://:ref:` | | `aud` | `sigstore` | the audience the job asked for | | `exp`, `iat`, `nbf` | `1794300300` | lifetime: at most 10 minutes (5 by default) | | `jti` | `9f2c…` | unique token id | | `tenant`, `project` | `t_acme`, `p_widgets` | ModernCI tenant and project | | `server_url` | `https://git.example.com` | the git host | | `repository` | `acme/widgets` | owner and repository | | `repository_owner` | `acme` | owner | | `repository_id`, `repository_owner_id` | `1042`, `17` | the git host's stable ids (survive renames) | | `repository_visibility` | `public` | `public`, `private` or `internal` | | `ref` | `refs/heads/main` | the ref being built | | `sha` | `4b825dc6…` | the commit being built | | `check` | `release` | the check | | `run_id`, `run_attempt`, `job_id` | `r_01JC2Z`, `1`, `j_01JC30` | the run, its attempt, the job | | `runner_environment` | `modernci-hosted` | `modernci-hosted` or `self-hosted` | | `config_ref` | `acme/widgets/.ci/checks.yaml@refs/heads/main` | the check configuration that defined the job | | `config_sha` | `4b825dc6…` | the commit the configuration was read from | | `trigger` | `push` | `pull_request`, `merge_queue`, `push`, `manual` or `schedule` | | `landed` | `true` | the commit is on a branch only ModernCI lands to | | `run_url` | `https://app.modernci.dev/acme/widgets/runs/r_01JC2Z` | the run's page | Example token body: ```json { "iss": "https://oidc.modernci.dev", "sub": "repo:git.example.com/acme/widgets:ref:refs/heads/main", "aud": "sigstore", "exp": 1794300300, "iat": 1794300000, "nbf": 1794300000, "jti": "9f2c4be1d0a34f7e8b1c2d3e4f506172", "tenant": "t_acme", "project": "p_widgets", "server_url": "https://git.example.com", "repository": "acme/widgets", "repository_owner": "acme", "repository_id": "1042", "repository_owner_id": "17", "repository_visibility": "public", "ref": "refs/heads/main", "sha": "4b825dc642cb6eb9a060e54bf8d69288fbee4904", "check": "release", "run_id": "r_01JC2Z", "run_attempt": "1", "job_id": "j_01JC30", "runner_environment": "modernci-hosted", "config_ref": "acme/widgets/.ci/checks.yaml@refs/heads/main", "config_sha": "4b825dc642cb6eb9a060e54bf8d69288fbee4904", "trigger": "push", "landed": true, "run_url": "https://app.modernci.dev/acme/widgets/runs/r_01JC2Z" } ``` ## Fulcio certificate extensions A Sigstore certificate issued for a ModernCI token carries these extensions (OIDs under `1.3.6.1.4.1.57264.1`). Templates use Fulcio's syntax: a bare name is that claim's value. The certificate's subject alternative name (a URI) is `{{ .server_url }}/{{ .config_ref }}`, e.g. `https://git.example.com/acme/widgets/.ci/checks.yaml@refs/heads/main`. | OID | Extension | Template | Example | |---|---|---|---| | `1.3.6.1.4.1.57264.1.8` | Issuer (V2) | `iss` | `https://oidc.modernci.dev` | | `1.3.6.1.4.1.57264.1.9` | Build Signer URI | `{{ .server_url }}/{{ .config_ref }}` | `https://git.example.com/acme/widgets/.ci/checks.yaml@refs/heads/main` | | `1.3.6.1.4.1.57264.1.10` | Build Signer Digest | `config_sha` | `4b825dc642cb6eb9a060e54bf8d69288fbee4904` | | `1.3.6.1.4.1.57264.1.11` | Runner Environment | `runner_environment` | `modernci-hosted` | | `1.3.6.1.4.1.57264.1.12` | Source Repository URI | `{{ .server_url }}/{{ .repository }}` | `https://git.example.com/acme/widgets` | | `1.3.6.1.4.1.57264.1.13` | Source Repository Digest | `sha` | `4b825dc642cb6eb9a060e54bf8d69288fbee4904` | | `1.3.6.1.4.1.57264.1.14` | Source Repository Ref | `ref` | `refs/heads/main` | | `1.3.6.1.4.1.57264.1.15` | Source Repository Identifier | `repository_id` | `1042` | | `1.3.6.1.4.1.57264.1.16` | Source Repository Owner URI | `{{ .server_url }}/{{ .repository_owner }}` | `https://git.example.com/acme` | | `1.3.6.1.4.1.57264.1.17` | Source Repository Owner Identifier | `repository_owner_id` | `17` | | `1.3.6.1.4.1.57264.1.18` | Build Config URI | `{{ .server_url }}/{{ .config_ref }}` | `https://git.example.com/acme/widgets/.ci/checks.yaml@refs/heads/main` | | `1.3.6.1.4.1.57264.1.19` | Build Config Digest | `config_sha` | `4b825dc642cb6eb9a060e54bf8d69288fbee4904` | | `1.3.6.1.4.1.57264.1.20` | Build Trigger | `trigger` | `push` | | `1.3.6.1.4.1.57264.1.21` | Run Invocation URI | `run_url` | `https://app.modernci.dev/acme/widgets/runs/r_01JC2Z` | | `1.3.6.1.4.1.57264.1.22` | Source Repository Visibility At Signing | `repository_visibility` | `public` | ModernCI checks have no reusable-configuration indirection, so the build signer and the build config are the same file. ## Security model - **Who can get a token.** Only a running job. At launch ModernCI creates a random credential for that job, keeps only its hash, and gives the secret to the runner over the job's secret channel (never on a command line; redacted from logs). The token endpoint answers only while the job is running; once it finishes the credential is refused. - **Isolation between tenants.** A credential resolves to exactly one job, and the token describes only that job: tenant, project, repository and commit come from ModernCI's records, never from the request. `sub` includes the git host, so the same owner/repository on two hosts never collide. - **No signing keys in jobs.** Token-signing keys live behind the signing seam (a key file now; cloud KMS or HSM in production) in a separate process. Keyless signing in a job uses an ephemeral key and the job's token. - **Short lifetime.** Tokens live at most 10 minutes (5 by default) and are audience-scoped. ## Key rotation Each key has a start time. A new key is published in the JWKS 30 minutes before it starts signing, so verifiers that cache the JWKS already know it. A replaced key stays published for at least the longest token lifetime after it stops signing, so every token it signed still verifies. Cache the JWKS for no longer than 5 minutes (the endpoint sends `Cache-Control: max-age=300`). ## Verifying ModernCI-signed artifacts ```sh mci attestation verify widget.tar.gz \ --bundle widget.tar.gz.sigstore.json --policy policy.json \ [--trusted-root trusted_root.json] ``` It checks the signature, the certificate identity (issuer and subject pattern), the transparency log inclusion proof and signed entry timestamp, and the SLSA provenance policy. Without `--trusted-root` it uses the public Sigstore instance. A keyless policy: ```json { "signer": {"keyless": {"issuer": "https://oidc.modernci.dev", "subject_regex": "https://git\\.example\\.com/acme/widgets/\\.ci/.*@refs/heads/main"}}, "transparency_log": "required", "certificate": {"source-repository-ref": "refs/heads/main", "runner-environment": "modernci-hosted"}, "provenance": {"builder_id": "https://modernci.dev/builder/v1", "source_repository": "https://git.example.com/acme/widgets", "source_refs": ["refs/heads/main"], "landed": true} } ``` ModernCI's own releases are signed with the platform key; verify them with a key policy (`transparency_log` may be `optional` for offline, air-gapped verification): ```json {"signer": {"key": {"public_keys": ["ed25519:<64 hex>"]}}, "provenance": {"builder_id": "https://modernci.dev/builder/v1", "source_refs": ["refs/heads/main"], "landed": true}} ``` Bundles are standard Sigstore bundles, so `cosign verify-blob --bundle … --certificate-oidc-issuer https://oidc.modernci.dev --certificate-identity-regexp …` also works once the issuer is trusted by the Fulcio that issued the certificate. ================================================================================ --- title: "Enterprise self-install: ModernCI docs" description: "Run ModernCI in your own environment, licensed and delivered directly by ModernCI." url: https://modernci.dev/docs/self-hosted/ --- # Enterprise self-install Enterprise customers can run ModernCI in their own environment. It's licensed and delivered directly by ModernCI. [Contact sales](/pricing/#enterprise). Everyone else: ModernCI is a cloud service. Contact hello@modernci.dev for access, sign in at https://app.modernci.dev and host nothing; the only download is the [`mci` CLI](/docs/install.md).