Course contents

presets-dev CLI reference: commands, flags and recipes

intermediate4 min readUpdated For presets-dev 0.1.2
  • Cursor
  • GitHub Copilot
  • Claude Code
  • Windsurf / Devin
  • Cline
  • Codex
  • Antigravity CLI
On this page

Commands

CommandWhat it does
npx presets-dev add <id...>Install one or more stacks or standalone presets
npx presets-dev listList install IDs and their skills
npx presets-dev --helpHelp; add --help for flags
npx presets-dev --versionPrint 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

FlagMeaning
-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-runPrint the plan without writing files.
--forceReplace existing preset files, or the marked section in AGENTS.md / GEMINI.md.
--agents-mdAppend Antigravity standards to AGENTS.md instead of GEMINI.md. This is the default when Codex is also selected.
--gemini-mdKeep 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, --yesUse detected tools without prompting.

list flags

FlagMeaning
--jsonMachine-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:

ToolSignals
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/
codexAGENTS.md or .codex/
antigravityGEMINI.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

SituationWhat happensOutput
File doesn't existCreatedcreated
File existsLeft aloneskipped (exists)
File exists, --forceOverwrittenreplaced
AGENTS.md / GEMINI.md existsSection appended between presets.dev:<stack> markersappended
Stack's markers already presentLeft alone (--force replaces only the marked text)skipped (exists)
Shared skill already in .agents/skills/ (for cursor, copilot, windsurf, cline)Tool's own copy skippedskipped (uses shared .agents/skills/<skill>)
AGENTS.md links to a file inside the project, such as CLAUDE.mdSection appended to the real file; the link staysappended AGENTS.md -> CLAUDE.md
AGENTS.md links outside the projectLeft aloneskipped (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

CodeMeaning
0Success, including "everything skipped"
1Usage error: unknown stack (with close-match suggestions), unknown tool, no tool detected, or several tools detected in a script without --tool or --yes
2Network 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.md or CLAUDE.md; it only appends marked sections.

Recipes

Several stacks at once

npx presets-dev add nextjs tailwind prisma --tool cursor

Just the review skill, for Claude Code

npx presets-dev add supabase --tool claude --only skill

Codex and Antigravity sharing one AGENTS.md (the default for this pair)

npx presets-dev add nextjs --tool codex,antigravity

Claude Code plus Cursor without duplicate skills

npx presets-dev add nextjs --tool claude
npx presets-dev add nextjs --tool cursor --only standards

One package in a monorepo

npx presets-dev add nextjs --tool codex --cwd apps/web

Pinned install for CI or onboarding

npx presets-dev add nextjs --tool copilot --ref f57489f --yes

Script-friendly stack list

npx presets-dev list --json

Not 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

  • add installs stacks; list shows them.
  • --tool picks tools; --only picks a half; --dry-run previews; --force replaces.
  • 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.