claude-coding-flow 1.1.0 → 1.2.0

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.
Files changed (2) hide show
  1. package/bin/flow.js +26 -10
  2. package/package.json +1 -1
package/bin/flow.js CHANGED
@@ -23,10 +23,19 @@ function copyRecursive(src, dest) {
23
23
  }
24
24
  }
25
25
 
26
+ function mkdirp(dir) {
27
+ if (!fs.existsSync(dir)) {
28
+ fs.mkdirSync(dir, { recursive: true });
29
+ console.log(green(` created: ${path.relative(CWD, dir)}/`));
30
+ } else {
31
+ console.log(yellow(` skip (exists): ${path.relative(CWD, dir)}/`));
32
+ }
33
+ }
34
+
26
35
  function init() {
27
36
  console.log(yellow("flow init"));
28
37
 
29
- // Copy skill commands
38
+ // Copy skill commands -> .claude/commands/
30
39
  const commandsSrc = path.join(PKG_ROOT, "commands");
31
40
  const commandsDest = path.join(CWD, ".claude", "commands");
32
41
 
@@ -45,27 +54,34 @@ function init() {
45
54
  }
46
55
  }
47
56
 
48
- // Copy dashboard
57
+ // Copy dashboard -> .dashboard/
49
58
  const dashSrc = path.join(PKG_ROOT, "dashboard");
50
- const dashDest = path.join(CWD, "dashboard");
59
+ const dashDest = path.join(CWD, ".dashboard");
51
60
 
52
- if (fs.existsSync(dashSrc)) {
53
- fs.mkdirSync(dashDest, { recursive: true });
61
+ if (fs.existsSync(dashSrc) && !fs.existsSync(dashDest)) {
62
+ mkdirp(dashDest);
54
63
  copyRecursive(dashSrc, dashDest);
55
- console.log(green(" copied: dashboard/"));
64
+ console.log(green(" copied: .dashboard/"));
65
+ } else if (fs.existsSync(dashDest)) {
66
+ console.log(yellow(" skip (exists): .dashboard/"));
56
67
  }
57
68
 
69
+ // Create directories
70
+ mkdirp(path.join(CWD, "docs"));
71
+ mkdirp(path.join(CWD, "skills"));
72
+ mkdirp(path.join(CWD, ".worktree"));
73
+
58
74
  console.log(green("\ndone!"));
59
75
  }
60
76
 
61
- function dashboard() {
62
- const dashDir = path.join(CWD, "dashboard");
77
+ function startDashboard() {
78
+ const dashDir = path.join(CWD, ".dashboard");
63
79
  const pkgDashDir = path.join(PKG_ROOT, "dashboard");
64
80
 
65
81
  const target = fs.existsSync(dashDir) ? dashDir : pkgDashDir;
66
82
 
67
83
  if (!fs.existsSync(path.join(target, "main.py"))) {
68
- console.log(red("Error: dashboard/main.py not found. Run `flow init` first."));
84
+ console.log(red("Error: .dashboard/main.py not found. Run `flow init` first."));
69
85
  process.exit(1);
70
86
  }
71
87
 
@@ -95,7 +111,7 @@ switch (command) {
95
111
  init();
96
112
  break;
97
113
  case "dashboard":
98
- dashboard();
114
+ startDashboard();
99
115
  break;
100
116
  default:
101
117
  console.log(`Usage: flow <command>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-coding-flow",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Claude Code skills for requirement analysis, code generation and bug fixing",
5
5
  "bin": {
6
6
  "flow": "./bin/flow.js"