Start from a terminal
This way keeps everything on your machine. One command looks at a repository, shows what the rules find, and offers to set it up. You need no account for the first three steps.
You need: a repository on your computer, with git and Node.js 22 or later. Nothing is installed globally.
No terminal at hand? Use Start on GitHub instead.
-
Run one command in the repository’s root.
Terminal window npx @groundrule/cliIn a repository that isn’t set up yet, this takes a first look. It writes nothing. It prints the stack it found, how many rules apply and how many of them are checked, and then “What the checks find in this repository today”, worst first.
-
Read what it found.
These are findings in code that already exists. The command says so: “This is code that already exists: it is listed, and it never blocks.” and “Once set up, only what a change introduces is checked.”
-
Answer one question.
The command lists the files it would write and asks “Set it up now? [Y/n]”. Answer Y. It writes:
File What it is .groundrule/config.yamlThe rules this repository follows AGENTS.md,CLAUDE.mdand the likeThe same rules, for your coding agents .claude/settings.jsonHooks: the check runs when the agent finishes a task Commit those files so your whole team gets the same rules.
-
Work as usual.
Your coding agent now reads the rules before it writes, and the check runs when it finishes. To check a change yourself before pushing:
Terminal window npx @groundrule/cli check -
Share it with your team (optional, needs an account).
Create a workspace at app.groundrule.dev, then:
Terminal window npx @groundrule/cli loginnpx @groundrule/cli scan --uploadThe scan’s result appears in the dashboard under Activity. Only results are uploaded, never your source.
You should now have a repository whose coding agents follow the rules, and a check you can run on any change.
What to do next
Section titled “What to do next”| If you want to | Do this |
|---|---|
| Check every pull request | Add the check to CI: Run Groundrule in CI. Or let Groundrule check pull requests on GitHub with no CI step: Start on GitHub. |
| Add rules for your stack | npx @groundrule/cli packs lists the packs. Add one under extends in .groundrule/config.yaml. See Init and config. |
| Understand a finding | npx @groundrule/cli explain SEC-004 says why the rule exists and how to comply. |
| Use one rulebook across repositories | Connect the repository to your workspace: CLI quickstart. |