If you build alone, Safeguard works as a security teammate that lives in your terminal. Install the Safeguard CLI and sign in once. After that it scans your project on your own machine, fixes vulnerable dependencies with your approval and reviews changes before you push. Your sessions also show up in the desktop app and on your phone.
You do not have to give up the AI tools you already pay for. Bring the Claude, ChatGPT or Codex plan you already pay for and use it inside the Safeguard CLI. Safeguard adds no extra charge for that usage; your plan's own usage limits and terms still apply. If you prefer to stay in a chat window, connect Claude or ChatGPT to the Safeguard MCP server and ask about your projects from the chat you already use.
This guide is written for one person with one or a few repositories, no security team and limited time. Every command below comes from the Safeguard CLI's own help output or the Safeguard docs.
What you will have at the end
Work through this guide once, in about an afternoon, and you will have:
- The Safeguard CLI installed, signed in and passing
safeguard doctor. - A first scan of your project, with results as JSON files under
./output. - One real dependency fix made by the assistant, approved by you step by step, with tests run.
- A permission mode you chose on purpose, and a way back if an edit goes wrong.
- A quick review habit before every push.
- A small CI check that fails the build on critical findings.
- The desktop app and phone app showing the same conversations, so you can approve work away from your desk.
The setup is light on purpose. A solo developer needs a routine that takes minutes a day, not a program that needs a security lead to run it.
Step 1: Install, sign in and run your first scan
Safeguard is one platform on every surface. The CLI is the place to start because it works on the code in front of you.
- Install the CLI. It is a single static binary with no Node, Python or JVM to install alongside it. On macOS and Linux:
curl -fsSL https://cli.safeguard.sh/install | bash
On Windows, in PowerShell:
irm https://cli.safeguard.sh/install.ps1 | iex
The download page says the installer verifies the checksum and that each release publishes a SHA256SUMS file. Binaries cover macOS on Apple Silicon and Intel, Linux on x86_64 and arm64, and Windows on x86_64.
- Confirm it runs.
safeguard --version
safeguard doctor
safeguard doctor checks everything the assistant depends on (environment, sign-in, profile, policy and tools) and prints what is wrong in the order that matters. It changes nothing. Its exit code is 0 whenever the checks ran, so read the lines rather than the status.
-
Open the interactive terminal and sign in. Run
safeguardwith no arguments, then type/login. Your browser opens, you approve the session, and the local runner starts polling for scan jobs./whoamishows who you are signed in as. -
Scan the current folder. Inside the terminal, type
/scan .. Or run the same thing from your shell:
cd ~/code/payments-api
safeguard scan --dir .
The scan builds an SBOM and matches it against vulnerability databases. Results land as JSON files under ./output, including vuln.json and license.json. The first run takes longer because it downloads the scanner tools and the vulnerability database.
- Ask a plain question. In the interactive terminal, type "how many critical vulns do we have". The assistant has tools for your Safeguard data as well as your local files, and picks whichever the question needs.
If you only want a quick look with nothing uploaded at all, safeguard findings sca --dir . runs one scanner locally and prints a normalized list (id, severity, package and version, fixed version, remediation). The help text is explicit: no project is registered and no finding or file is uploaded, even when you are signed in.
For per-system detail, see installing the Safeguard CLI on macOS.
Do the work properly with the Safeguard CLI
Scanning is the easy part. The value for a solo developer is that the same tool that finds a problem can also write the fix, run your tests and stop for your approval at each step. The Safeguard CLI can write code, not only scan.
Your first fix
In the interactive terminal, ask in plain language:
fix the lodash CVE in this repo
The assistant reads the finding, the files involved and the advisory. When it wants to run a command or edit a file, it asks first. You press y or n.
The recorded session below was made on a Mac on 21 October 2026, against a sample project called payments-api with test data. It shows the install with the curl command (checksum verified), safeguard --version, then the request above. The assistant edits package.json to lodash 4.17.21, runs npm install and npm test with approval, and prints a summary with a suggested commit message. It pushes nothing. The session ends with /permissions, /model and /scan ..
Click through it at your own pace, or open it full screen.
That last detail matters when you work alone. Nobody else is reviewing your commits, so the assistant hands you a summary and a commit message and leaves the push to you.
Writing code, not only fixing it
The assistant is a general terminal assistant too. It can find and read files, edit code and run commands, each with your approval, plus everything security. Some requests that fit a solo day:
- "What's the latest file in ~/Downloads" (an example straight from the docs).
- "Add input validation to the refund handler and write a test for it."
- "Explain what this migration does before I run it."
- "Which of my dependencies have a fix available?"
Two shortcuts make this faster. Type @ to attach a file from the folder you started in, so the assistant reads exactly the file you mean. Type /resume to pick up the last session in that folder after a break. Press esc to interrupt a running task without leaving the terminal, and ctrl+j to add a new line to a long request.
If you want the dependency fix without a conversation, the fix command does it directly. Preview first:
safeguard fix --dry-run --severity high
--dry-run shows the changes without touching files. Drop it to apply them. By default fix only upgrades (never downgrades), allows minor upgrades, keeps a backup of the original files and writes fix-report.json. Add --patch-only if you want the smallest possible change.
Using your Claude, ChatGPT or Codex plan
You already pay for an AI plan, and Safeguard does not ask you to pay twice. Bring your Claude, ChatGPT or Codex plan into the Safeguard CLI; Safeguard adds no extra charge for that usage, and your plan's own limits and terms still apply. To see or switch the model for a session, type /model. For connecting a model, follow the Safeguard CLI docs or /model itself.
If you have been using Claude Code or Codex, safeguard import claude or safeguard import codex converts that setup into Safeguard configuration. A related switch, safeguard other-agents, is on by default. It reads Claude Code's, Codex's and OpenCode's agents, skills, custom commands, MCP servers, hooks, permissions and instructions below Safeguard's own. Run safeguard other-agents off if you want only Safeguard's files.
Approvals: pick a mode on purpose
/permissions sets how much the assistant may do without asking. The current mode shows in the bar under the input. The interactive CLI offers five modes:
| Mode | What runs without asking | What asks first | Good solo use |
|---|---|---|---|
| Ask | Reads | Every edit and every command | An unfamiliar repo, or your first week |
| Accept edits | Edits in this folder and read-only commands | Other commands | A focused refactor you will review in git |
| Plan | Nothing changes; it reads and plans only | Not applicable | "Tell me how you would do this" |
| Auto (default) | Read-only commands and what the policy allows | Anything else | Day-to-day work |
| Strict | Pre-approved actions only | Everything else is denied | CI and scripts |
There is also a --yolo flag that approves everything. Keep it for throwaway sandboxes only, never the laptop that holds your SSH keys and client work.
Undo with checkpoints
The assistant snapshots every file before it writes or edits it. Those snapshots are checkpoints, the same ones /rewind uses inside a session. From your shell:
safeguard checkpoints list --session <id>
safeguard checkpoints restore <checkpoint> --session <id> --dry-run
safeguard checkpoints restore <checkpoint> --session <id> --files-only
--dry-run shows what would change as a diff. A restore puts back every file changed since that checkpoint and removes files the assistant created. The state it overwrites is kept as a new checkpoint, so a restore can itself be undone. One limit to remember: anything a shell command writes is not snapshotted. If npm install rewrote your lockfile, git is your undo for that.
CI with safeguard exec
safeguard exec "summarise the critical findings in this repository" runs one non-interactive assistant turn and exits. Its default permission mode is strict: nothing is asked, and anything not pre-approved by the policy file is denied. It refuses to run outside a git repository, because there would be no way to undo what it changes. That makes it a safe fit for a nightly job on a one-person project. There is a longer walkthrough in running safeguard exec in CI.
Keep watch from your desk and your phone
When you work alone, you are also the on-call engineer, the reviewer and the release manager. It helps when your security tool follows you between devices instead of living in one terminal window.
A CLI session is live. It shows in the web app, the desktop app and the phone app, and other devices can send work to it. From the desktop or phone app you can send work to a computer running the CLI: pick the computer and the folder, then approve each command and file edit there.
On the desktop. The desktop app (3.2.2 on the download page) runs on Windows 10 and 11 (one installer for x64 and ARM, per user, no admin rights), macOS 12 and later (Apple Silicon, with an Intel build linked; signed and notarized) and Linux as an x86_64 AppImage. The Windows builds are not yet code-signed, so SmartScreen may warn. Check the SHA-256 on the download page first, then choose More info, Run anyway. The desktop app guide covers each system.
On your phone. Android phones and tablets install from Google Play. A direct APK (1.0.2) with a SHA-256 to check is offered for phones without Google Play or for company-managed rollout. iPhone and iPad install from the App Store.
The recorded Android session below shows the solo developer's favourite trick. The same conversations from your laptop appear on the phone. "Work on my computer" picks a computer running the CLI and a folder. The command then waits on the phone for Allow once, Allow for turn or Deny, and the answer shows the tests passed.
Click through it at your own pace, or open it full screen.
To keep your machine reachable while you are out, run safeguard runner install. The help text describes it as keeping this machine reachable from your other devices, starting at login. safeguard runner uninstall removes that login service.
Two smaller commands help when you hop between devices:
safeguard devices
safeguard send --to <device> --link https://docs.safeguard.sh/docs/cli
safeguard inbox
devices lists your signed-in devices. send passes a link or up to 8,000 characters of text to one of them. inbox shows what your other devices sent to this CLI.
A weekly routine for a one-person project
Here is a routine that fits around real work. It assumes one main repository on GitHub, but the steps translate to any host.
Every working day: review before you push
Before a push, ask the CLI to look at what you changed:
safeguard review
safeguard review --base origin/main
safeguard review reviews the working tree changes for correctness and security. --base diffs against a git ref instead, which is useful when you want the whole branch. This is also the right check for code an AI agent wrote, whichever agent it was. More on that in reviewing AI-generated code before merge.
If you want a nudge you cannot forget, put it in a git pre-push hook. Git calls the hook before anything is sent; a non-zero exit aborts the push. The version below only prints the review and always lets the push continue, so it never traps you:
#!/bin/sh
# .githooks/pre-push
echo "Safeguard review of this branch:" >&2
safeguard review --base origin/main >&2
exit 0
mkdir -p .githooks && chmod +x .githooks/pre-push
git config core.hooksPath .githooks
Git ignores hooks without the executable bit, so the chmod matters. Keeping hooks in .githooks through core.hooksPath also means they live in version control with your project.
Every push: a CI check that fails on criticals
A one-step job is enough. Create a secret key in Safeguard under Settings, Developer with the scans:trigger and scans:read scopes. Store it in GitHub under Settings, Secrets and variables, Actions as SAFEGUARD_API_KEY. Then add a workflow like this, adapted from the GitHub Actions template in the CI/CD docs (use the docs version as the source of truth):
name: safeguard
on:
push:
pull_request:
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Safeguard scan
env:
SAFEGUARD_API_KEY: ${{ secrets.SAFEGUARD_API_KEY }}
SAFEGUARD_INSTALL_DIR: ${{ runner.temp }}/safeguard
run: |
curl -fsSL https://cli.safeguard.sh/install | bash
"$SAFEGUARD_INSTALL_DIR/safeguard" ci scan --wait --fail-on critical
The docs note that no checkout step is needed because the scan clones the repository on Safeguard. If you would rather scan on the runner and upload only results, safeguard ci scan --local --wait --fail-on high does that, and needs a checkout step first. With --local, dependencies are scanned (SBOM and vulnerabilities); SAST runs only in the platform mode.
Once a week: tidy up
Set aside twenty minutes on the same day each week.
- Run
safeguard self-update --checkto see whether a new CLI release is out, thensafeguard self-updateto install it. It verifies a signed manifest before replacing anything, keeps the previous binary assafeguard.previousand refuses to cross a major version without--allow-major. - Ask the assistant: "which findings in this repo have a fix available, highest severity first?"
- Work through the top one or two with the approval flow above. Commit each fix on its own. For a Node project,
npm cion a clean checkout is a cheap final check: npm's docs say it exits with an error ifpackage.jsonand the lockfile disagree, instead of updating the lockfile. - If you ship a container, scan the image you just built:
safeguard container-scan --image payments-api:latest. It produces the same output assafeguard scan --image. - If a customer asks what is inside your product, generate an SBOM with
safeguard sbom --dir . --output payments-api-sbom.json, then check it withsafeguard validate payments-api-sbom.json.validatechecks CycloneDX, SPDX and VEX documents.
That is the whole routine. Most weeks it will be a few minutes of reading and one small fix.
Troubleshooting
safeguard is not found after installing. Open a new terminal so your shell picks up the updated PATH, then run which safeguard (or Get-Command safeguard in PowerShell).
The first scan is slow. Expected. The first run downloads the scanner tools and the vulnerability database. Later scans reuse them.
safeguard doctor exits 0 but something is still wrong. Its exit code only says the checks ran. Read the printed lines; they are ordered by what matters most.
safeguard exec refuses to start. It will not run outside a git repository. Run git init first, or pass --skip-git-repo-check if you accept that changes cannot be undone through git.
The runner never picks up work on a strict network. The runner long-polls over outbound HTTPS. If your network drops held connections, start it headless with safeguard runner start --workspace <path> --poll-wait 0, which switches to fixed-interval polling set by SAFEGUARD_POLL_INTERVAL (default 10 seconds).
The terminal is black and white. The CLI honours NO_COLOR deliberately. Unset it if you want colour.
The mouse wheel does not scroll. The CLI does not capture the mouse. Use PgUp, PgDn and the arrow keys.
self-update refuses to install. It refuses older versions, unverifiable downloads and major version jumps. For a major version, read the release notes and run safeguard self-update --allow-major.
You meant to update the vulnerability data, not the binary. That is safeguard update, which refreshes the databases the scanners use. self-update replaces the executable.
Common mistakes
- Running
--yoloon your real machine. It approves everything. It belongs in a throwaway sandbox, not on the laptop that holds your credentials. - Expecting checkpoints to undo
npm install. Checkpoints cover files the assistant writes or edits. Files a shell command writes are not snapshotted, so commit before a big change and let git cover the rest. - Leaving Accept edits on when you open a new repo. Switch back to Ask or Auto when the code is unfamiliar.
- Treating an empty result as proof of safety. An empty answer means the query matched nothing in your current scope. Scan the folder you meant, and check the project you meant.
- Expecting the CLI to enforce policy. Policies and gates are evaluated in the platform, not by the CLI. In CI,
--fail-onand--fail-on-gateare how a build stops. - Forgetting fork pull requests. GitHub does not pass secrets to workflows triggered from forks, so a scan step that needs
SAFEGUARD_API_KEYfails there. If you accept outside contributions, plan for that. - Pushing what the assistant suggested without reading it. The assistant stops before the push for a reason. Read the summary, run the tests yourself if in doubt, then commit.
FAQ
Do I need a security background to use Safeguard alone?
No. You can ask in plain language, such as "how many critical vulns do we have" or "fix the lodash CVE in this repo", and the assistant explains what it found and what it plans to do before it acts. You stay in control through the approval prompts.
Can I use the AI plan I already pay for?
Yes. Bring the Claude, ChatGPT or Codex plan you already pay for and use it inside the Safeguard CLI. Safeguard adds no extra charge for that usage; your plan's own usage limits and terms still apply. Use /model or the CLI docs to connect a model.
Does my source code leave my laptop?
When the local runner runs platform scan jobs, your source code stays on the machine and only SBOMs and findings are uploaded. safeguard findings goes further and uploads nothing at all.
Which permission mode should a solo developer use?
Start in Ask for your first week so you see every action. Move to Auto, the default, once you trust the flow. Use Plan when you want a plan without changes, Accept edits for a focused refactor, and Strict for scripts and CI. Keep --yolo for throwaway sandboxes.
Can I use Safeguard from Claude or ChatGPT instead of the terminal?
Yes. Connect Claude or ChatGPT to the Safeguard MCP server and you can ask about your projects and findings from the chat you already use. The terminal remains the place for edits and commands on your own machine.
What if I am away from my desk?
Install the phone app, then run safeguard runner install on your computer so it stays reachable. Your CLI sessions appear on the phone, and you can send work to your computer and approve each command with Allow once, Allow for turn or Deny.
How do I undo a change the assistant made?
Inside a session, /rewind. From the shell, safeguard checkpoints list --session <id>, preview with restore --dry-run, then restore. Shell command output is not covered, so keep using git.
Can I try Safeguard without installing anything?
Yes. The download page lists a cloud sandbox: an isolated tenant against a seeded demo repo, free for seven days with no card. There is also a Cloud CLI hosted by Safeguard and the full web interface in a browser.
Try it yourself
This walkthrough sets up the runner on your own machine: pick the platform, start it, approve it with its device code, then use the same CLI to scan from the terminal.
Click through it at your own pace, or open it full screen.
When you are ready, install from safeguard.sh/download and keep the CLI docs open in a tab. For more on day-to-day use, read the Safeguard CLI as an AI assistant on your machine.
Quick check
Which command previews a dependency fix without changing any files?
safeguard fix --dry-run. Add --severity high (the default) or --patch-only to narrow it, then run it again without --dry-run to apply.
Does a checkpoint restore undo what npm install wrote?
No. Checkpoints snapshot files the assistant writes or edits. Anything a shell command writes, such as an updated lockfile, is not snapshotted, so use git for that.
Where are policies and gates evaluated?
In the Safeguard platform, not in the CLI. In CI, safeguard ci scan --wait --fail-on-gate <name> waits for that evaluation and fails the step when the gate fails.
Sources
- Safeguard CLI documentation
- Safeguard CLI interactive terminal
- Safeguard local runner
- Safeguard CI/CD integration
- Safeguard download page
- Git hooks documentation (pre-push, core.hooksPath)
- GitHub Docs: using secrets in GitHub Actions
- npm Docs: npm ci
Last reviewed: 21 October 2026.