@reporails/cli 0.2.1 → 0.4.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 +40 -28
- package/bin/reporails.mjs +4 -67
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Score your CLAUDE.md files. See what's missing. Improve your AI coding setup.
|
|
|
8
8
|
npx @reporails/cli install
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
This
|
|
11
|
+
This detects agents in your project and writes the MCP config. Then ask Claude:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
> What ails claude?
|
|
@@ -23,14 +23,14 @@ npx @reporails/cli check
|
|
|
23
23
|
That's it. You'll get a score, capability level, and actionable violations.
|
|
24
24
|
```
|
|
25
25
|
╔══════════════════════════════════════════════════════════════╗
|
|
26
|
-
║ SCORE: 8.1 / 10 (
|
|
26
|
+
║ SCORE: 8.1 / 10 (awaiting semantic) | CAPABILITY: Maintained (L5) ║
|
|
27
27
|
║ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░ ║
|
|
28
28
|
╚══════════════════════════════════════════════════════════════╝
|
|
29
29
|
|
|
30
30
|
Violations:
|
|
31
31
|
CLAUDE.md (7 issues)
|
|
32
|
-
○
|
|
33
|
-
·
|
|
32
|
+
○ :1 No NEVER or AVOID statements found RRAILS:C:0003
|
|
33
|
+
· :1 No version or date marker found CORE:C:0012
|
|
34
34
|
...
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -70,37 +70,48 @@ Capability levels describe what your AI instruction setup enables — not how "m
|
|
|
70
70
|
| L5 | Maintained | Structural integrity, governance, navigation |
|
|
71
71
|
| L6 | Adaptive | Dynamic context, extensibility, persistence |
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## GitHub Actions
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
75
|
+
Add `ails check` as a CI gate with inline PR annotations:
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
# .github/workflows/reporails.yml
|
|
79
|
+
name: Reporails
|
|
80
|
+
on:
|
|
81
|
+
pull_request:
|
|
82
|
+
paths: ['CLAUDE.md', '.claude/**']
|
|
83
|
+
jobs:
|
|
84
|
+
check:
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v4
|
|
88
|
+
- uses: reporails/cli/action@v1
|
|
89
|
+
with:
|
|
90
|
+
min-score: '6.0'
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
See the [main README](https://github.com/reporails/cli#github-actions) for full action inputs/outputs.
|
|
94
|
+
|
|
95
|
+
## Commands
|
|
96
|
+
|
|
93
97
|
| Command | Description |
|
|
94
98
|
|---------|-------------|
|
|
95
|
-
| `install [
|
|
96
|
-
| `uninstall [--scope user\|project]` | Remove MCP server from Claude Code |
|
|
99
|
+
| `install [PATH]` | Install MCP server for detected agents |
|
|
97
100
|
| `check [PATH]` | Validate instruction files |
|
|
101
|
+
| `heal [PATH]` | Interactive auto-fix + semantic evaluation |
|
|
98
102
|
| `explain RULE_ID` | Show rule details |
|
|
99
103
|
| `map [PATH]` | Discover project structure |
|
|
100
104
|
| `update` | Update rules framework + recommended |
|
|
105
|
+
| `config set KEY VALUE` | Set a project config value |
|
|
106
|
+
| `config set --global KEY VALUE` | Set a global default |
|
|
107
|
+
| `config get KEY` | Show a config value |
|
|
108
|
+
| `config list` | Show all config (project + global) |
|
|
101
109
|
| `dismiss RULE_ID` | Dismiss a semantic finding |
|
|
110
|
+
| `judge PATH VERDICTS` | Cache semantic verdicts |
|
|
102
111
|
| `version` | Show version info |
|
|
103
112
|
|
|
113
|
+
See the [main README](https://github.com/reporails/cli#commands) for full flag reference.
|
|
114
|
+
|
|
104
115
|
## Updating
|
|
105
116
|
|
|
106
117
|
```bash
|
|
@@ -118,10 +129,11 @@ Persistent installs: `npm install -g @reporails/cli@latest`
|
|
|
118
129
|
|
|
119
130
|
## Recommended Rules
|
|
120
131
|
|
|
121
|
-
[Recommended rules](https://github.com/reporails/recommended) (AILS_ namespace) are included by default and auto-downloaded on first run. To opt out
|
|
132
|
+
[Recommended rules](https://github.com/reporails/recommended) (AILS_ namespace) are included by default and auto-downloaded on first run. To opt out:
|
|
122
133
|
|
|
123
|
-
```
|
|
124
|
-
recommended
|
|
134
|
+
```bash
|
|
135
|
+
ails config set recommended false # This project only
|
|
136
|
+
ails config set --global recommended false # All projects
|
|
125
137
|
```
|
|
126
138
|
|
|
127
139
|
To update recommended rules independently:
|
|
@@ -134,7 +146,7 @@ ails update --recommended
|
|
|
134
146
|
|
|
135
147
|
- **Node.js >= 18**
|
|
136
148
|
- **uv** — auto-installed if missing ([manual install](https://docs.astral.sh/uv/))
|
|
137
|
-
- **
|
|
149
|
+
- **No additional dependencies** — `install` writes config files directly
|
|
138
150
|
|
|
139
151
|
## How It Works
|
|
140
152
|
|
|
@@ -149,4 +161,4 @@ Want to add or improve rules? Please follow [Contribute](https://github.com/repo
|
|
|
149
161
|
|
|
150
162
|
## License
|
|
151
163
|
|
|
152
|
-
BUSL 1.1
|
|
164
|
+
BUSL 1.1 — converts to Apache 2.0 on 2029-02-20 or at 1.0, whichever comes first.
|
package/bin/reporails.mjs
CHANGED
|
@@ -5,15 +5,13 @@ import { platform } from "node:os";
|
|
|
5
5
|
import { argv, exit } from "node:process";
|
|
6
6
|
|
|
7
7
|
const PYPI_PACKAGE = "reporails-cli";
|
|
8
|
-
const MCP_COMMAND = "ails-mcp";
|
|
9
8
|
const CLI_COMMAND = "ails";
|
|
10
9
|
|
|
11
10
|
const HELP = `
|
|
12
11
|
reporails — Score your CLAUDE.md files
|
|
13
12
|
|
|
14
13
|
Usage:
|
|
15
|
-
reporails install [
|
|
16
|
-
reporails uninstall [--scope user|project] Remove MCP server from Claude Code
|
|
14
|
+
reporails install [PATH] Install MCP server for detected agents
|
|
17
15
|
reporails check [PATH] [OPTIONS] Validate instruction files
|
|
18
16
|
reporails explain RULE_ID Show rule details
|
|
19
17
|
reporails map [PATH] [--save] Discover project structure
|
|
@@ -26,7 +24,7 @@ Usage:
|
|
|
26
24
|
reporails <command> [args...] Proxy any command to ails CLI
|
|
27
25
|
|
|
28
26
|
Examples:
|
|
29
|
-
npx @reporails/cli install
|
|
27
|
+
npx @reporails/cli install # Install MCP server
|
|
30
28
|
npx @reporails/cli check # Score your setup
|
|
31
29
|
npx @reporails/cli explain CORE:S:0001 # Explain a rule
|
|
32
30
|
npx @reporails/cli update # Update rules + recommended
|
|
@@ -78,62 +76,10 @@ function ensureUv() {
|
|
|
78
76
|
}
|
|
79
77
|
}
|
|
80
78
|
|
|
81
|
-
function parseScope(args) {
|
|
82
|
-
const idx = args.indexOf("--scope");
|
|
83
|
-
if (idx !== -1 && idx + 1 < args.length) {
|
|
84
|
-
return args[idx + 1];
|
|
85
|
-
}
|
|
86
|
-
return "user";
|
|
87
|
-
}
|
|
88
|
-
|
|
89
79
|
// ---------------------------------------------------------------------------
|
|
90
80
|
// Subcommands
|
|
91
81
|
// ---------------------------------------------------------------------------
|
|
92
82
|
|
|
93
|
-
function install(args) {
|
|
94
|
-
if (!commandExists("claude")) {
|
|
95
|
-
console.error(
|
|
96
|
-
"Claude Code CLI not found.\nInstall it from: https://docs.anthropic.com/en/docs/claude-code",
|
|
97
|
-
);
|
|
98
|
-
exit(1);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
ensureUv();
|
|
102
|
-
|
|
103
|
-
const scope = parseScope(args);
|
|
104
|
-
const cmd = `claude mcp add --scope ${scope} reporails -- uvx --refresh --from ${PYPI_PACKAGE} ${MCP_COMMAND}`;
|
|
105
|
-
console.log(`Registering MCP server (scope: ${scope})...`);
|
|
106
|
-
|
|
107
|
-
try {
|
|
108
|
-
execSync(cmd, { stdio: "inherit" });
|
|
109
|
-
console.log("\nDone. Restart Claude Code to activate the MCP server.");
|
|
110
|
-
} catch {
|
|
111
|
-
console.error("Failed to register MCP server.");
|
|
112
|
-
exit(1);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
function uninstall(args) {
|
|
117
|
-
if (!commandExists("claude")) {
|
|
118
|
-
console.error(
|
|
119
|
-
"Claude Code CLI not found.\nInstall it from: https://docs.anthropic.com/en/docs/claude-code",
|
|
120
|
-
);
|
|
121
|
-
exit(1);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const scope = parseScope(args);
|
|
125
|
-
const cmd = `claude mcp remove --scope ${scope} reporails`;
|
|
126
|
-
console.log(`Removing MCP server (scope: ${scope})...`);
|
|
127
|
-
|
|
128
|
-
try {
|
|
129
|
-
execSync(cmd, { stdio: "inherit" });
|
|
130
|
-
console.log("\nDone. MCP server removed.");
|
|
131
|
-
} catch {
|
|
132
|
-
console.error("Failed to remove MCP server.");
|
|
133
|
-
exit(1);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
83
|
function proxy(args) {
|
|
138
84
|
ensureUv();
|
|
139
85
|
|
|
@@ -163,14 +109,5 @@ if (!subcommand || subcommand === "--help" || subcommand === "-h") {
|
|
|
163
109
|
exit(0);
|
|
164
110
|
}
|
|
165
111
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
install(args.slice(1));
|
|
169
|
-
break;
|
|
170
|
-
case "uninstall":
|
|
171
|
-
uninstall(args.slice(1));
|
|
172
|
-
break;
|
|
173
|
-
default:
|
|
174
|
-
proxy(args);
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
112
|
+
// All subcommands proxy to the Python CLI
|
|
113
|
+
proxy(args);
|