mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-03 05:45:04 +03:00
Merge PR #2280: feat(cli): CLI v4 — Commander.js, 50+ commands, TUI, i18n, plugins (Phases 0-9)
Complete rewrite of the OmniRoute CLI: - Commander.js-based modular architecture (50+ command files) - Full i18n support (en + pt-BR, 1222 keys each) - TUI interactive interface (OAuthFlow, EvalWatch, ProvidersTestAll) - Plugin system (omniroute-cmd-*) - OpenAPI codegen (omniroute api <tag> <op>) - Commands: serve, combo, compression, keys, tunnel, backup, test-provider, health, memory, MCP, A2A, oauth, skills, webhooks, usage, cost, eval, context-eng, dashboard, doctor, env, files, logs, models, nodes, oneproxy, open, openapi, plugin, policy, pricing, providers, quota, registry, repl, reset-encrypted-columns, resilience, restart, runtime, sessions, setup, simulate, status, stop, stream, sync, tags, telemetry, translator, tray, update - Code review fixes: C1-C3, I1-I5, M1-M4 applied # Conflicts: # bin/cli/commands/config.mjs # bin/omniroute.mjs # package-lock.json # package.json
This commit is contained in:
@@ -526,6 +526,22 @@ amp --model "{{model}}"
|
||||
},
|
||||
};
|
||||
|
||||
// ─── Registry helpers ────────────────────────────────────────────────────────
|
||||
|
||||
export type CliToolEntry = (typeof CLI_TOOLS)[keyof typeof CLI_TOOLS];
|
||||
|
||||
/** Returns an ordered list of all registered CLI tools. */
|
||||
export function listCliTools(): CliToolEntry[] {
|
||||
return Object.values(CLI_TOOLS) as CliToolEntry[];
|
||||
}
|
||||
|
||||
/** Returns a single tool by id, or undefined if not found. */
|
||||
export function getCliTool(id: string): CliToolEntry | undefined {
|
||||
return (CLI_TOOLS as Record<string, CliToolEntry>)[id];
|
||||
}
|
||||
|
||||
// ─── Provider model mapping helper ───────────────────────────────────────────
|
||||
|
||||
// Get all provider models for mapping dropdown
|
||||
export const getProviderModelsForMapping = (providers) => {
|
||||
const result = [];
|
||||
|
||||
Reference in New Issue
Block a user