UNPKG

@sethdouglasford/claude-flow

Version:

Claude Code Flow - Advanced AI-powered development workflows with SPARC methodology

123 lines (118 loc) • 5.14 kB
#!/usr/bin/env node /** * Claude-Flow CLI entry point - Remote execution friendly version * This version can be run directly from GitHub */ const VERSION = "1.0.71"; // Simple color functions const colors = { red: (text) => `\x1b[31m${text}\x1b[0m`, green: (text) => `\x1b[32m${text}\x1b[0m`, yellow: (text) => `\x1b[33m${text}\x1b[0m`, blue: (text) => `\x1b[34m${text}\x1b[0m`, gray: (text) => `\x1b[90m${text}\x1b[0m`, bold: (text) => `\x1b[1m${text}\x1b[0m`, }; function printHelp() { console.log(` 🧠 Claude-Flow v${VERSION} - Advanced AI Agent Orchestration System USAGE: claude-flow [COMMAND] [OPTIONS] COMMANDS: init Initialize Claude Code integration files start Start the orchestration system agent Manage agents (spawn, list, terminate, info) task Manage tasks (create, list, status, cancel, workflow) memory Manage memory (query, export, import, stats, cleanup) mcp Manage MCP server (status, tools, start, stop) config Manage configuration (show, get, set, init, validate) status Show system status monitor Monitor system in real-time session Manage terminal sessions workflow Execute workflow files claude Spawn Claude instances with specific configurations version Show version information help Show this help message OPTIONS: -c, --config <path> Path to configuration file -v, --verbose Enable verbose logging --help Show help for any command EXAMPLES: claude-flow init # Initialize Claude Code integration claude-flow start # Start orchestration system claude-flow agent spawn researcher # Spawn a research agent claude-flow task create research "Analyze authentication patterns" claude-flow memory store key "value" claude-flow status # Check system status For more info: https://github.com/sethdford/claude-code-flow `); } function printSuccess(message) { console.log(colors.green(`āœ… ${message}`)); } function _printError(message) { console.log(colors.red(`āŒ ${message}`)); } function printWarning(message) { console.log(colors.yellow(`āš ļø ${message}`)); } function main() { const args = process.argv.slice(2); const command = args[0] || "help"; const _subArgs = args.slice(1); switch (command) { case "--help": case "-h": case "help": printHelp(); break; case "--version": case "-v": case "version": console.log(`Claude-Flow v${VERSION}`); break; case "init": printSuccess("Initializing Claude Code integration files..."); console.log("šŸ“ This command would create:"); console.log(" - CLAUDE.md (Claude Code configuration)"); console.log(" - memory-bank.md (Memory system documentation)"); console.log(" - coordination.md (Agent coordination documentation)"); console.log(" - Memory folder structure"); console.log("\nšŸ’” To run locally, clone the repo and use:"); console.log(" git clone https://github.com/sethdford/vibex-claude-code-flow.git"); console.log(" cd claude-code-flow"); console.log(" npm install -g claude-flow"); console.log(" claude-flow init"); break; case "install": console.log(colors.blue("šŸ“¦ Installing Claude-Flow...")); console.log("\nRun these commands to install:"); console.log(colors.gray(" # Using npm (recommended)")); console.log(" npm install -g claude-flow"); console.log(""); console.log(colors.gray(" # Or clone and build from source")); console.log(" git clone https://github.com/sethdford/vibex-claude-code-flow.git"); console.log(" cd claude-code-flow"); console.log(" npm install && npm run build"); break; default: printWarning(`Command '${command}' requires local installation.`); console.log("\nšŸ“„ To use all features, install Claude-Flow:"); console.log(" npm install -g claude-flow"); console.log("\nšŸ“š Documentation: https://github.com/sethdford/vibex-claude-code-flow"); console.log("šŸ’¬ Issues: https://github.com/sethdford/vibex-claude-code-flow/issues"); console.log("šŸ”— Original by @ruvnet: https://github.com/ruvnet/claude-code-flow"); break; } } // Check if this is the main module being run const isMainModule = import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("/claude-flow") || process.argv[1]?.endsWith("\\claude-flow") || process.argv[1]?.endsWith("/index-remote.js") || process.argv[1]?.endsWith("\\index-remote.js"); if (isMainModule) { main(); } export {}; //# sourceMappingURL=index-remote.js.map