Options
Every flag, and where it works.
On this page
| Option | Works with | What it does |
|---|---|---|
--json | checking a folder, a link, or --mine | Print the results as JSON instead of text. See JSON output. |
--mine | on its own | Check every repo you own on GitHub. See `forkguard --mine`. |
--upstream | pr | Send the pull request to the repo you forked from. See `forkguard pr`. |
--remove | setup | Take the automatic checks back out of your shell profile. |
--write | agent | Add the agent rules to AGENTS.md, CLAUDE.md and similar files instead of printing them. Next release. |
--version, -v | anything | Print the version. |
--help, -h | anything | Print all commands. |
#Commands
| Command | Argument |
|---|---|
forkguard [folder] | A folder to check. Defaults to the current folder. |
forkguard <owner/repo or url> | A GitHub repo or any git URL to check. |
forkguard fix [folder] | A folder to clean. |
forkguard pr [folder] | A git repo to clean and open a pull request on. |
forkguard setup | No argument. |
forkguard agent [folder] | A folder whose agent files to write. Defaults to the current folder. |
#Internal
forkguard --gate <tool> <args…> is what the shell hooks call. It exists for forkguard setup, and is not meant to be typed by hand. It exits 1 to stop a package manager and 0 otherwise.