@shanyucoder/flowgrid 0.1.4 → 0.1.5

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
@@ -98,9 +98,12 @@ pnpm 10+ cần `--allow-build` khi cài **từ GitHub** (build TypeScript lúc c
98
98
  **npx (không cài global):**
99
99
 
100
100
  ```text
101
+ cd your-project
101
102
  npx -p @shanyucoder/flowgrid flowgrid init
102
103
  ```
103
104
 
105
+ Luôn có từ **`flowgrid`** trước `init` — `npx @shanyucoder/flowgrid` (thiếu bin) không phải quy trình khuyến nghị. Global: `npm install -g @shanyucoder/flowgrid` → `cd your-project` → `flowgrid init`.
106
+
104
107
  Thay `init` bằng `doctor`, `harness sync`, … GitHub: `npx -p github:ShanYuCoder/flowgrid flowgrid init`.
105
108
 
106
109
  **npm (global):**
package/bin/flowgrid.mjs CHANGED
@@ -35,6 +35,27 @@ function assertNodeVersion() {
35
35
  }
36
36
  }
37
37
 
38
+ function printDefaultHelp() {
39
+ const lines = [
40
+ 'FlowGrid CLI — chạy trong thư mục repo đích (cd project trước khi init).',
41
+ '',
42
+ 'Cài một lần (global):',
43
+ ' npm install -g @shanyucoder/flowgrid',
44
+ ' pnpm add -g @shanyucoder/flowgrid',
45
+ '',
46
+ 'Khởi tạo repo đích:',
47
+ ' flowgrid init',
48
+ '',
49
+ 'Khác:',
50
+ ' flowgrid doctor · flowgrid update · flowgrid harness sync · flowgrid audit',
51
+ '',
52
+ 'npx (không cài global) — phải gọi bin flowgrid:',
53
+ ' npx -p @shanyucoder/flowgrid flowgrid init',
54
+ ' (không dùng: npx @shanyucoder/flowgrid — sẽ không truyền lệnh init)',
55
+ ];
56
+ console.log(lines.join('\n'));
57
+ }
58
+
38
59
  export async function main() {
39
60
  assertNodeVersion();
40
61
  const args = process.argv.slice(2);
@@ -404,7 +425,12 @@ export async function main() {
404
425
  process.exit(1);
405
426
  }
406
427
 
407
- if (command && command !== 'init') {
428
+ if (!command) {
429
+ printDefaultHelp();
430
+ return;
431
+ }
432
+
433
+ if (command !== 'init') {
408
434
  console.error(pc.red(`Lệnh không hợp lệ: ${command}`));
409
435
  console.log(`Chạy 'flowgrid init', 'flowgrid doctor', 'flowgrid update', 'flowgrid harness sync', hoặc 'flowgrid audit'.`);
410
436
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shanyucoder/flowgrid",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Unified Local MCP Toolkit (Graph, DNA, Docs, Test, Codegen)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",