@axiomatic-labs/claudeflow 2.12.145 → 2.12.147

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.
@@ -35,7 +35,12 @@ function run(userArgs) {
35
35
 
36
36
  const args = [];
37
37
  if (promptPath && !userAlreadySetAppend(userArgs)) {
38
- args.push('--append-system-prompt-file', promptPath);
38
+ // Prefer a path relative to cwd so the flag looks identical to what
39
+ // the user would type manually. Fall back to absolute when the
40
+ // relative form would escape cwd with many `..` segments.
41
+ const rel = path.relative(cwd, promptPath);
42
+ const useRel = rel && !rel.startsWith('..' + path.sep) && rel !== '..';
43
+ args.push('--append-system-prompt-file', useRel ? rel : promptPath);
39
44
  }
40
45
  args.push(...userArgs);
41
46
 
package/lib/install.js CHANGED
@@ -261,12 +261,42 @@ async function run() {
261
261
 
262
262
  ui.done(`Claudeflow ${version} installed.`);
263
263
 
264
+ // Ensure the `claudeflow` shell command is available
265
+ const cliStatus = ensureGlobalCli(version);
266
+
264
267
  // Getting started guide with project detection
265
- showGettingStarted(cwd);
268
+ showGettingStarted(cwd, cliStatus);
266
269
  }
267
270
  }
268
271
 
269
- function showGettingStarted(cwd) {
272
+ function ensureGlobalCli(version) {
273
+ // Returns { available: boolean, autoInstalled: boolean, error?: string }
274
+ if (commandExists('claudeflow')) {
275
+ return { available: true, autoInstalled: false };
276
+ }
277
+
278
+ if (process.env.CLAUDEFLOW_SKIP_GLOBAL_INSTALL === '1') {
279
+ return { available: false, autoInstalled: false, error: 'skipped' };
280
+ }
281
+
282
+ console.log('');
283
+ console.log(` ${ui.DIM}Installing claudeflow CLI globally so it is available as a shell command...${ui.RESET}`);
284
+ try {
285
+ execSync(`npm install -g @axiomatic-labs/claudeflow@${version}`, {
286
+ stdio: ['ignore', 'pipe', 'pipe'],
287
+ timeout: 120000,
288
+ });
289
+ if (commandExists('claudeflow')) {
290
+ return { available: true, autoInstalled: true };
291
+ }
292
+ return { available: false, autoInstalled: false, error: 'installed but not on PATH' };
293
+ } catch (err) {
294
+ const msg = err?.stderr?.toString?.() || err?.message || String(err);
295
+ return { available: false, autoInstalled: false, error: msg.split('\n')[0] };
296
+ }
297
+ }
298
+
299
+ function showGettingStarted(cwd, cliStatus = { available: false, autoInstalled: false }) {
270
300
  const MANIFESTS = ['package.json', 'pyproject.toml', 'Gemfile', 'go.mod', 'Cargo.toml', 'composer.json'];
271
301
  const SKIP_DIRS = new Set(['node_modules', 'vendor', '__pycache__', 'dist', 'build', '.next', '.nuxt', '.output', '.claude']);
272
302
 
@@ -289,7 +319,20 @@ function showGettingStarted(cwd) {
289
319
 
290
320
  console.log(` ${ui.BOLD}Getting started:${ui.RESET}`);
291
321
  console.log('');
292
- console.log(` 1. Run ${ui.CYAN}claude${ui.RESET} to start Claude Code`);
322
+
323
+ const startCommand = cliStatus.available ? 'claudeflow' : 'claude';
324
+ if (cliStatus.autoInstalled) {
325
+ console.log(` ${ui.DIM}✓ Installed ${ui.CYAN}claudeflow${ui.RESET}${ui.DIM} globally — available as a shell command.${ui.RESET}`);
326
+ console.log('');
327
+ } else if (!cliStatus.available) {
328
+ console.log(` ${ui.DIM}To get the ${ui.CYAN}claudeflow${ui.RESET}${ui.DIM} shell command, run:${ui.RESET}`);
329
+ console.log(` ${ui.CYAN}npm i -g @axiomatic-labs/claudeflow${ui.RESET}`);
330
+ if (cliStatus.error && cliStatus.error !== 'skipped') {
331
+ console.log(` ${ui.DIM}(auto-install failed: ${cliStatus.error})${ui.RESET}`);
332
+ }
333
+ console.log('');
334
+ }
335
+ console.log(` 1. Run ${ui.CYAN}${startCommand}${ui.RESET} to start Claude Code`);
293
336
 
294
337
  if (isGreenfield) {
295
338
  console.log(` 2. Type ${ui.CYAN}/claudeflow-install${ui.RESET} to start setup`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiomatic-labs/claudeflow",
3
- "version": "2.12.145",
3
+ "version": "2.12.147",
4
4
  "description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
5
5
  "bin": {
6
6
  "claudeflow": "./bin/cli.js"