Skip to content

linny006/cursor-rules-picker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

cursor-rules-picker

Pick + install a high-quality .cursorrules (or .cursor/rules/*.mdc) for your project in one command. Backed by linny006/cursor-rules-live — refreshed every 15 minutes from public GitHub repos.

Stars Source License

npx github:linny006/cursor-rules-picker

That's it. The CLI detects your project stack, ranks compatible rules from the live index, and installs the one you pick.


What it does

$ npx github:linny006/cursor-rules-picker

🎯 cursor-rules-picker v0.1.0

🔍 Detecting project context... ✓
   Language: TypeScript
   Frameworks: Next.js, Tailwind CSS

📚 Loading cursor rules library... ✓ 50 indexed (13 have extractable content)

⭐ Top matches for your stack:

  1. vibestackdev/vibe-stack ⭐6 [TypeScript] ●
     29 .mdc architecture rules that prevent AI coding assistants from hallucinating...
  2. pemdes174/cursor-rules ⭐5 [—] ●
     Streamline your Next.js development with practical rules and tested patterns
  3. Costumary/gsap-choreography ⭐6 [—] ●
     AI coding instructions for scripted GSAP product demo animations
  ...

  ● = rules content fetchable    ○ = visit source repo manually

Pick a rule [1-8, q to quit]: 2

📥 Installing pemdes174/cursor-rules...
✓ Wrote .cursor/rules/nextjs-development.mdc (8000 chars)

Next steps:
  • Open Cursor — the rule is picked up automatically
  • Switch rules: npx github:linny006/cursor-rules-picker

Why use this instead of copy-pasting

  • Live data: rules pulled fresh from GitHub every 15 minutes, not a stale curated snapshot
  • Stack-aware ranking: matches you with rules written for your language + frameworks
  • Multi-format support: handles classic .cursorrules, the new .cursor/rules/*.mdc Project Rules format, and cursorrules.json
  • No globals: nothing installed system-wide; npx runs it once and exits
  • Backup safety: if a .cursorrules already exists in your project, it's renamed to .cursorrules.bak before write
  • Zero dependencies: ~250 lines of vanilla Node, no node_modules, no telemetry, no analytics

Requirements

  • Node.js 18+ (node --version)
  • Run from your project root (so the CLI can detect package.json, pyproject.toml, etc.)

Supported project markers

The picker auto-detects:

File / Dependency Inferred
tsconfig.json or typescript in deps TypeScript
next, react, vue, svelte, astro Frontend framework
tailwindcss, shadcn-ui Styling
express, nestjs, fastify Backend framework
prisma, drizzle-orm ORM
pyproject.toml / requirements.txt Python
Cargo.toml Rust
go.mod Go
electron Electron app

Missing a stack marker? PR welcome — see detectStack() in index.js.

How rules are ranked

Each rule gets a score from:

  • +30 if its primary language matches yours
  • +15 per framework keyword hit (Next.js, Tailwind, etc.)
  • +50 bonus for "rules content is fetchable" (we can install it 1-click)
  • +0 to +20 log-scaled star credibility

Top 8 by score are shown. Highest-relevance for your stack appears first.

What gets installed

Depending on the source repo's format:

Source format Installs to
.cursorrules (classic) .cursorrules in current dir
cursorrules.json cursorrules.json in current dir
.cursor/rules/*.mdc (Project Rules format) .cursor/rules/<filename>.mdc

Existing files are backed up to .bak before overwrite.

Privacy

  • No analytics, no phone-home, no telemetry
  • Only HTTP call is GET https://raw.githubusercontent.com/linny006/cursor-rules-live/master/data/items.json — public file, no auth needed
  • Open the source: ~250 lines in index.js

Related projects

Contributing

PRs welcome. Common changes:

  • Add a stack marker: extend detectStack() in index.js to recognize a new framework/lang
  • Improve scoring: tune the weights in score() based on usage
  • Add an install format: extend install() for new rule file conventions as they appear

License

MIT — see LICENSE

About

Pick + install a high-quality .cursorrules / .mdc rule for your project (CLI, ~250 LoC, no deps)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors