guide · Cursor
Set up ShipGuard in Cursor
One sentence is all Cursor needs. It installs ShipGuard, runs a first scan, keeps the reports on your machine and adds a hook. You approve the sign-in once.
Paste this to your agent
Set up ShipGuard from agenticcli.dev in this repo. Run a first scan, keep the reports locally, and add it as a hook so it runs automatically before every merge.
Where to paste it
Desktop app
- Open your repo in Cursor.
- Open the Agent chat and paste the sentence above.
- Approve the ShipGuard sign-in once when your browser opens.
Terminal
- Open a terminal in your repo and start Cursor's command-line agent.
- Paste the sentence above.
- Approve the ShipGuard sign-in once when your browser opens.
What your agent runs
Step 1 · Install
npm i -g @agenticcli/shipguardInstalls the shipguard command. Runs on your machine.
Step 2 · Sign in (one approval)
shipguard loginPrints a link and a code and opens your browser. Ask the person at the keyboard to approve it once. If the approval is not given in time, run shipguard login again.
Step 3 · First scan
shipguard scanRuns locally. The report is saved on your machine in .shipguard/reports/ (.shipguard/reports/latest.md and .shipguard/reports/latest.json).
Step 4 · Add the policy file
shipguard initCreates shipguard.policy.yml and the reports folder in this repo.
Step 5 · Hook: git
shipguard hookInstalls pre-push and pre-merge-commit hooks. They run shipguard scan --json --strict before every push and merge.
Step 6 · Hook: Claude Code
shipguard hook --target claudeAdds a Claude Code hook in .claude/settings.json that runs the same check when the agent pushes or merges. Skip it if you do not use Claude Code.
Cursor reads AGENTS.md, so the repo block keeps its agent on the gate. The git hooks run before every push and merge.
Then it adds this to your repo
Last step · add this to AGENTS.md in your repo
## ShipGuard - ShipGuard is the release gate for this repo. It runs locally; code never leaves this machine. - Reports are saved in .shipguard/reports/ (.shipguard/reports/latest.md, .shipguard/reports/latest.json). - Before every push or merge, run: shipguard scan --json --strict - Exit 0 means the scan completed: read "recommendation" in the JSON. Exit 1 means blocked: fix each finding with blocking:true, then scan again. - The hooks from "shipguard hook" run this automatically. Keep them on; do not skip them with --no-verify.
Reports are saved on your machine in .shipguard/reports/ inside the repo. Your code and your reports stay on your machine.
More
- The full script for agents
- llms.txt, the same script as plain text
- ShipGuard docs
- Set up ShipGuard in Claude Code
- Set up ShipGuard in Codex