// the ctrlhq command line
Your setup, in the repo you just opened.
Sign your computer in once. In any repository, ctrlhq finds the project, gathers what applies to you and writes it where Claude Code, Cursor, Copilot and Codex look. Nothing gets committed.
Needs Node 18 or newer and git.
// get going
Three commands to a set-up repository.
Run them with npx ctrlhq, or install it once with npm i -g ctrlhq and drop the npx.
-
STEP 1
Sign this computer in
It shows a code and opens CtrlHQ in your browser. Check that the code matches and approve. The computer gets its own key; your password never touches the terminal.
$ npx ctrlhq login
-
STEP 2
Set up a repository
In the repository, it finds the project by its git remote and writes your setup. A repository CtrlHQ doesn't know yet? Pick the project, and an admin can have it remembered for everyone.
$ npx ctrlhq init
-
STEP 3
Stay current
When someone changes a rule, adds a skill or locks something in CtrlHQ, one command brings it in. Files you edited here stay as you left them.
$ npx ctrlhq sync
// every command
What you can do with it.
Seven commands. The four that work on a repository run inside it; ctrlhq help prints them all.
- $ ctrlhq login
- Sign this computer in. You approve it in the browser; the code lasts 10 minutes.
- --no-browser only print the address
- $ ctrlhq init
- Find the repository's project and write the setup that applies to you there.
- --project <name> choose the project--no-project agency, teams and you only--space <id> if you're in several
- $ ctrlhq sync
- Bring the setup up to date with CtrlHQ: new items come in, removed ones go.
- --force replace files you changed--tools cursor,codex only these tools--yes turn new commands on without asking
- $ ctrlhq status
- See which layers apply, how many rules, skills and servers you get, what changed on either side and which keys you still need to set.
- read-only
- $ ctrlhq off
- Take everything ctrlhq wrote out of this repository. Your own files stay.
- --force also files you edited
- $ ctrlhq whoami
- See who this computer is signed in as, your agencies, your access in each and the tools each one uses.
- read-only
- $ ctrlhq logout
- End this computer's key. The files stay until you run
ctrlhq off.
// what you get
Everything that applies to you. Nothing that doesn't.
ctrlhq asks CtrlHQ for your setup in this project and stacks it broadest first. Someone on another team, or on another client's project, gets a different stack from the same command.
Rules add up
Every rule from every layer applies, so the agency's standards and the project's conventions sit side by side.
The closest one wins
Two skills, agents, commands or servers with the same name? The narrower layer's is used, unless a broader layer locked its own.
Team extras per project
Frontend's everyday skills everywhere, plus the 2D ones only on the projects that need them. Teams inherit from the teams above them.
// where it writes
Each tool, in its own format.
ctrlhq writes for the tools your agency uses, or the ones you name with --tools. Your team keeps the editor it likes.
Claude Code
rules · skills · agents · commands · hooks · MCP
- .claude/rules/ctrlhq/
- .claude/skills/
- .claude/agents/
- .claude/commands/
- .claude/settings.local.json
- .mcp.json
Cursor
rules · MCP
- .cursor/rules/ctrlhq-*.mdc
- .cursor/mcp.json
GitHub Copilot
rules
- .github/instructions/ctrlhq-*.instructions.md
Codex
rules
- AGENTS.md
Each rule names where it came from, so you can tell your agency's standards from the project's. When a repository has no CLAUDE.md, Claude Code reads AGENTS.md too, and ctrlhq doesn't write the same rules twice.
// safe by default
It works in client repositories, so it behaves like a guest.
Nothing committed
Everything it writes is listed in .git/info/exclude on your computer only, so it never shows in git status. Files the repository tracks are never touched.
Your edits stay
It never overwrites a file it didn't write. Change one of its files and sync keeps your version until you say --force.
Your settings merged, not replaced
In .mcp.json and your local settings it adds and removes only its own entries. Your own servers and hooks stay, and your server wins on a name clash.
Asks before it runs anything
Hooks and MCP servers start programs. ctrlhq shows each command and waits for your yes. A changed command asks again; saying no keeps the ones you already allowed.
Keys stay on your machine
CtrlHQ never holds your MCP keys. ctrlhq writes references like ${TRACKER_TOKEN}, and status tells you which to set.
Every computer approved by you
Each computer gets its own key after you approve it in the browser. Sign one out and its key stops working; someone who leaves your agency loses access on every computer.