npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cursor-link

v1.1.0

Published

CLI tool to sync cursor rules with cursor.link

Readme

cursor-link CLI

A command-line tool to sync your cursor rules with cursor.link.

Installation

Install globally via npm/pnpm:

npm install -g cursor-link
# or
pnpm add -g cursor-link
# or run directly with npx
npx cursor-link --help

Quick Start

  1. Authenticate with cursor.link:

    cursor-link auth login

    This will open your browser for device authorization.

  2. Push your local cursor rules:

    cursor-link push
  3. Pull rules from cursor.link:

    cursor-link pull

Commands

cursor-link auth [action]

Manage authentication with cursor.link.

  • cursor-link auth login - Sign in using device authorization
  • cursor-link auth logout - Sign out
  • cursor-link auth status - Check authentication status

cursor-link push [options]

Push local cursor rules to cursor.link.

Options:

  • --public - Make rules public (default: private)
  • --force - Overwrite existing rules without confirmation

Example:

cursor-link push --public

cursor-link pull [options]

Pull cursor rules from cursor.link to your local project.

Options:

  • --list - List available rules without downloading
  • --all - Include public rules from other users (default: only your rules)

Example:

cursor-link pull --all --list

How it Works

Push Process

  1. Scans your .cursor/rules/ directory for .mdc files
  2. Parses each file to extract title, content, and settings
  3. Uploads rules to your cursor.link account
  4. Handles conflicts by asking for your preference

Pull Process

  1. Fetches available rules from cursor.link
  2. Shows an interactive selection interface
  3. Downloads selected rules to .cursor/rules/
  4. Preserves frontmatter settings like alwaysApply

File Format

The CLI works with cursor rule files in the .cursor/rules/ directory. Each file should be a .mdc file with this format:

---
alwaysApply: true
---
# My Rule Title

Rule content goes here...

Environment Variables

  • CURSOR_LINK_URL - Override the default server URL (default: https://cursor.link)

Requirements

  • Node.js 18+
  • A cursor.link account
  • Project with .cursor/rules/ directory

Authentication

The CLI uses OAuth 2.0 Device Authorization Grant (RFC 8628) for secure authentication. When you run cursor-link auth login:

  1. A device code is generated
  2. Your browser opens to the verification page
  3. You enter the displayed code to authorize the CLI
  4. The CLI receives an access token and stores it securely

Your authentication token is stored in ~/.cursor-link/token.json.

Troubleshooting

"Not authenticated" error

Run cursor-link auth login to sign in.

"Cursor rules directory not found"

Make sure you're in a project directory with a .cursor/rules/ folder.

Rules not showing up

Check that your .mdc files are properly formatted with frontmatter.

Network errors

Verify your internet connection and that cursor.link is accessible.

Development

To set up for development:

git clone <repo>
cd cursor-link-cli
pnpm install
pnpm run build
npm link  # Makes cursor-link command available globally