@mfjjs/ruflo-setup 0.2.6 → 0.2.8

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 CHANGED
@@ -2,6 +2,27 @@
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.2.8](///compare/v0.2.7...v0.2.8) (2026-03-31)
6
+
7
+
8
+ ### Features
9
+
10
+ * **docs:** add related documentation b67343a
11
+ * **docs:** add RuFlo enabled session notes and usage checklist bd9d96a
12
+ * enhance setup process with .gitignore updates and cross-platform compatibility for .mcp.json 4b44558
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * update toPlatformMcpConfig to use npx instead of pnpm for cross-platform compatibility e7cf99f
18
+
19
+ ### [0.2.7](///compare/v0.2.6...v0.2.7) (2026-03-20)
20
+
21
+
22
+ ### Features
23
+
24
+ * **cli:** add update command to upgrade ruflo-setup to the latest version 569bc0b
25
+
5
26
  ### [0.2.6](///compare/v0.2.5...v0.2.6) (2026-03-20)
6
27
 
7
28
 
package/README.md CHANGED
@@ -11,6 +11,20 @@ Cross-platform npm CLI to bootstrap a project with Ruflo on Windows and Linux.
11
11
  - Package name: `@mfjjs/ruflo-setup`
12
12
  - Command name: `ruflo-setup`
13
13
  - Platform support: Windows and Linux (plus macOS by default)
14
+
15
+ ## 💡 Why You Need This
16
+
17
+ If you're working on:
18
+
19
+ * A brownfield application that never had RuFlow configured, or
20
+ * A brand‑new project that hasn't been set up with RuFlow yet,
21
+
22
+ …then you currently have to configure RuFlow manually in each project. That means recreating the same structure, wiring, and boilerplate over and over.
23
+
24
+ `ruflo-setup` eliminates all of that. When you run it inside a project directory, it automatically generates the required RuFlow scaffolding — including all the files that belong in the `.claude/` folder — so every project starts from a clean, consistent baseline.
25
+
26
+ You only need to do this once per project. Just run the command and you're ready to go.
27
+
14
28
  ## 📋 Requirements
15
29
  <details>
16
30
  <summary>Click to toggle visibility</summary>
@@ -41,43 +55,51 @@ corepack prepare pnpm@latest --activate
41
55
 
42
56
  ## 📦 Installation
43
57
 
44
- ```powershell
58
+ Install the CLI globally once:
59
+
60
+ ```bash
45
61
  pnpm add -g @mfjjs/ruflo-setup
46
- ruflo-setup cleanup
47
62
  ```
48
63
 
49
- > **Why run `cleanup` first?** If you previously installed any Ruflo packages via `npm install -g` (e.g. `ruflo`, `claude-flow`, `ruv-swarm`), those npm-global copies can shadow or conflict with the pnpm-managed versions. `ruflo-setup cleanup` removes them from the npm global registry before setup runs, giving you a clean slate.
50
-
51
- ## 💡 Why You Need This
64
+ ## 🚀 Usage
52
65
 
53
- If you’re working on:
66
+ ### Setup
54
67
 
55
- * A brownfield application that never had RuFlow configured, or
56
- * A brand‑new project that hasn’t been set up with RuFlow yet,
68
+ **First, change to your project directory**, then run:
57
69
 
58
- …then you currently have to configure RuFlow manually in each project. That means recreating the same structure, wiring, and boilerplate over and over.
70
+ ```bash
71
+ ruflo-setup
72
+ ```
59
73
 
60
- The new command eliminates all of that. When you run it inside a project, it automatically generates the required RuFlow scaffolding — including all the files that belong in the folder — so every project starts from a clean, consistent baseline.
74
+ That's it for most users. The command will:
75
+ 1. Check for a newer version of itself and offer to update before proceeding
76
+ 2. Install `ruflo@latest` globally and run `ruflo init --full` to scaffold your project
77
+ 3. Write a platform-aware `.mcp.json` (MCP servers use `npx` for cross-platform compatibility)
78
+ 4. Add `.mcp.json` and `.claude/settings.json` to the project's `.gitignore`
79
+ 5. Install a global Claude Code `SessionStart` hook
61
80
 
62
- You only need to do this once in each folder. Just run the command and you’re ready to go.
81
+ Additional options:
63
82
 
64
- ## 🚀 Usage
83
+ ```bash
84
+ # non-interactive (skip all prompts)
85
+ ruflo-setup --yes
65
86
 
66
- ### Cleanup
67
- Remove any previous npm global installs of Ruflo packages that could conflict with the pnpm-managed versions:
87
+ # preview what would happen without making any changes
88
+ ruflo-setup --dry-run
68
89
 
69
- ```bash
70
- ruflo-setup cleanup
71
- ```
90
+ # skip the ruflo global install step
91
+ ruflo-setup --skip-init
72
92
 
73
- This uninstalls `ruflo`, `@mfjjs/ruflo-setup`, `ruflo-setup`, `claude-flow`, `@claude-flow/cli`, and `ruv-swarm` from the **npm** global registry. It does not touch pnpm globals. Run this before setup if you suspect stale npm globals are shadowing the pnpm-installed binaries.
93
+ # skip global hook installation
94
+ ruflo-setup --no-hooks
74
95
 
75
- ```bash
76
- # preview what would be removed without making changes
77
- ruflo-setup cleanup --dry-run
96
+ # hook operations
97
+ ruflo-setup hooks install
98
+ ruflo-setup hooks status
78
99
  ```
79
100
 
80
101
  ### Status
102
+
81
103
  Check whether all Ruflo feature layers (0–8) are enabled in the current project:
82
104
 
83
105
  ```bash
@@ -87,7 +109,8 @@ ruflo-setup status
87
109
  This prints a layer-by-layer report showing which features are active — prerequisites, global packages, optional WASM/ML packages, MCP servers, tool groups, environment variables, project scaffolding, and the Docker chat UI stack.
88
110
 
89
111
  ### Bootstrap
90
- Use this once if you want Claude Code to expose the `/ruflo-setup` command globally.
112
+
113
+ Use this once if you want Claude Code to expose the `/ruflo-setup` command globally, so you can run it from inside Claude Code chat without using the shell.
91
114
 
92
115
  ```bash
93
116
  ruflo-setup hooks init
@@ -95,27 +118,34 @@ ruflo-setup hooks init
95
118
 
96
119
  After that, when you open Claude Code in a project that does not already have Ruflo configured, you can run [**/ruflo-setup**](noop:) to start the setup flow.
97
120
 
98
- ### Setup
99
- Use these commands when you want to run the setup directly from a shell.
121
+ ### Update
100
122
 
101
- From the target project directory, run one of the following:
123
+ Update `@mfjjs/ruflo-setup` itself to the latest published version:
102
124
 
103
125
  ```bash
104
- # full setup
105
- ruflo-setup
126
+ ruflo-setup update
127
+ ```
106
128
 
107
- # non-interactive
108
- ruflo-setup --yes
129
+ It is best to always have the latest version before running setup. When you run `ruflo-setup` without arguments it automatically checks for a newer version and will prompt you to update if one is found, so in most cases you will not need to run this manually.
109
130
 
110
- # preview only
111
- ruflo-setup --dry-run --skip-init
131
+ ```bash
132
+ # preview without making changes
133
+ ruflo-setup update --dry-run
134
+ ```
112
135
 
113
- # skip global hook install
114
- ruflo-setup --no-hooks
136
+ ### Cleanup
115
137
 
116
- # hook operations
117
- ruflo-setup hooks install
118
- ruflo-setup hooks status
138
+ If you previously installed any Ruflo packages via `npm install -g`, those npm-global copies can shadow or conflict with the pnpm-managed versions. Run this to remove them and give yourself a clean slate:
139
+
140
+ ```bash
141
+ ruflo-setup cleanup
142
+ ```
143
+
144
+ This uninstalls `ruflo`, `@mfjjs/ruflo-setup`, `ruflo-setup`, `claude-flow`, `@claude-flow/cli`, and `ruv-swarm` from the **npm** global registry only — it does not touch pnpm globals.
145
+
146
+ ```bash
147
+ # preview what would be removed without making changes
148
+ ruflo-setup cleanup --dry-run
119
149
  ```
120
150
 
121
151
  ## 🗂️ Project structure
@@ -123,7 +153,7 @@ ruflo-setup hooks status
123
153
  - `package.json`: npm metadata, scripts, and `bin` mapping
124
154
  - `bin/ruflo-setup.js`: executable entry file the shell runs
125
155
  - `src/cli.js`: command router and argument handling
126
- - `src/setup.js`: setup workflow (`init`, `.mcp.json`, template copy)
156
+ - `src/setup.js`: setup workflow (`init`, `.mcp.json`, `.gitignore`, template copy)
127
157
  - `src/status.js`: layer-by-layer feature status checker (Layers 0–8)
128
158
  - `src/hooks.js`: global `check-ruflo` hook install/status
129
159
  - `src/utils.js`: reusable filesystem and argument helpers
@@ -154,13 +184,19 @@ Flow:
154
184
  3. `bin/ruflo-setup.js` forwards args to `runCli(...)`.
155
185
  4. `src/cli.js` parses command and flags.
156
186
  5. `src/setup.js` runs setup steps:
187
+ - checks for a newer version of itself and prompts to update
157
188
  - optional `pnpm add -g ruflo@latest` then `ruflo init --full`
158
- - writes platform-aware `.mcp.json`
189
+ - writes platform-aware `.mcp.json` (MCP servers invoked via `npx` for cross-platform compatibility)
190
+ - adds `.mcp.json` and `.claude/settings.json` to the project's `.gitignore`
159
191
  - copies `templates/CLAUDE.md`
160
192
  - installs global SessionStart hook (unless skipped)
161
193
 
162
194
  When called as `ruflo-setup status`, step 5 dispatches to `src/status.js` which checks all layers (0–8) and prints a feature status report.
163
195
 
196
+ When called as `ruflo-setup update`, it runs `pnpm add -g @mfjjs/ruflo-setup@latest` to update the tool itself.
197
+
198
+ When called as `ruflo-setup cleanup`, it removes Ruflo packages from the npm global registry to eliminate conflicts with pnpm-managed versions.
199
+
164
200
  ## 🛠️ Local development with pnpm
165
201
 
166
202
  From this repository root (`setup-ruflo/`):
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mfjjs/ruflo-setup",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Cross-platform setup CLI for Ruflo + Claude Flow projects",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import { fileURLToPath } from 'node:url';
3
3
  import { createRequire } from 'node:module';
4
4
  import { parseArgs } from './utils.js';
5
- import { runSetup, runCleanup } from './setup.js';
5
+ import { runSetup, runCleanup, runUpdate } from './setup.js';
6
6
  import { getGlobalHookStatus, installGlobalCheckRufloHook } from './hooks.js';
7
7
 
8
8
  const require = createRequire(import.meta.url);
@@ -19,6 +19,7 @@ function printHelp() {
19
19
  Usage:
20
20
  ruflo-setup [options]
21
21
  ruflo-setup status
22
+ ruflo-setup update [--dry-run]
22
23
  ruflo-setup cleanup [--dry-run]
23
24
  ruflo-setup hooks install [options]
24
25
  ruflo-setup hooks status
@@ -33,11 +34,13 @@ Options:
33
34
  --verbose Extra output
34
35
 
35
36
  Commands:
37
+ update Update @mfjjs/ruflo-setup itself to the latest published version
36
38
  cleanup Remove all Ruflo packages from the npm global registry
37
39
  (ruflo, @mfjjs/ruflo-setup, claude-flow, @claude-flow/cli, ruv-swarm)
38
40
 
39
41
  Examples:
40
42
  ruflo-setup
43
+ ruflo-setup update
41
44
  ruflo-setup status
42
45
  ruflo-setup cleanup
43
46
  ruflo-setup cleanup --dry-run
@@ -100,6 +103,11 @@ export async function runCli(argv, cwd) {
100
103
  return 1;
101
104
  }
102
105
 
106
+ if (flags.command === 'update') {
107
+ runUpdate({ dryRun: flags.dryRun });
108
+ return 0;
109
+ }
110
+
103
111
  if (flags.command === 'cleanup') {
104
112
  if (!flags.dryRun && !flags.yes) {
105
113
  const { confirm } = await import('./utils.js');