@mfjjs/ruflo-setup 0.1.4 → 0.1.6
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/CHANGELOG.md +10 -0
- package/README.md +27 -6
- package/package.json +1 -1
- package/src/cli.js +1 -1
- package/src/setup.js +72 -9
- package/src/utils.js +3 -6
- package/templates/ruflo-setup.md +29 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.6](https://gitlab.mfj.local:8022/mario/ruflo-setup/compare/v0.1.5...v0.1.6) (2026-03-11)
|
|
6
|
+
|
|
7
|
+
### [0.1.5](https://gitlab.mfj.local:8022/mario/ruflo-setup/compare/v0.1.4...v0.1.5) (2026-03-11)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **cli:** update commands to use pnpm instead of npx for installation and initialization ([5d7e482](https://gitlab.mfj.local:8022/mario/ruflo-setup/commit/5d7e482beaae9b3adfdf2a4c6ea478e8cf6774cb))
|
|
13
|
+
* **setup:** enhance pnpm installation instructions and ensure availability checks ([b89cccc](https://gitlab.mfj.local:8022/mario/ruflo-setup/commit/b89cccc978b7e439c6544195c7d480bb95ef07af))
|
|
14
|
+
|
|
5
15
|
### [0.1.4](https://gitlab.mfj.local:8022/mario/ruflo-setup/compare/v0.1.3...v0.1.4) (2026-03-11)
|
|
6
16
|
|
|
7
17
|
|
package/README.md
CHANGED
|
@@ -4,12 +4,37 @@ Cross-platform npm CLI to bootstrap a project with Ruflo on Windows and Linux.
|
|
|
4
4
|
|
|
5
5
|
## What this project is
|
|
6
6
|
|
|
7
|
-
`@mfjjs/ruflo-setup`
|
|
7
|
+
`@mfjjs/ruflo-setup` implements the setup with a Node-based CLI command:
|
|
8
8
|
|
|
9
9
|
- Package name: `@mfjjs/ruflo-setup`
|
|
10
10
|
- Command name: `ruflo-setup`
|
|
11
11
|
- Platform support: Windows and Linux (plus macOS by default)
|
|
12
12
|
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
- Node.js 20+
|
|
16
|
+
- pnpm available on PATH
|
|
17
|
+
|
|
18
|
+
Quickest pnpm install by platform:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Windows (recommended)
|
|
22
|
+
winget install -e --id pnpm.pnpm
|
|
23
|
+
|
|
24
|
+
# macOS (recommended)
|
|
25
|
+
brew install pnpm
|
|
26
|
+
|
|
27
|
+
# Linux (recommended)
|
|
28
|
+
curl -fsSL https://get.pnpm.io/install.sh | sh -
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Alternative (all platforms with recent Node.js):
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
corepack enable
|
|
35
|
+
corepack prepare pnpm@latest --activate
|
|
36
|
+
```
|
|
37
|
+
|
|
13
38
|
## Project structure
|
|
14
39
|
|
|
15
40
|
- `package.json`: npm metadata, scripts, and `bin` mapping
|
|
@@ -45,7 +70,7 @@ Flow:
|
|
|
45
70
|
3. `bin/ruflo-setup.js` forwards args to `runCli(...)`.
|
|
46
71
|
4. `src/cli.js` parses command and flags.
|
|
47
72
|
5. `src/setup.js` runs setup steps:
|
|
48
|
-
- optional `
|
|
73
|
+
- optional `pnpm add -g ruflo@latest` then `ruflo init --full`
|
|
49
74
|
- writes platform-aware `.mcp.json`
|
|
50
75
|
- copies `templates/CLAUDE.md`
|
|
51
76
|
- installs global SessionStart hook (unless skipped)
|
|
@@ -114,7 +139,3 @@ This tests exactly what users get from a package install.
|
|
|
114
139
|
- `claude-hooks/check-ruflo.cjs`
|
|
115
140
|
|
|
116
141
|
It merges into existing global settings instead of replacing them, and creates a backup of the settings file before writing.
|
|
117
|
-
|
|
118
|
-
## Legacy note
|
|
119
|
-
|
|
120
|
-
`setup-ruflo.ps1` remains in the repository as historical reference, but the npm CLI is now the primary path.
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -26,7 +26,7 @@ Options:
|
|
|
26
26
|
--dry-run Show actions without making changes
|
|
27
27
|
--yes, -y Non-interactive yes for prompts
|
|
28
28
|
--no-hooks Skip global hook installation during setup
|
|
29
|
-
--skip-init Skip '
|
|
29
|
+
--skip-init Skip 'pnpm add -g ruflo@latest && ruflo init --full'
|
|
30
30
|
--version, -v Print version and exit
|
|
31
31
|
--verbose Extra output
|
|
32
32
|
|
package/src/setup.js
CHANGED
|
@@ -8,25 +8,88 @@ function logLine(message) {
|
|
|
8
8
|
process.stdout.write(`${message}\n`);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function getPnpmInstallSuggestions(platform) {
|
|
12
|
+
if (platform === 'win32') {
|
|
13
|
+
return [
|
|
14
|
+
'winget install -e --id pnpm.pnpm',
|
|
15
|
+
'corepack enable && corepack prepare pnpm@latest --activate',
|
|
16
|
+
'npm install -g pnpm'
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (platform === 'darwin') {
|
|
21
|
+
return [
|
|
22
|
+
'brew install pnpm',
|
|
23
|
+
'corepack enable && corepack prepare pnpm@latest --activate',
|
|
24
|
+
'npm install -g pnpm'
|
|
25
|
+
];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return [
|
|
29
|
+
'curl -fsSL https://get.pnpm.io/install.sh | sh -',
|
|
30
|
+
'corepack enable && corepack prepare pnpm@latest --activate',
|
|
31
|
+
'npm install -g pnpm'
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ensurePnpmAvailable() {
|
|
36
|
+
const check = spawnSync('pnpm', ['--version'], {
|
|
37
|
+
stdio: 'ignore',
|
|
38
|
+
shell: process.platform === 'win32'
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (check.status === 0 && !check.error) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const platformLabel = process.platform === 'win32'
|
|
46
|
+
? 'Windows'
|
|
47
|
+
: process.platform === 'darwin'
|
|
48
|
+
? 'macOS'
|
|
49
|
+
: 'Linux';
|
|
50
|
+
const suggestions = getPnpmInstallSuggestions(process.platform)
|
|
51
|
+
.map((command) => ` - ${command}`)
|
|
52
|
+
.join('\n');
|
|
53
|
+
|
|
54
|
+
throw new Error(
|
|
55
|
+
`pnpm is required but was not found in PATH.\n` +
|
|
56
|
+
`Install pnpm, then re-run ruflo-setup.\n` +
|
|
57
|
+
`Quick install options for ${platformLabel}:\n${suggestions}`
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function runPnpmInit({ force, cwd, dryRun }) {
|
|
62
|
+
const initArgs = ['init', '--full'];
|
|
13
63
|
if (force) {
|
|
14
|
-
|
|
64
|
+
initArgs.push('--force');
|
|
15
65
|
}
|
|
16
66
|
|
|
17
67
|
if (dryRun) {
|
|
18
|
-
logLine(` [DRY RUN] Would run:
|
|
68
|
+
logLine(` [DRY RUN] Would run: pnpm add -g ruflo@latest`);
|
|
69
|
+
logLine(` [DRY RUN] Would run: ruflo ${initArgs.join(' ')}`);
|
|
19
70
|
return;
|
|
20
71
|
}
|
|
21
72
|
|
|
22
|
-
|
|
73
|
+
ensurePnpmAvailable();
|
|
74
|
+
|
|
75
|
+
const install = spawnSync('pnpm', ['add', '-g', 'ruflo@latest'], {
|
|
76
|
+
cwd,
|
|
77
|
+
stdio: 'inherit',
|
|
78
|
+
shell: process.platform === 'win32'
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
if (install.status !== 0) {
|
|
82
|
+
throw new Error(`pnpm add -g ruflo@latest failed with exit code ${install.status}`);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const run = spawnSync('ruflo', initArgs, {
|
|
23
86
|
cwd,
|
|
24
87
|
stdio: 'inherit',
|
|
25
88
|
shell: process.platform === 'win32'
|
|
26
89
|
});
|
|
27
90
|
|
|
28
|
-
if (
|
|
29
|
-
throw new Error(`ruflo init failed with exit code ${
|
|
91
|
+
if (run.status !== 0) {
|
|
92
|
+
throw new Error(`ruflo init failed with exit code ${run.status}`);
|
|
30
93
|
}
|
|
31
94
|
}
|
|
32
95
|
|
|
@@ -89,8 +152,8 @@ export async function runSetup({
|
|
|
89
152
|
}
|
|
90
153
|
|
|
91
154
|
if (!skipInit) {
|
|
92
|
-
logLine('Step 1: Running
|
|
93
|
-
|
|
155
|
+
logLine('Step 1: Running pnpm add -g ruflo@latest && ruflo init --full ...');
|
|
156
|
+
runPnpmInit({ force, cwd, dryRun });
|
|
94
157
|
if (!dryRun) {
|
|
95
158
|
logLine(' ruflo init completed.');
|
|
96
159
|
}
|
package/src/utils.js
CHANGED
|
@@ -72,14 +72,11 @@ export function parseArgs(argv) {
|
|
|
72
72
|
|
|
73
73
|
export function toPlatformMcpConfig(platform) {
|
|
74
74
|
const isWindows = platform === 'win32';
|
|
75
|
-
const command = isWindows ? 'cmd' : '
|
|
76
|
-
const
|
|
75
|
+
const command = isWindows ? 'cmd' : 'pnpm';
|
|
76
|
+
const pnpmArgs = isWindows ? ['/c', 'pnpm', 'dlx'] : ['dlx'];
|
|
77
77
|
|
|
78
78
|
const makeArgs = (pkg, extraArgs) => {
|
|
79
|
-
|
|
80
|
-
return ['/c', 'npx', ...npxArgs, pkg, ...extraArgs];
|
|
81
|
-
}
|
|
82
|
-
return [...npxArgs, pkg, ...extraArgs];
|
|
79
|
+
return [...pnpmArgs, pkg, ...extraArgs];
|
|
83
80
|
};
|
|
84
81
|
|
|
85
82
|
return {
|
package/templates/ruflo-setup.md
CHANGED
|
@@ -2,11 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Set up Ruflo + Claude Flow V3 in the current project directory.
|
|
4
4
|
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 20+
|
|
8
|
+
- pnpm installed and available on PATH
|
|
9
|
+
|
|
10
|
+
Quickest pnpm install by platform:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Windows (recommended)
|
|
14
|
+
winget install -e --id pnpm.pnpm
|
|
15
|
+
|
|
16
|
+
# macOS (recommended)
|
|
17
|
+
brew install pnpm
|
|
18
|
+
|
|
19
|
+
# Linux (recommended)
|
|
20
|
+
curl -fsSL https://get.pnpm.io/install.sh | sh -
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Alternative (all platforms with recent Node.js):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
corepack enable
|
|
27
|
+
corepack prepare pnpm@latest --activate
|
|
28
|
+
```
|
|
29
|
+
|
|
5
30
|
## What this does
|
|
6
31
|
|
|
7
|
-
Runs `
|
|
32
|
+
Runs `pnpm add -g @mfjjs/ruflo-setup` then `ruflo-setup` which:
|
|
8
33
|
|
|
9
|
-
1. Runs `
|
|
34
|
+
1. Runs `pnpm add -g ruflo@latest` then `ruflo init --full` to install:
|
|
10
35
|
- `.claude/settings.json` with hooks, permissions, and Claude Flow config
|
|
11
36
|
- `.claude/helpers/` — hook-handler, statusline, auto-memory scripts
|
|
12
37
|
- `.claude/agents/` — 120+ agent definitions
|
|
@@ -23,6 +48,7 @@ When the user runs /ruflo-setup:
|
|
|
23
48
|
2. Check if `.mcp.json` already exists — if so, warn and ask before overwriting
|
|
24
49
|
3. Run the setup CLI:
|
|
25
50
|
```bash
|
|
26
|
-
|
|
51
|
+
pnpm add -g @mfjjs/ruflo-setup
|
|
52
|
+
ruflo-setup
|
|
27
53
|
```
|
|
28
54
|
4. Report what was installed and remind the user to restart Claude Code to load the new MCP servers
|