mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
- Add tool-detector.ts (6 CLI tools: claude, codex, opencode, cline, kilocode, continue) - Add config-generator/ factory + 6 generators (JSON + YAML) - Add doctor/checks.ts for CLI tool health checks - Add log-streamer.ts for usage log streaming - Add @omniroute/opencode-provider npm package - Add 5 CLI commands: config, status, logs, update, provider - Add 3 API routes: config, detect, apply - Update bin/omniroute.mjs, bin/cli/index.mjs, package.json - Update docs: SETUP_GUIDE.md, CLI-TOOLS.md - All tests pass (4302/4326, 24 pre-existing failures unchanged)
45 lines
1.2 KiB
JavaScript
45 lines
1.2 KiB
JavaScript
import { runDoctorCommand } from "./commands/doctor.mjs";
|
|
import { runProvidersCommand } from "./commands/providers.mjs";
|
|
import { runSetupCommand } from "./commands/setup.mjs";
|
|
import { runConfigCommand } from "./commands/config.mjs";
|
|
import { runStatusCommand } from "./commands/status.mjs";
|
|
import { runLogsCommand } from "./commands/logs.mjs";
|
|
import { runUpdateCommand } from "./commands/update.mjs";
|
|
import { runProviderCommand } from "./commands/provider-cmd.mjs";
|
|
|
|
export async function runCliCommand(command, argv, context = {}) {
|
|
if (command === "doctor") {
|
|
return runDoctorCommand(argv, context);
|
|
}
|
|
|
|
if (command === "providers") {
|
|
return runProvidersCommand(argv, context);
|
|
}
|
|
|
|
if (command === "setup") {
|
|
return runSetupCommand(argv, context);
|
|
}
|
|
|
|
if (command === "config") {
|
|
return runConfigCommand(argv);
|
|
}
|
|
|
|
if (command === "status") {
|
|
return runStatusCommand(argv);
|
|
}
|
|
|
|
if (command === "logs") {
|
|
return runLogsCommand(argv);
|
|
}
|
|
|
|
if (command === "update") {
|
|
return runUpdateCommand(argv);
|
|
}
|
|
|
|
if (command === "provider") {
|
|
return runProviderCommand(argv);
|
|
}
|
|
|
|
throw new Error(`Unknown CLI command: ${command}`);
|
|
}
|