Course contents
presets-dev CLI reference: commands, flags and recipes
On this page
Commands
| Command | What it does |
|---|---|
npx presets-dev add <id...> | Install one or more stacks or standalone presets |
npx presets-dev list | List install IDs and their skills |
npx presets-dev --help | Help; add --help for flags |
npx presets-dev --version | Print the version |
The package also installs a presets binary alias. Use the full npx presets-dev form with npx, because npx presets would fetch a different package from npm.
add flags
| Flag | Meaning |
|---|---|
-t, --tool <tool,...> | Comma-separated tool ids: cursor, copilot, claude, windsurf, cline, codex, antigravity. Default: auto-detect. |
--only <role> | standards or skill. Default: both. |
--dry-run | Print the plan without writing files. |
--force | Replace existing preset files, or the marked section in AGENTS.md / GEMINI.md. |
--agents-md | Append Antigravity standards to AGENTS.md instead of GEMINI.md. This is the default when Codex is also selected. |
--gemini-md | Keep Antigravity standards in GEMINI.md even when Codex is selected. |
--ref <ref> | Content git ref (branch, tag or commit). Default: master. |
--cwd <dir> | Project root. Default: the current directory. |
-y, --yes | Use detected tools without prompting. |
list flags
| Flag | Meaning |
|---|---|
--json | Machine-readable output: an array of { "id", "skills" } |
--tool <tool> | Only stacks with entries for that tool |
--ref <ref> | Read the install index from a content branch, tag, or commit. Default: master. |
Auto-detection
Without --tool, the CLI looks for these in the project root:
| Tool | Signals |
|---|---|
| cursor | .cursor/ or .cursorrules |
| copilot | .github/copilot-instructions.md or .github/instructions/ |
| claude | .claude/ or CLAUDE.md |
| windsurf | .devin/, .windsurf/ or .windsurfrules |
| cline | .clinerules (file or folder) or .cline/ |
| codex | AGENTS.md or .codex/ |
| antigravity | GEMINI.md or .gemini/ |
In an interactive terminal, you get a multi-select ("Install presets for which tools?") with detected tools preselected. With --yes, every detected tool is used. In a non-interactive shell such as CI, one detected tool is used as is, but several stop the run:
Detected cursor, codex. Pass --tool <tool,...> to choose, or --yes to install for all of them.
If nothing is detected and there's no terminal to ask, the CLI exits with:
No AI tool detected. Pass --tool <cursor|copilot|claude|windsurf|cline|codex|antigravity>.
How files are written
| Situation | What happens | Output |
|---|---|---|
| File doesn't exist | Created | created |
| File exists | Left alone | skipped (exists) |
File exists, --force | Overwritten | replaced |
AGENTS.md / GEMINI.md exists | Section appended between presets.dev:<stack> markers | appended |
| Stack's markers already present | Left alone (--force replaces only the marked text) | skipped (exists) |
Shared skill already in .agents/skills/ (for cursor, copilot, windsurf, cline) | Tool's own copy skipped | skipped (uses shared .agents/skills/<skill>) |
AGENTS.md links to a file inside the project, such as CLAUDE.md | Section appended to the real file; the link stays | appended AGENTS.md -> CLAUDE.md |
AGENTS.md links outside the project | Left alone | skipped (AGENTS.md is a symlink) |
Cursor, Copilot, Windsurf, Cline, Codex and Antigravity all read .agents/skills/. When you select two or more of them, each skill is written there once, and their own copies are skipped. Claude Code doesn't read that folder, so it always gets its own copy. A single tool still installs into its own folder.
When Codex and Antigravity are both selected, Antigravity's standards go into AGENTS.md once, because Antigravity CLI reads AGENTS.md as well as GEMINI.md. Pass --gemini-md to keep a separate GEMINI.md.
The CLI matches your file's existing line endings (CRLF or LF) when appending. If AGENTS.md grows past 28 KiB, it warns you, because Codex reads only the first 32 KiB by default.
Exit codes
| Code | Meaning |
|---|---|
0 | Success, including "everything skipped" |
1 | Usage error: unknown stack (with close-match suggestions), unknown tool, no tool detected, or several tools detected in a script without --tool or --yes |
2 | Network or HTTP error; the failing URL is printed and no partial files are written |
$ npx presets-dev add nextjss --tool cursor
Unknown stack "nextjss". Did you mean nextjs, nestjs, nodejs? Run presets-dev list.
Safety
- Writes only inside
--cwd; paths that would escape it are rejected. - Downloads only from the presets.dev content repo on GitHub over HTTPS.
- Runs no downloaded code, has no install scripts, and sends no telemetry.
- Never replaces
AGENTS.md,GEMINI.mdorCLAUDE.md; it only appends marked sections.
Recipes
Several stacks at once
npx presets-dev add nextjs tailwind prisma --tool cursorJust the review skill, for Claude Code
npx presets-dev add supabase --tool claude --only skillCodex and Antigravity sharing one AGENTS.md (the default for this pair)
npx presets-dev add nextjs --tool codex,antigravityClaude Code plus Cursor without duplicate skills
npx presets-dev add nextjs --tool claudenpx presets-dev add nextjs --tool cursor --only standardsOne package in a monorepo
npx presets-dev add nextjs --tool codex --cwd apps/webPinned install for CI or onboarding
npx presets-dev add nextjs --tool copilot --ref f57489f --yesScript-friendly stack list
npx presets-dev list --jsonNot in 0.1.2
No remove or update command yet (delete files or re-run with --force), no login, and no agent presets. See the CLI repo for what's planned.
Recap
addinstalls stacks;listshows them.--toolpicks tools;--onlypicks a half;--dry-runpreviews;--forcereplaces.- Shared files get marked sections; existing files are skipped.
- Exit 1 for usage errors, 2 for network errors.
Next step
Share your own preset: Contribute a preset.