@mercurjs/cli 2.0.0-canary.9 → 2.0.0-canary.90

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,24 +8,30 @@ Add blocks (admin UI pages, vendor UI pages, workflows, modules, and more) from
8
8
 
9
9
  ## Installation
10
10
 
11
- Install globally (recommended):
11
+ Using npx (recommended):
12
12
 
13
13
  ```bash
14
- npm install -g @mercurjs/cli
14
+ npx @mercurjs/cli@canary <command>
15
+ ```
16
+
17
+ Or install globally:
18
+
19
+ ```bash
20
+ npm install -g @mercurjs/cli@canary
15
21
  ```
16
22
 
17
23
  Any package manager works:
18
24
 
19
25
  ```bash
20
- pnpm add -g @mercurjs/cli
21
- yarn global add @mercurjs/cli
22
- bun add -g @mercurjs/cli
26
+ pnpm add -g @mercurjs/cli@canary
27
+ yarn global add @mercurjs/cli@canary
28
+ bun add -g @mercurjs/cli@canary
23
29
  ```
24
30
 
25
31
  Or install locally as a dev dependency:
26
32
 
27
33
  ```bash
28
- npm install -D @mercurjs/cli
34
+ npm install -D @mercurjs/cli@canary
29
35
  ```
30
36
 
31
37
  ## Quick Start
@@ -34,23 +40,23 @@ npm install -D @mercurjs/cli
34
40
 
35
41
  ```bash
36
42
  # Create a new Mercur project
37
- mercurjs create
43
+ npx @mercurjs/cli@canary create
38
44
 
39
45
  # Create with a specific template
40
- mercurjs create my-mercur --template basic
46
+ npx @mercurjs/cli@canary create my-mercur --template basic
41
47
  ```
42
48
 
43
49
  **Or add blocks to an existing project:**
44
50
 
45
51
  ```bash
46
52
  # Initialize your project
47
- mercurjs init
53
+ npx @mercurjs/cli@canary init
48
54
 
49
55
  # Add a block from the registry
50
- mercurjs add product-review
56
+ npx @mercurjs/cli@canary add product-review
51
57
 
52
58
  # Search for available blocks
53
- mercurjs search --query product
59
+ npx @mercurjs/cli@canary search --query product
54
60
  ```
55
61
 
56
62
  ---
@@ -62,7 +68,7 @@ mercurjs search --query product
62
68
  Create a new Mercur project with the selected template.
63
69
 
64
70
  ```bash
65
- mercurjs create [name] [options]
71
+ npx @mercurjs/cli@canary create [name] [options]
66
72
  ```
67
73
 
68
74
  **Arguments:**
@@ -86,16 +92,16 @@ mercurjs create [name] [options]
86
92
 
87
93
  ```bash
88
94
  # Interactive project creation
89
- mercurjs create
95
+ npx @mercurjs/cli@canary create
90
96
 
91
97
  # Create with a specific name and template
92
- mercurjs create my-marketplace --template basic
98
+ npx @mercurjs/cli@canary create my-marketplace --template basic
93
99
 
94
100
  # Create without database setup
95
- mercurjs create my-mercur --skip-db
101
+ npx @mercurjs/cli@canary create my-mercur --skip-db
96
102
 
97
103
  # Create with a specific database connection
98
- mercurjs create my-mercur --db-connection-string "postgresql://user:pass@localhost:5432/mydb"
104
+ npx @mercurjs/cli@canary create my-mercur --db-connection-string "postgresql://user:pass@localhost:5432/mydb"
99
105
  ```
100
106
 
101
107
  ---
@@ -105,7 +111,7 @@ mercurjs create my-mercur --db-connection-string "postgresql://user:pass@localho
105
111
  Initialize your project and create a `blocks.json` configuration file.
106
112
 
107
113
  ```bash
108
- mercurjs init [options]
114
+ npx @mercurjs/cli@canary init [options]
109
115
  ```
110
116
 
111
117
  **Options:**
@@ -121,13 +127,13 @@ mercurjs init [options]
121
127
 
122
128
  ```bash
123
129
  # Interactive initialization
124
- mercurjs init
130
+ npx @mercurjs/cli@canary init
125
131
 
126
132
  # Non-interactive with defaults
127
- mercurjs init --defaults
133
+ npx @mercurjs/cli@canary init --defaults
128
134
 
129
135
  # Initialize in a specific directory
130
- mercurjs init --cwd ./my-project
136
+ npx @mercurjs/cli@canary init --cwd ./my-project
131
137
  ```
132
138
 
133
139
  ---
@@ -137,7 +143,7 @@ mercurjs init --cwd ./my-project
137
143
  Add blocks to your project from the registry.
138
144
 
139
145
  ```bash
140
- mercurjs add <blocks...> [options]
146
+ npx @mercurjs/cli@canary add <blocks...> [options]
141
147
  ```
142
148
 
143
149
  **Arguments:**
@@ -159,16 +165,16 @@ mercurjs add <blocks...> [options]
159
165
 
160
166
  ```bash
161
167
  # Add a single block
162
- mercurjs add product-review
168
+ npx @mercurjs/cli@canary add product-review
163
169
 
164
170
  # Add multiple blocks
165
- mercurjs add product-review order-tracking wishlist
171
+ npx @mercurjs/cli@canary add product-review order-tracking wishlist
166
172
 
167
173
  # Add with overwrite
168
- mercurjs add product-review --overwrite
174
+ npx @mercurjs/cli@canary add product-review --overwrite
169
175
 
170
176
  # Add to a specific directory
171
- mercurjs add product-review --cwd ./my-project
177
+ npx @mercurjs/cli@canary add product-review --cwd ./my-project
172
178
  ```
173
179
 
174
180
  ---
@@ -178,7 +184,7 @@ mercurjs add product-review --cwd ./my-project
178
184
  Search blocks from registries by name or description.
179
185
 
180
186
  ```bash
181
- mercurjs search [options]
187
+ npx @mercurjs/cli@canary search [options]
182
188
  ```
183
189
 
184
190
  **Options:**
@@ -193,10 +199,10 @@ mercurjs search [options]
193
199
 
194
200
  ```bash
195
201
  # Search for blocks with "product" in name or description
196
- mercurjs search --query product
202
+ npx @mercurjs/cli@canary search --query product
197
203
 
198
204
  # Search a custom registry
199
- mercurjs search --query review --registry @my-registry
205
+ npx @mercurjs/cli@canary search --query review --registry @my-registry
200
206
  ```
201
207
 
202
208
  ---
@@ -206,7 +212,7 @@ mercurjs search --query review --registry @my-registry
206
212
  View detailed information about specific blocks from the registry.
207
213
 
208
214
  ```bash
209
- mercurjs view <blocks...> [options]
215
+ npx @mercurjs/cli@canary view <blocks...> [options]
210
216
  ```
211
217
 
212
218
  **Arguments:**
@@ -225,10 +231,10 @@ mercurjs view <blocks...> [options]
225
231
 
226
232
  ```bash
227
233
  # View a block's details
228
- mercurjs view product-review
234
+ npx @mercurjs/cli@canary view product-review
229
235
 
230
236
  # View multiple blocks
231
- mercurjs view product-review order-tracking
237
+ npx @mercurjs/cli@canary view product-review order-tracking
232
238
  ```
233
239
 
234
240
  ---
@@ -238,7 +244,7 @@ mercurjs view product-review order-tracking
238
244
  Check for updates by comparing local files against the registry.
239
245
 
240
246
  ```bash
241
- mercurjs diff <blocks...> [options]
247
+ npx @mercurjs/cli@canary diff <blocks...> [options]
242
248
  ```
243
249
 
244
250
  **Arguments:**
@@ -257,10 +263,10 @@ mercurjs diff <blocks...> [options]
257
263
 
258
264
  ```bash
259
265
  # Check if a block has updates
260
- mercurjs diff product-review
266
+ npx @mercurjs/cli@canary diff product-review
261
267
 
262
268
  # Check multiple blocks for updates
263
- mercurjs diff product-review order-tracking
269
+ npx @mercurjs/cli@canary diff product-review order-tracking
264
270
  ```
265
271
 
266
272
  ---
@@ -270,7 +276,7 @@ mercurjs diff product-review order-tracking
270
276
  Build the registry from a `registry.json` file.
271
277
 
272
278
  ```bash
273
- mercurjs build [registry] [options]
279
+ npx @mercurjs/cli@canary build [registry] [options]
274
280
  ```
275
281
 
276
282
  **Arguments:**
@@ -291,13 +297,13 @@ mercurjs build [registry] [options]
291
297
 
292
298
  ```bash
293
299
  # Build with defaults
294
- mercurjs build
300
+ npx @mercurjs/cli@canary build
295
301
 
296
302
  # Build with custom paths
297
- mercurjs build ./my-registry.json --output ./dist/registry
303
+ npx @mercurjs/cli@canary build ./my-registry.json --output ./dist/registry
298
304
 
299
305
  # Build with verbose output
300
- mercurjs build --verbose
306
+ npx @mercurjs/cli@canary build --verbose
301
307
  ```
302
308
 
303
309
  ---
@@ -307,7 +313,7 @@ mercurjs build --verbose
307
313
  Get information about your project and configuration.
308
314
 
309
315
  ```bash
310
- mercurjs info [options]
316
+ npx @mercurjs/cli@canary info [options]
311
317
  ```
312
318
 
313
319
  **Options:**
@@ -320,10 +326,10 @@ mercurjs info [options]
320
326
 
321
327
  ```bash
322
328
  # Get project info
323
- mercurjs info
329
+ npx @mercurjs/cli@canary info
324
330
 
325
331
  # Get info for a specific directory
326
- mercurjs info --cwd ./my-project
332
+ npx @mercurjs/cli@canary info --cwd ./my-project
327
333
  ```
328
334
 
329
335
  ---
@@ -412,7 +418,7 @@ You can add custom registries to your `blocks.json`:
412
418
 
413
419
  ```bash
414
420
  # Create a new project
415
- mercurjs create my-marketplace
421
+ npx @mercurjs/cli@canary create my-marketplace
416
422
 
417
423
  # Follow the prompts to:
418
424
  # 1. Select a template (basic or registry)
@@ -424,23 +430,23 @@ mercurjs create my-marketplace
424
430
 
425
431
  ```bash
426
432
  # Initialize the CLI in your project
427
- mercurjs init
433
+ npx @mercurjs/cli@canary init
428
434
 
429
435
  # Search for available blocks
430
- mercurjs search --query product
436
+ npx @mercurjs/cli@canary search --query product
431
437
 
432
438
  # Add blocks
433
- mercurjs add product-review order-tracking
439
+ npx @mercurjs/cli@canary add product-review order-tracking
434
440
  ```
435
441
 
436
442
  ### Checking for Updates
437
443
 
438
444
  ```bash
439
445
  # See what changed in a block
440
- mercurjs diff product-review
446
+ npx @mercurjs/cli@canary diff product-review
441
447
 
442
448
  # Update by overwriting
443
- mercurjs add product-review --overwrite
449
+ npx @mercurjs/cli@canary add product-review --overwrite
444
450
  ```
445
451
 
446
452
  ### Building a Custom Registry
@@ -448,7 +454,7 @@ mercurjs add product-review --overwrite
448
454
  ```bash
449
455
  # Create a registry.json file with your blocks
450
456
  # Then build the registry
451
- mercurjs build --verbose
457
+ npx @mercurjs/cli@canary build --verbose
452
458
 
453
459
  # Output will be in ./registry directory
454
460
  ```
package/dist/index.d.ts CHANGED
@@ -1,21 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import { z } from 'zod';
3
3
 
4
- type RegistryItemCategory = "workflows" | "api" | "links" | "modules" | "vendor" | "admin" | "lib";
5
- declare const registryItemTypeSchema: z.ZodEnum<["registry:workflow", "registry:api", "registry:link", "registry:module", "registry:vendor", "registry:admin", "registry:lib"]>;
4
+ declare const registryItemTypeSchema: z.ZodEnum<["registry:api", "registry:vendor", "registry:admin"]>;
6
5
  declare const registryItemFileSchema: z.ZodObject<{
7
6
  path: z.ZodString;
8
7
  content: z.ZodOptional<z.ZodString>;
9
- type: z.ZodEnum<["registry:workflow", "registry:api", "registry:link", "registry:module", "registry:vendor", "registry:admin", "registry:lib"]>;
8
+ type: z.ZodEnum<["registry:api", "registry:vendor", "registry:admin"]>;
10
9
  target: z.ZodOptional<z.ZodString>;
11
10
  }, "strip", z.ZodTypeAny, {
12
11
  path: string;
13
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
12
+ type: "registry:api" | "registry:vendor" | "registry:admin";
14
13
  content?: string | undefined;
15
14
  target?: string | undefined;
16
15
  }, {
17
16
  path: string;
18
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
17
+ type: "registry:api" | "registry:vendor" | "registry:admin";
19
18
  content?: string | undefined;
20
19
  target?: string | undefined;
21
20
  }>;
@@ -35,16 +34,16 @@ declare const registryItemSchema: z.ZodObject<{
35
34
  files: z.ZodArray<z.ZodObject<{
36
35
  path: z.ZodString;
37
36
  content: z.ZodOptional<z.ZodString>;
38
- type: z.ZodEnum<["registry:workflow", "registry:api", "registry:link", "registry:module", "registry:vendor", "registry:admin", "registry:lib"]>;
37
+ type: z.ZodEnum<["registry:api", "registry:vendor", "registry:admin"]>;
39
38
  target: z.ZodOptional<z.ZodString>;
40
39
  }, "strip", z.ZodTypeAny, {
41
40
  path: string;
42
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
41
+ type: "registry:api" | "registry:vendor" | "registry:admin";
43
42
  content?: string | undefined;
44
43
  target?: string | undefined;
45
44
  }, {
46
45
  path: string;
47
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
46
+ type: "registry:api" | "registry:vendor" | "registry:admin";
48
47
  content?: string | undefined;
49
48
  target?: string | undefined;
50
49
  }>, "many">;
@@ -52,7 +51,7 @@ declare const registryItemSchema: z.ZodObject<{
52
51
  name: string;
53
52
  files: {
54
53
  path: string;
55
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
54
+ type: "registry:api" | "registry:vendor" | "registry:admin";
56
55
  content?: string | undefined;
57
56
  target?: string | undefined;
58
57
  }[];
@@ -70,7 +69,7 @@ declare const registryItemSchema: z.ZodObject<{
70
69
  name: string;
71
70
  files: {
72
71
  path: string;
73
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
72
+ type: "registry:api" | "registry:vendor" | "registry:admin";
74
73
  content?: string | undefined;
75
74
  target?: string | undefined;
76
75
  }[];
@@ -105,16 +104,16 @@ declare const registrySchema: z.ZodObject<{
105
104
  files: z.ZodArray<z.ZodObject<{
106
105
  path: z.ZodString;
107
106
  content: z.ZodOptional<z.ZodString>;
108
- type: z.ZodEnum<["registry:workflow", "registry:api", "registry:link", "registry:module", "registry:vendor", "registry:admin", "registry:lib"]>;
107
+ type: z.ZodEnum<["registry:api", "registry:vendor", "registry:admin"]>;
109
108
  target: z.ZodOptional<z.ZodString>;
110
109
  }, "strip", z.ZodTypeAny, {
111
110
  path: string;
112
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
111
+ type: "registry:api" | "registry:vendor" | "registry:admin";
113
112
  content?: string | undefined;
114
113
  target?: string | undefined;
115
114
  }, {
116
115
  path: string;
117
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
116
+ type: "registry:api" | "registry:vendor" | "registry:admin";
118
117
  content?: string | undefined;
119
118
  target?: string | undefined;
120
119
  }>, "many">;
@@ -122,7 +121,7 @@ declare const registrySchema: z.ZodObject<{
122
121
  name: string;
123
122
  files: {
124
123
  path: string;
125
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
124
+ type: "registry:api" | "registry:vendor" | "registry:admin";
126
125
  content?: string | undefined;
127
126
  target?: string | undefined;
128
127
  }[];
@@ -140,7 +139,7 @@ declare const registrySchema: z.ZodObject<{
140
139
  name: string;
141
140
  files: {
142
141
  path: string;
143
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
142
+ type: "registry:api" | "registry:vendor" | "registry:admin";
144
143
  content?: string | undefined;
145
144
  target?: string | undefined;
146
145
  }[];
@@ -162,7 +161,7 @@ declare const registrySchema: z.ZodObject<{
162
161
  name: string;
163
162
  files: {
164
163
  path: string;
165
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
164
+ type: "registry:api" | "registry:vendor" | "registry:admin";
166
165
  content?: string | undefined;
167
166
  target?: string | undefined;
168
167
  }[];
@@ -184,7 +183,7 @@ declare const registrySchema: z.ZodObject<{
184
183
  name: string;
185
184
  files: {
186
185
  path: string;
187
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
186
+ type: "registry:api" | "registry:vendor" | "registry:admin";
188
187
  content?: string | undefined;
189
188
  target?: string | undefined;
190
189
  }[];
@@ -254,23 +253,23 @@ declare const registryResolvedItemsTreeSchema: z.ZodObject<Pick<{
254
253
  files: z.ZodArray<z.ZodObject<{
255
254
  path: z.ZodString;
256
255
  content: z.ZodOptional<z.ZodString>;
257
- type: z.ZodEnum<["registry:workflow", "registry:api", "registry:link", "registry:module", "registry:vendor", "registry:admin", "registry:lib"]>;
256
+ type: z.ZodEnum<["registry:api", "registry:vendor", "registry:admin"]>;
258
257
  target: z.ZodOptional<z.ZodString>;
259
258
  }, "strip", z.ZodTypeAny, {
260
259
  path: string;
261
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
260
+ type: "registry:api" | "registry:vendor" | "registry:admin";
262
261
  content?: string | undefined;
263
262
  target?: string | undefined;
264
263
  }, {
265
264
  path: string;
266
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
265
+ type: "registry:api" | "registry:vendor" | "registry:admin";
267
266
  content?: string | undefined;
268
267
  target?: string | undefined;
269
268
  }>, "many">;
270
269
  }, "dependencies" | "devDependencies" | "docs" | "files">, "strip", z.ZodTypeAny, {
271
270
  files: {
272
271
  path: string;
273
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
272
+ type: "registry:api" | "registry:vendor" | "registry:admin";
274
273
  content?: string | undefined;
275
274
  target?: string | undefined;
276
275
  }[];
@@ -280,7 +279,7 @@ declare const registryResolvedItemsTreeSchema: z.ZodObject<Pick<{
280
279
  }, {
281
280
  files: {
282
281
  path: string;
283
- type: "registry:workflow" | "registry:api" | "registry:link" | "registry:module" | "registry:vendor" | "registry:admin" | "registry:lib";
282
+ type: "registry:api" | "registry:vendor" | "registry:admin";
284
283
  content?: string | undefined;
285
284
  target?: string | undefined;
286
285
  }[];
@@ -315,4 +314,4 @@ declare const registryConfigSchema: z.ZodRecord<z.ZodEffects<z.ZodString, string
315
314
  headers?: Record<string, string> | undefined;
316
315
  }>]>>;
317
316
 
318
- export { type Registry, type RegistryItem, type RegistryItemCategory, registryConfigItemSchema, registryConfigSchema, registryIndexSchema, registryItemFileSchema, registryItemSchema, registryItemTypeSchema, registryResolvedItemsTreeSchema, registrySchema };
317
+ export { type Registry, type RegistryItem, registryConfigItemSchema, registryConfigSchema, registryIndexSchema, registryItemFileSchema, registryItemSchema, registryItemTypeSchema, registryResolvedItemsTreeSchema, registrySchema };