|
1 | | -# Private Homebrew Tap for Continue Dev Tools |
| 1 | +# rules |
2 | 2 |
|
3 | | -This is a private Homebrew tap for internal Continue Dev tools. |
| 3 | +:::tip |
4 | 4 |
|
5 | | -## Installation Options |
| 5 | +**tl;dr:** `npm i -g rules-cli` then `rules add starter/nextjs-rules` |
6 | 6 |
|
7 | | -### Option 1: Using NPM (Cross-platform) |
| 7 | +::: |
8 | 8 |
|
9 | | -You can install and run the rules CLI using npm: |
| 9 | +`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. |
10 | 10 |
|
11 | | -```bash |
12 | | -# Install globally |
13 | | -npm install -g rules-cli |
| 11 | +## Install `rules` |
14 | 12 |
|
15 | | -# Run the CLI |
16 | | -rules-cli |
| 13 | +The `rules` CLI can be installed using NPM: |
17 | 14 |
|
18 | | -# Or run directly without installing |
19 | | -npx rules-cli |
| 15 | +```bash |
| 16 | +npm i -g rules-cli |
20 | 17 | ``` |
21 | 18 |
|
22 | | -The npm package provides binaries for: |
| 19 | +## Add rules |
23 | 20 |
|
24 | | -- macOS (x64, arm64) |
25 | | -- Linux (x64, arm64) |
26 | | -- Windows (x64) |
| 21 | +To download rules to your repository you can use `rules add`. For example: |
27 | 22 |
|
28 | | -### Option 2: Using Homebrew (macOS/Linux) |
29 | | - |
30 | | -#### Prerequisites |
| 23 | +```bash |
| 24 | +rules add starter/nextjs-rules |
| 25 | +``` |
31 | 26 |
|
32 | | -- You must have [Homebrew](https://brew.sh/) installed |
33 | | -- You need Git SSH access to the private repositories at Continue Dev |
| 27 | +This will add them to your project in a local `.rules` folder. |
34 | 28 |
|
35 | | -#### 1. Tap the Repository |
| 29 | +You can also download from GitHub rather than the rules registry: |
36 | 30 |
|
37 | 31 | ```bash |
38 | | -# Using SSH (recommended for private repos) |
39 | | -brew tap continuedev/tap git@github.com:continuedev/homebrew-tap.git |
| 32 | +rules add gh:continuedev/rules-template |
40 | 33 | ``` |
41 | 34 |
|
42 | | -#### 2. Install the Rules CLI Tool |
| 35 | +## Render rules |
| 36 | + |
| 37 | +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, |
43 | 38 |
|
44 | 39 | ```bash |
45 | | -brew install rules |
| 40 | +rules render cursor |
46 | 41 | ``` |
47 | 42 |
|
48 | | -#### Updating |
| 43 | +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. |
| 44 | + |
| 45 | +## Publish rules |
49 | 46 |
|
50 | | -To get the latest version: |
| 47 | +To make your rules available to others, you can publish using `rules publish`: |
51 | 48 |
|
52 | 49 | ```bash |
53 | | -brew update |
54 | | -brew upgrade rules |
| 50 | +rules login |
| 51 | +rules publish |
55 | 52 | ``` |
56 | 53 |
|
57 | | -## Available Tools |
| 54 | +This would make your rule available to download with `rules add <name-of-rules>`. |
58 | 55 |
|
59 | | -- `rules`: Internal rules CLI tool for Continue Dev |
| 56 | +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`. |
60 | 57 |
|
61 | | -## Troubleshooting |
| 58 | +## Helping users use your rules |
62 | 59 |
|
63 | | -If you encounter issues: |
| 60 | +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. |
64 | 61 |
|
65 | | -- Ensure you have SSH access to the `continuedev/rules-cli` repository |
66 | | -- Make sure your SSH key is loaded (`ssh-add -l` to check) |
67 | | -- Try running `brew doctor` to check for general Homebrew issues |
68 | | -- If the formula fails to install, try with verbose output: `brew install -v rules` |
| 62 | +1. Make your account on the [registry](https://hub.continue.dev/signup) and create an organization |
| 63 | +2. [Publish your rules](index.md#publish-rules) |
| 64 | +3. Mention the corresponding `rules add <name-of-rules>` command in your documentation |
0 commit comments