mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-27 15:07:41 +00:00
- Add AsyncAdapter.swift to bridge async/sync execution - Change AsyncParsableCommand back to ParsableCommand - Implement AsyncRunnable protocol for async execution - Use DispatchSemaphore pattern for synchronous blocking - Make ErrorBox thread-safe with @unchecked Sendable This fixes the CLI execution issue where commands were showing help instead of executing, by properly bridging the async/sync worlds as required by ArgumentParser. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
20 lines
No EOL
617 B
Swift
20 lines
No EOL
617 B
Swift
import ArgumentParser
|
|
import Foundation
|
|
|
|
@available(macOS 10.15, *)
|
|
struct PeekabooCommand: ParsableCommand, AsyncRunnable {
|
|
static let configuration = CommandConfiguration(
|
|
commandName: "peekaboo",
|
|
abstract: "A macOS utility for screen capture, application listing, and window management",
|
|
version: Version.current,
|
|
subcommands: [ImageCommand.self, ListCommand.self],
|
|
defaultSubcommand: ImageCommand.self
|
|
)
|
|
|
|
func runAsync() async throws {
|
|
// Root command doesn't do anything, subcommands handle everything
|
|
}
|
|
}
|
|
|
|
// Entry point
|
|
PeekabooCommand.main() |