New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cursor-templates

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cursor-templates

A comprehensive template system for Cursor IDE with AI-optimized configurations

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
0
Created
Source

Cursor Templates 🚀

A comprehensive template system for Cursor IDE, providing ready-to-use project configurations with AI-optimized .cursorrules files.

Features

  • Pre-configured Templates: Ready-to-use templates for popular frameworks
  • AI-Optimized Rules: Each template includes .cursorrules for optimal AI assistance
  • CLI Tool: Easy template management and initialization
  • Template Discovery: Search and discover templates
  • Extensible: Create and share your own templates

Installation

npm install -g cursor-templates

Or use directly with npx:

npx cursor-templates init

Quick Start

Initialize a new project with a template

cursor-templates init

Or specify a template directly:

cursor-templates init --template nextjs-app-router

List available templates

cursor-templates list

Search for templates

cursor-templates search react
cursor-templates search --category backend

Available Templates

Frontend

  • nextjs-app-router: Next.js 14+ with App Router, TypeScript, and Tailwind CSS
  • react-typescript-vite: React with TypeScript, Vite, and modern tooling

Backend

  • python-fastapi-async: FastAPI with async/await, SQLAlchemy, and modern Python patterns
  • node-express-typescript: Express.js with TypeScript, modern middleware, and best practices

Template Structure

Each template includes:

  • .cursorrules: AI assistant configuration specific to the framework
  • Template metadata: Description, version, author, and tags
  • Example files: Starter code following best practices
  • Commands: Common commands for development, building, and testing

Example .cursorrules file

# Next.js App Router Development Rules

You are an expert Next.js developer specializing in:
- Next.js 14+ with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- React Server Components

## Code Style
- Use functional components with TypeScript interfaces
- Implement server components by default
- Add 'use client' directive only when necessary
...

Creating Custom Templates

1. Create a new template

cursor-templates create

2. Edit the template configuration

Templates are stored in templates/<template-name>/template.json:

{
  "name": "my-template",
  "description": "My custom template",
  "version": "1.0.0",
  "author": "Your Name",
  "tags": ["custom", "framework"],
  "rules": {
    "context": "You are an expert developer...",
    "style": {
      "language": "TypeScript",
      "framework": "Your Framework",
      "conventions": ["Convention 1", "Convention 2"]
    },
    "restrictions": ["Don't do X", "Avoid Y"],
    "preferences": ["Prefer A", "Use B when possible"]
  },
  "files": [
    {
      "path": ".cursorrules",
      "content": "# Your Cursor rules here..."
    }
  ],
  "commands": {
    "install": "npm install",
    "dev": "npm run dev",
    "build": "npm run build"
  }
}

3. Validate your template

cursor-templates validate my-template

CLI Commands

CommandDescription
initInitialize a new project with a template
listList all available templates
search <query>Search for templates
createCreate a new template
validate <template>Validate a template
featuredShow featured templates
import <url>Import a template from GitHub
recommendGet template recommendations

Template Schema

Templates follow a defined schema for consistency:

  • name: Unique template identifier
  • description: Brief description of the template
  • version: Semantic version (x.y.z)
  • rules: Cursor AI configuration
    • context: AI assistant context
    • style: Code style preferences
    • restrictions: Things to avoid
    • preferences: Preferred approaches
  • files: Files to create when template is applied
  • commands: Common development commands

Contributing

  • Fork the repository
  • Create your template in templates/
  • Test your template with cursor-templates validate
  • Submit a pull request

Integration with Cursor IDE

After initializing a template:

  • Open the project in Cursor IDE
  • The .cursorrules file will automatically configure the AI assistant
  • The AI will follow the specified conventions and best practices

Advanced Features

Template Discovery

# Search by category
cursor-templates search --category frontend

# View featured templates
cursor-templates featured

# Get recommendations
cursor-templates recommend

Import from GitHub

cursor-templates import https://github.com/user/template-repo

Best Practices

  • Keep rules focused: Make .cursorrules specific to your framework
  • Include examples: Provide example code in your templates
  • Document commands: Include all relevant development commands
  • Use semantic versioning: Follow semver for template versions
  • Test thoroughly: Validate templates before sharing

Key Features

FeatureStatusDescription
Framework Templates15+ modern framework templates
AI Rules ConfigurationOptimized .cursorrules for each template
CLI ToolPowerful command-line interface
Template DiscoverySearch and browse templates
GitHub ImportImport templates from repositories
Custom TemplatesCreate your own templates

License

MIT

Support

  • Report issues: GitHub Issues
  • Documentation: Full Documentation

Built with ❤️ for the Cursor IDE community

Keywords

cursor

FAQs

Package last updated on 02 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts