Coding & DevelopmentāŒØļøcursor🌐universal

cursor.link

gists but for cursor rules, easy to share

Quick Start

Install this Skill

npx skills add R44VC0RP/cursor.link
# cursor.link

> Share and discover Cursor rules – like Gist, but for Cursor IDE rules

**[šŸš€ Live Demo](https://cursor.link)**

cursor.link is a platform for creating, sharing, and discovering Cursor IDE rules. Create custom rules with different application types, share them with the community, and install them directly via CLI using a shadcn-style registry system.

## ✨ Features

- **šŸ–‹ļø Rich Rule Editor** - Create cursor rules with live preview and token counting
- **šŸ”„ Rule Types** - Support for Always Apply, Intelligent, File-specific, and Manual rules
- **šŸ”— Easy Sharing** - Share rules with unique URLs and public/private visibility
- **šŸ“¦ CLI Integration** - Install rules directly via `npx shadcn add` command
- **šŸ‘¤ User Dashboard** - Manage all your rules in one place
- **šŸ” Public Discovery** - Browse and discover community-shared rules
- **šŸŽØ Modern UI** - Beautiful dark theme with Tailwind CSS and Radix components

## šŸ› ļø Tech Stack

### Frontend
- **Next.js 15** - App Router with React 19
- **TypeScript** - Full type safety
- **Tailwind CSS v4** - Modern styling system
- **Radix UI** - Accessible component primitives
- **React Hook Form + Zod** - Form handling and validation

### Backend
- **PostgreSQL** - Primary database (via Neon.tech)
- **Drizzle ORM** - Type-safe database queries
- **Better Auth** - Modern authentication with magic links
- **Inbound Email** - Transactional email service

### Tools & Services
- **Vercel** - Deployment and hosting
- **React Scan** - Performance monitoring
- **Sonner** - Toast notifications

## šŸš€ Getting Started

### Prerequisites

- Node.js 18+ 
- PostgreSQL database (we recommend [Neon](https://neon.tech))
- Inbound Email account (get your API key from [inbound.new](https://inbound.new))

### Environment Setup

Create a `.env.local` file in the root directory:

```bash
# Database
DATABASE_URL="postgresql://username:password@host/database"

# Email Service (get from inbound.new)
INBOUND_API_KEY="your_inbound_api_key"

# Auth (automatically generated)
BETTER_AUTH_SECRET="your_auth_secret"
BETTER_AUTH_URL="http://localhost:3000"
```

### Installation

1. **Clone the repository**
   ```bash
   git clone https://github.com/your-username/cursor.link.git
   cd cursor.link
   ```

2. **Install dependencies**
   ```bash
   npm install
   ```

3. **Set up the database**
   ```bash
   # Generate migrations
   npm run db:generate
   
   # Apply migrations
   npm run db:migrate
   ```

4. **Start the development server**
   ```bash
   npm run dev
   ```

5. **Open your browser**
   Navigate to [http://localhost:3000](http://localhost:3000)

## šŸ“ Project Structure

```
cursor.link/
ā”œā”€ā”€ app/                          # Next.js app directory
│   ā”œā”€ā”€ [userId]/[ruleId]/       # Public rule viewer pages
│   ā”œā”€ā”€ api/                     # API routes
│   │   ā”œā”€ā”€ auth/               # Authentication endpoints
│   │   ā”œā”€ā”€ cursor-rules/       # CRUD operations for rules
│   │   ā”œā”€ā”€ my-rules/           # User's personal rules
│   │   ā”œā”€ā”€ public-rule/        # Public rule access
│   │   └── registry/           # shadcn-style CLI registry
│   ā”œā”€ā”€ dashboard/              # User dashboard
│   ā”œā”€ā”€ login/                  # Authentication pages
│   └── page.tsx               # Homepage/editor
ā”œā”€ā”€ components/                  # Reusable UI components
│   ā”œā”€ā”€ auth/                   # Authentication components
│   ā”œā”€ā”€ ui/                     # Base UI components
│   └── header.tsx             # Site header
ā”œā”€ā”€ lib/                        # Shared utilities
│   ā”œā”€ā”€ auth.ts               # Authentication configuration
│   ā”œā”€ā”€ db.ts                 # Database connection
│   ā”œā”€ā”€ schema.ts             # Database schema
│   └── utils.ts              # Helper utilities
└── drizzle/                    # Database migrations
```

## šŸ”Œ API Reference

### Rules Management

#### Get Rules
```http
GET /api/cursor-rules
GET /api/cursor-rules?ruleId=<id>
```
Fetch all accessible rules or a specific rule by ID.

#### Create Rule
```http
POST /api/cursor-rules
Content-Type: application/json

{
  "title": "my-rule",
  "content": "Rule content...",
  "ruleType": "always|intelligent|specific|manual",
  "isPublic": false
}
```

#### Update Rule
```http
PUT /api/cursor-rules
Content-Type: application/json

{
  "id": "rule-id",
  "title": "updated-title",
  "content": "Updated content...",
  "ruleType": "always",
  "isPublic": true
}
```

### Registry (CLI Integration)

#### Install via CLI
```bash
npx shadcn add https://cursor.link/api/registry/[ruleId]
```

#### Registry Item
```http
GET /api/registry/[ruleId]
```
Returns a shadcn-compatible registry item for CLI installation.

### Public Access

#### View Public Rule
```http
GET /api/public-rule/[userId]/[ruleId]
```
Access a public rule and increment view count.

#### My Rules
```http
GET /api/my-rules
```
Get all rules belonging to the authenticated user.

## šŸŽÆ Usage

### Creating Rules

1. **Visit the homepage** - Start creating immediately without login


... (truncated)
Repository
21stars
2forks
View on GitHub
Details
DiscoveredJan 19, 2026
Last UpdatedOct 29, 2025
Author@R44VC0RP
Quality Score
30/100