@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 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 registers the MCP server with Claude Code. Then ask Claude:
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 (partial) | CAPABILITY: Maintained (L5) ║
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
- MED C4.no-antipatterns :1 No NEVER or AVOID statements found
33
- · LOW C12.no-version :1 No version or date marker found
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
- ## Commands
73
+ ## GitHub Actions
74
74
 
75
- ```bash
76
- ails check # Score your setup
77
- ails check -f json # JSON output (for CI)
78
- ails check --strict # Exit 1 if violations (for CI)
79
- ails check --no-update-check # Skip pre-run update prompt
80
- ails check --exclude-dir vendor # Exclude directory from scanning
81
- ails explain CORE:S:0001 # Explain a rule
82
- ails map # Show project structure
83
- ails map --save # Generate backbone.yml
84
- ails update # Update rules framework + recommended
85
- ails update --check # Check for updates without installing
86
- ails update --recommended # Update recommended rules only
87
- ails update --force # Force reinstall even if current
88
- ails update --cli # Upgrade the CLI package itself
89
- ails dismiss CORE:C:0001 # Dismiss a semantic finding
90
- ails version # Show version info
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 [--scope user\|project]` | Register MCP server with Claude Code |
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, add to your `.reporails/config.yml`:
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
- ```yaml
124
- recommended: false
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
- - **Claude Code** — required for `install`/`uninstall` commands ([install](https://docs.anthropic.com/en/docs/claude-code))
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 [--scope user|project] Register MCP server with Claude Code
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 # Add MCP server (user scope)
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
- switch (subcommand) {
167
- case "install":
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reporails/cli",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "Score your CLAUDE.md files. See what's missing. Improve your AI coding setup.",
5
5
  "type": "module",
6
6
  "bin": {