@airuleshub/cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/bin/airuleshub.ts +15 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @airuleshub/cli
|
|
2
|
+
|
|
3
|
+
The official CLI tool for [Airuleshub](https://airuleshub.com) - The ultimate destination to find, share, and manage AI rules and instructions.
|
|
4
|
+
|
|
5
|
+
Easily fetch and install AI rules directly into your project with a single command.
|
|
6
|
+
|
|
7
|
+
## 🚀 Installation
|
|
8
|
+
|
|
9
|
+
You can use the CLI directly via `npx` or install it globally.
|
|
10
|
+
|
|
11
|
+
### Using npx (Recommended)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @airuleshub/cli install <rule-slug>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Global Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @airuleshub/cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 📖 Usage
|
|
24
|
+
|
|
25
|
+
### Install a Rule
|
|
26
|
+
|
|
27
|
+
To install a rule, simply run the `install` command followed by the rule's slug (ID).
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
airuleshub install <rule-slug>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**Example:**
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
airuleshub install nextjs-app-router-cursor-rules
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Options
|
|
40
|
+
|
|
41
|
+
- **Format Selection**: The CLI will ask you to choose the file format (`.md` or `.txt`) if not specified.
|
|
42
|
+
- **Overwrite Protection**: Warns you if the file already exists before overwriting.
|
|
43
|
+
|
|
44
|
+
## 🛠️ Features
|
|
45
|
+
|
|
46
|
+
- ⚡ **Fast & Easy**: Install rules in seconds.
|
|
47
|
+
- 📂 **Multi-format Support**: Save rules as Markdown or Text files.
|
|
48
|
+
- 🤖 **Interactive**: User-friendly prompts for configuration.
|
|
49
|
+
- 🔄 **Always Up-to-Date**: Fetches the latest version of the rule from Airuleshub.
|
|
50
|
+
|
|
51
|
+
## 👤 Author & Community
|
|
52
|
+
|
|
53
|
+
Built with ❤️ by **Nikunj Borad**.
|
|
54
|
+
|
|
55
|
+
- **GitHub**: [@nikunjborad123](https://github.com/nikunjborad123)
|
|
56
|
+
|
|
57
|
+
## 📄 License
|
|
58
|
+
|
|
59
|
+
This project is licensed under the ISC License.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { Command } from "commander";
|
|
4
|
+
import { installRule } from "../src/commands/install.js";
|
|
5
|
+
|
|
6
|
+
const program = new Command();
|
|
7
|
+
|
|
8
|
+
program.name("airuleshub").description("Install AI rules from airuleshub.com");
|
|
9
|
+
|
|
10
|
+
program
|
|
11
|
+
.command("install <slug>")
|
|
12
|
+
.option("-f, --format <type>", "md or txt")
|
|
13
|
+
.action(installRule);
|
|
14
|
+
|
|
15
|
+
program.parse();
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@airuleshub/cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"airuleshub": "./dist/bin/airuleshub.js"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [],
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"commander": "^14.0.3",
|
|
22
|
+
"fs-extra": "^11.3.3",
|
|
23
|
+
"inquirer": "^13.2.2"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@types/fs-extra": "^11.0.4",
|
|
27
|
+
"ts-node": "^10.9.2",
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
|
+
}
|
|
30
|
+
}
|