AgenticCLI

guide · Cursor

shipguard

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.
Copy sentence

Where to paste it

Desktop app

  1. Open your repo in Cursor.
  2. Open the Agent chat and paste the sentence above.
  3. Approve the ShipGuard sign-in once when your browser opens.

Terminal

  1. Open a terminal in your repo and start Cursor's command-line agent.
  2. Paste the sentence above.
  3. Approve the ShipGuard sign-in once when your browser opens.

What your agent runs

  1. Step 1 · Install

    npm i -g @agenticcli/shipguard

    Installs the shipguard command. Runs on your machine.

  2. Step 2 · Sign in (one approval)

    shipguard login

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

  3. Step 3 · First scan

    shipguard scan

    Runs locally. The report is saved on your machine in .shipguard/reports/ (.shipguard/reports/latest.md and .shipguard/reports/latest.json).

  4. Step 4 · Add the policy file

    shipguard init

    Creates shipguard.policy.yml and the reports folder in this repo.

  5. Step 5 · Hook: git

    shipguard hook

    Installs pre-push and pre-merge-commit hooks. They run shipguard scan --json --strict before every push and merge.

  6. Step 6 · Hook: Claude Code

    shipguard hook --target claude

    Adds 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.
Copy block

Reports are saved on your machine in .shipguard/reports/ inside the repo. Your code and your reports stay on your machine.

More