Learn Redline

Take a small TypeScript service from no Redline at all to a merge gate that has earned the right to block. 11 short pages, about 73 minutes. You need no prior knowledge of Redline: each new idea is explained where you first meet it.

✓

redlinegate@0.2.11 is the version on npm's latest tag, published 2026-10-13. Every command on this page installs it.

Redline in one minute

Coding assistants write a lot of code, quickly. A reviewer reading that code cannot hold every rule the team cares about in their head: no secrets in code, validate what comes in from outside, no as unknown as to make the compiler stop complaining. Redline writes those rules down once, and checks them in three places:

  1. While the code is written. The rules are rendered into the files your assistant reads on every request: AGENTS.md, CLAUDE.md, the Copilot instructions and the Cursor rules.
  2. Before you push. redline review checks your change on your machine, and /redline-review asks your assistant to do the same.
  3. On the pull request. A merge gate runs the same checks again, plus a few only a pipeline can do: a secret scan, a vulnerable-dependency check, a checklist.

It also counts which rules people act on, so a team can tell the rules that catch real bugs from the ones that only make noise.

What you need

  • git and Node 18.11 or later.
  • pnpm, or npm, yarn or bun. Every command that differs has a tab for each.
  • A GitHub account and the GitHub CLI, signed in with gh auth login. The gate runs on pull requests, so each step opens one.
  • An AI assistant, if you have one: Claude Code, GitHub Copilot or Cursor. Steps 02 to 04 run a review inside it. Without one, those steps show what it would say.

How this path works

You follow one real repository, redline-demo. Each step is one pull request there, merged and tagged, from step-00 to step-09. At every step you can see exactly what the repository held.

You do the work in a repository of your own. Step 00 copies the demo's starting files into a new GitHub repository under your account. The demo itself is only ever read from.

From step 01 on, a step ends the same way: commit on a branch, open a pull request, watch the checks, merge, and pull main before the next step. Step 02 is the exception: its pull request stays open, and step 03 fixes and merges it. Rather just read? Every step links the demo's pull request, so you can follow without running anything.

Mark each step complete as you go. Your progress is kept in this browser only.

The steps

Check your understanding

A rule is broken in a pull request. Where can Redline first notice it?