Skip to content
Open the dashboard
Start here

Start from a terminal

DevelopersEngineering leads10 min read

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.

  1. Run one command in the repository’s root.

    Terminal window
    npx @groundrule/cli

    In 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.

  2. 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.”

  3. 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.yaml The rules this repository follows
    AGENTS.md, CLAUDE.md and the like The same rules, for your coding agents
    .claude/settings.json Hooks: the check runs when the agent finishes a task

    Commit those files so your whole team gets the same rules.

  4. 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
  5. Share it with your team (optional, needs an account).

    Create a workspace at app.groundrule.dev, then:

    Terminal window
    npx @groundrule/cli login
    npx @groundrule/cli scan --upload

    The 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.

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.