From 4d4520aea47e477ffe130be57b4d8e25ed9e3a93 Mon Sep 17 00:00:00 2001 From: andyhtran <76441965+andyhtran@users.noreply.github.com> Date: Tue, 7 Jul 2026 20:25:43 -0400 Subject: [PATCH 1/2] Rework CLI help tiers, add multi-target skill install, and Codex support Introduce bare/standard/full help levels with --full flag for the complete command reference. Add --target/--codex/--skill-dir flags to skill commands for Codex and custom skill directory support. Replace document-skills path with per-agent skill directories, add dry-run preview for skill install, and restructure skills list/get with JSON output and runtime skill registry. Co-Authored-By: Claude Opus 4.6 --- Sources/MiniWhisperCLI/CLI.swift | 131 ++++- Sources/MiniWhisperCLI/DoctorCommand.swift | 9 +- Sources/MiniWhisperCLI/ModelsCommand.swift | 2 +- Sources/MiniWhisperCLI/Paths.swift | 35 +- Sources/MiniWhisperCLI/SkillsCommand.swift | 643 +++++++++++++++------ 5 files changed, 633 insertions(+), 187 deletions(-) diff --git a/Sources/MiniWhisperCLI/CLI.swift b/Sources/MiniWhisperCLI/CLI.swift index 569d14f..1b6e310 100644 --- a/Sources/MiniWhisperCLI/CLI.swift +++ b/Sources/MiniWhisperCLI/CLI.swift @@ -3,16 +3,24 @@ import Foundation enum CLI { static func run(arguments: [String]) async -> Int32 { guard let command = arguments.first else { - Help.printRoot() + Help.printBareRoot() + return 0 + } + + if Help.isRootFullHelp(arguments) { + Help.printFull() return 0 } let rest = Array(arguments.dropFirst()) switch command { - case "-h", "--help", "help": + case "-h", "--help": Help.printRoot() return 0 + case "-V", "--version": + Console.out(Version.current) + return 0 case "transcribe": return await TranscribeCommand.run(arguments: rest) case "models": @@ -37,6 +45,39 @@ enum CLI { } enum Help { + static func isRootFullHelp(_ arguments: [String]) -> Bool { + guard arguments.count == 2 else { return false } + return arguments.contains { $0 == "--help" || $0 == "-h" } + && arguments.contains("--full") + } + + static func printBareRoot() { + Console.out( + """ + MiniWhisper CLI + Local audio transcription with Parakeet and Whisper. + + Usage: + miniwhispercli [options] + + Start here (for AI agents): + miniwhispercli skills get core + miniwhispercli skills list --json + + Version-matched guidance. Load core first; use the JSON list for available guides. + + Next: + miniwhispercli transcribe