Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Fix ruflo CLI branding: show 'ruflo' instead of 'claude-flow' (#1163)

rUvcc4b9daecbe5
diff --git a/ruflo/bin/ruflo.js b/ruflo/bin/ruflo.js
index 5d79114f1f..e6748f6fe2 100755
--- a/ruflo/bin/ruflo.js
+++ b/ruflo/bin/ruflo.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-// Ruflo CLI - thin wrapper around @claude-flow/cli
+// Ruflo CLI - thin wrapper around @claude-flow/cli with ruflo branding
import { fileURLToPath } from 'node:url';
import { dirname, resolve, join } from 'node:path';
import { existsSync } from 'node:fs';
@@ -11,7 +11,7 @@ function findCliPath() {
let dir = resolve(__dirname, '..');
for (let i = 0; i < 10; i++) {
const candidate = join(dir, 'node_modules', '@claude-flow', 'cli', 'bin', 'cli.js');
- if (existsSync(candidate)) return candidate;
+ if (existsSync(candidate)) return dir;
const parent = dirname(dir);
if (parent === dir) break;
dir = parent;
@@ -19,10 +19,27 @@ function findCliPath() {
return null;
}
-const cliPath = findCliPath();
-if (cliPath) {
- await import(cliPath);
+const pkgDir = findCliPath();
+const cliBase = pkgDir
+ ? join(pkgDir, 'node_modules', '@claude-flow', 'cli')
+ : resolve(__dirname, '../../v3/@claude-flow/cli');
+
+// MCP mode: delegate to cli.js directly (branding irrelevant for JSON-RPC)
+const cliArgs = process.argv.slice(2);
+const isExplicitMCP = cliArgs.length >= 1 && cliArgs[0] === 'mcp' && (cliArgs.length === 1 || cliArgs[1] === 'start');
+const isMCPMode = !process.stdin.isTTY && (process.argv.length === 2 || isExplicitMCP);
+
+if (isMCPMode) {
+ await import(join(cliBase, 'bin', 'cli.js'));
} else {
- // Fallback: dev/linked installs
- await import(resolve(__dirname, '../../v3/@claude-flow/cli/bin/cli.js'));
+ // CLI mode: use ruflo branding
+ const { CLI } = await import(join(cliBase, 'dist', 'src', 'index.js'));
+ const cli = new CLI({
+ name: 'ruflo',
+ description: 'Ruflo - AI Agent Orchestration Platform',
+ });
+ cli.run().catch((error) => {
+ console.error('Fatal error:', error.message);
+ process.exit(1);
+ });
}
diff --git a/v3/@claude-flow/cli/src/index.ts b/v3/@claude-flow/cli/src/index.ts
index b773ea9ba9..c29c07b544 100644
--- a/v3/@claude-flow/cli/src/index.ts
+++ b/v3/@claude-flow/cli/src/index.ts
@@ -338,7 +338,7 @@ export class CLI {
this.output.writeln(` ${this.name} mcp start # Start MCP server`);
this.output.writeln();
- this.output.writeln(this.output.dim('Run "claude-flow <command> --help" for command help'));
+ this.output.writeln(this.output.dim(`Run "${this.name} <command> --help" for command help`));
this.output.writeln();
this.output.writeln(this.output.dim('Created with ❤️ by ruv.io'));
this.output.writeln();
@@ -429,7 +429,7 @@ export class CLI {
this.output.dim(`Updates available: ${nonAutoUpdates.map(u => `${u.package}@${u.latestVersion}`).join(', ')}`)
);
this.output.writeln(
- this.output.dim(`Run 'claude-flow update check' for details`)
+ this.output.dim(`Run '${this.name} update check' for details`)
);
}
}