An open API service indexing awesome lists of open source software.

https://github.com/continuedev/rules

📕 A CLI for managing rules across any AI IDE
https://github.com/continuedev/rules

ai continue copilot cursor llm open-source rules vscode windsurf

Last synced: 3 months ago
JSON representation

📕 A CLI for managing rules across any AI IDE

Awesome Lists containing this project

README

          

# rules

> **tl;dr:** `npm i -g rules-cli` then `rules add starter/nextjs-rules`

`rules` is a CLI built for managing rules across any AI developer tool. Rules are markdown files that encode workflows, preferences, tech stack details, and more in plain natural language so you can get better help from LLMs.

## Install `rules`

The `rules` CLI can be installed using NPM:

```bash
npm i -g rules-cli
```

## Add rules

To download rules to your repository you can use `rules add`. For example:

```bash
rules add starter/nextjs-rules
```

This will add them to your project in a local `.rules` folder.

You can also download from GitHub rather than the rules registry:

```bash
rules add gh:continuedev/rules-template
```

## Render rules

To use rules with your AI code assistant of choice, you can "render" them to the necessary format and location using `rules render`. For example,

```bash
rules render cursor
```

will copy all of the `.rules/` into a `.cursor/rules/` folder. `rules` currently supports the following formats: cursor, continue, windsurf, claude, copilot, codex, cline, cody, and amp.

## Publish rules

To make your rules available to others, you can publish using `rules publish`:

```bash
rules login
rules publish
```

This would make your rule available to download with `rules add `.

The command automatically determines the slug from your `rules.json` file. To make sure you have a `rules.json` file in your current directory, use `rules init`.

## Helping users use your rules

If you are building a developer tool and want to optimize how AI IDEs work with your tool, `rules` makes it easy to give your users the best experience.

1. Make your account on the [registry](https://hub.continue.dev/signup) and create an organization
2. [Publish your rules](index.md#publish-rules)
3. Mention the corresponding `rules add ` command in your documentation