@rudderjs/cli 4.2.0 → 4.2.1
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 +53 -0
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -99,6 +99,38 @@ Laravel-style migration commands that delegate to the appropriate ORM tool. The
|
|
|
99
99
|
|
|
100
100
|
Lists all registered API routes (from `@rudderjs/router`) and Vike filesystem page routes.
|
|
101
101
|
|
|
102
|
+
### `command:list`
|
|
103
|
+
|
|
104
|
+
Show every command available in the project — CLI-owned, package-contributed, and user-defined. Useful for discoverability and for AI agents that need a structured view of what commands they can run.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pnpm rudder command:list # tabular output, user-defined only
|
|
108
|
+
pnpm rudder command:list --all # include built-in + package commands
|
|
109
|
+
pnpm rudder command:list --all --json # machine-readable; consumed by @rudderjs/boost's commands_list MCP tool
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The `--json` shape carries name, description, args, options, and source for each command, plus a `bootError` field when the app fails to boot so consumers (Boost's MCP) get partial info instead of a crash.
|
|
113
|
+
|
|
114
|
+
### `providers:discover`
|
|
115
|
+
|
|
116
|
+
Scan installed `@rudderjs/*` packages and write `bootstrap/cache/providers.json` — the manifest that `defaultProviders()` reads at boot. Run after installing or removing any framework package; the scaffolder runs it automatically on `--install`.
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pnpm rudder providers:discover
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
This command **skips `bootApp()`** (chicken-and-egg with the manifest) so it's fast and works even when the app can't boot.
|
|
123
|
+
|
|
124
|
+
### `model:prune`
|
|
125
|
+
|
|
126
|
+
Walk every Model registered with `ModelRegistry` that defines `static prunable()` and delete matching rows. Pairs with Passport's `MassPrunable` tokens and any app-defined prunable models.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
pnpm rudder model:prune
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Honors each model's `pruneMode`: `'instance'` (default) re-queries each chunk and fires `deleting`/`deleted` observers; `'mass'` (`MassPrunable`) runs `deleteAll()` per chunk — no observers, soft-deletes bypassed.
|
|
133
|
+
|
|
102
134
|
## `make:module` Scaffold
|
|
103
135
|
|
|
104
136
|
The `make:module Blog` command creates:
|
|
@@ -116,6 +148,27 @@ It also auto-registers `BlogServiceProvider` in `bootstrap/providers.ts`.
|
|
|
116
148
|
|
|
117
149
|
After scaffolding, run `pnpm rudder module:publish --generate` to merge the Prisma shard and regenerate the client.
|
|
118
150
|
|
|
151
|
+
## Commands from other packages
|
|
152
|
+
|
|
153
|
+
The CLI is the runner — most commands are owned by the package that ships the feature. `loadPackageCommands()` eagerly imports command modules from each installed package via subpath exports, so they appear automatically in `--help` once the package is in `package.json`.
|
|
154
|
+
|
|
155
|
+
| Package | Commands |
|
|
156
|
+
|---|---|
|
|
157
|
+
| `@rudderjs/ai` | `make:agent`, `ai:eval` |
|
|
158
|
+
| `@rudderjs/mcp` | `make:mcp-server`, `make:mcp-tool`, `make:mcp-resource`, `make:mcp-prompt`, `mcp:start`, `mcp:list` |
|
|
159
|
+
| `@rudderjs/orm` | `migrate`, `migrate:fresh`, `migrate:status`, `make:migration`, `db:push`, `db:generate`, `model:prune` |
|
|
160
|
+
| `@rudderjs/router` | `route:list` |
|
|
161
|
+
| `@rudderjs/queue` | `queue:work`, `queue:status`, `queue:clear`, `queue:failed`, `queue:retry` |
|
|
162
|
+
| `@rudderjs/schedule` | `schedule:run`, `schedule:work`, `schedule:list` |
|
|
163
|
+
| `@rudderjs/storage` | `storage:link` |
|
|
164
|
+
| `@rudderjs/sync` | `sync:docs`, `sync:clear`, `sync:inspect` |
|
|
165
|
+
| `@rudderjs/broadcast` | `broadcast:connections` |
|
|
166
|
+
| `@rudderjs/boost` | `boost:install`, `boost:update`, `boost:mcp` |
|
|
167
|
+
| `@rudderjs/passport` | `passport:keys`, `passport:client`, `passport:purge` |
|
|
168
|
+
| `@rudderjs/terminal` | `make:terminal` |
|
|
169
|
+
|
|
170
|
+
CLI-owned commands stay focused on scaffolding (`make:*`, `module:*`, `vendor:publish`) and process meta (`command:list`, `providers:discover`).
|
|
171
|
+
|
|
119
172
|
## User-Defined Commands
|
|
120
173
|
|
|
121
174
|
Commands defined in `routes/console.ts` are auto-registered:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rudderjs/cli",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"directory": "packages/cli"
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
13
|
+
},
|
|
11
14
|
"files": [
|
|
12
15
|
"dist"
|
|
13
16
|
],
|
|
@@ -20,11 +23,11 @@
|
|
|
20
23
|
"commander": "^12.0.0",
|
|
21
24
|
"chalk": "^5.0.0",
|
|
22
25
|
"@clack/prompts": "^1.0.0",
|
|
23
|
-
"@rudderjs/core": "^1.1.
|
|
24
|
-
"@rudderjs/console": "^1.0.
|
|
26
|
+
"@rudderjs/core": "^1.1.5",
|
|
27
|
+
"@rudderjs/console": "^1.0.2"
|
|
25
28
|
},
|
|
26
29
|
"peerDependencies": {
|
|
27
|
-
"@rudderjs/router": "^1.2.
|
|
30
|
+
"@rudderjs/router": "^1.2.1"
|
|
28
31
|
},
|
|
29
32
|
"peerDependenciesMeta": {
|
|
30
33
|
"@rudderjs/router": {
|
|
@@ -35,7 +38,7 @@
|
|
|
35
38
|
"@types/node": "^20.0.0",
|
|
36
39
|
"typescript": "^5.4.0",
|
|
37
40
|
"tsx": "^4.0.0",
|
|
38
|
-
"@rudderjs/router": "^1.2.
|
|
41
|
+
"@rudderjs/router": "^1.2.1"
|
|
39
42
|
},
|
|
40
43
|
"author": "Suleiman Shahbari",
|
|
41
44
|
"scripts": {
|