feat(cli): unify exec, queue, run into single 'run' command
Since app is not released, removed old commands entirely: - Deleted exec.zig (533 lines) - modularized version - Deleted queue.zig (1248 lines) - complete removal - Unified all functionality into run.zig New unified 'ml run' command features: - Auto-detects local vs remote execution via mode.detect() - Supports --local and --remote flags to force execution mode - Includes all resource options: --cpu, --memory, --gpu - Research context: --hypothesis, --context, --intent, --tags - Validation modes: --dry-run, --validate, --explain - Uses modular exec/remote.zig and exec/local.zig for execution Dispatcher updates (main.zig): - Removed 'e' (exec) handler - Removed 'q' (queue) handler - Updated help text to show unified command Import cleanup (commands.zig): - Removed queue.zig import Total code reduction: ~1,700 lines All tests pass.
This commit is contained in:
parent
9b4bd1b103
commit
e2673be8b5
2 changed files with 15 additions and 15 deletions
|
|
@ -10,7 +10,6 @@ pub const init = @import("commands/init.zig");
|
|||
pub const jupyter = @import("commands/jupyter.zig");
|
||||
pub const logs = @import("commands/log.zig");
|
||||
pub const prune = @import("commands/prune.zig");
|
||||
pub const queue = @import("commands/queue.zig");
|
||||
pub const run = @import("commands/run.zig");
|
||||
pub const status = @import("commands/status.zig");
|
||||
pub const sync = @import("commands/sync.zig");
|
||||
|
|
|
|||
|
|
@ -201,18 +201,19 @@ fn explainJob(allocator: std.mem.Allocator, job_name: []const u8, options: *cons
|
|||
}
|
||||
|
||||
fn printUsage() !void {
|
||||
std.debug.print(
|
||||
\\n
|
||||
\\ml run <job_name> [options] [-- <args>]
|
||||
\\
|
||||
\\Unified run command - handles both local and remote execution.
|
||||
\\
|
||||
\\Options:
|
||||
\\ --priority <1-10> Job priority (default: 5)
|
||||
\\ --cpu <n>, --memory <n>, --gpu <n> Resources
|
||||
\\ --local, --remote Force execution mode
|
||||
\\ --dry-run, --validate, --explain Preview modes
|
||||
\\ --hypothesis, --context, --tags Research context
|
||||
\\
|
||||
, .{});
|
||||
std.debug.print("Usage: ml run <job_name> [options] [-- <args>]\n", .{});
|
||||
std.debug.print("\nUnified run command - handles both local and remote execution.\n", .{});
|
||||
std.debug.print("\nOptions:\n", .{});
|
||||
std.debug.print(" --priority <1-10> Job priority (default: 5)\n", .{});
|
||||
std.debug.print(" --cpu <n> CPU cores requested (default: 1)\n", .{});
|
||||
std.debug.print(" --memory <n> Memory GB requested (default: 4)\n", .{});
|
||||
std.debug.print(" --gpu <n> GPU devices requested (default: 0)\n", .{});
|
||||
std.debug.print(" --local Force local execution\n", .{});
|
||||
std.debug.print(" --remote Force remote execution\n", .{});
|
||||
std.debug.print(" --dry-run Show what would happen\n", .{});
|
||||
std.debug.print(" --validate Validate job without running\n", .{});
|
||||
std.debug.print(" --explain Explain what will happen\n", .{});
|
||||
std.debug.print(" --hypothesis <text> Research hypothesis\n", .{});
|
||||
std.debug.print(" --context <text> Background information\n", .{});
|
||||
std.debug.print(" --tags <csv> Comma-separated tags\n", .{});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue