Files
bot/Swabble/Sources/swabble/Commands/StatusCommand.swift
zooqueenandHanzo Dev 4d0d8dc518 feat: rebrand claw/openclaw references to Hanzo, fix chat via claude-cli
- Remove all openclaw/claw branding across docs, scripts, skills, src,
  and config files; rename clawhub → hanzo-skills
- Fix chat: use built-in claude-cli provider to spawn `claude -p` directly,
  using agent subscription (no API key needed)
- Clear CLAUDECODE env var in CLI backend to allow nested sessions
- Rename "Cron Jobs" to "Jobs" in navigation
- Fix agent-tab active pill styling

Co-authored-by: Hanzo Dev <[email protected]>
2026-02-13 12:17:47 -08:00

35 lines
1.1 KiB
Swift

import Commander
import Foundation
import Swabble
@MainActor
struct StatusCommand: ParsableCommand {
static var commandDescription: CommandDescription {
CommandDescription(commandName: "status", abstract: "Show daemon state")
}
@Option(name: .long("config"), help: "Path to config JSON") var configPath: String?
init() {}
init(parsed: ParsedValues) {
self.init()
if let cfg = parsed.options["config"]?.last { configPath = cfg }
}
mutating func run() async throws {
let cfg = try? ConfigLoader.load(at: configURL)
let wake = cfg?.wake.word ?? "hanzo"
let wakeEnabled = cfg?.wake.enabled ?? false
let latest = await TranscriptsStore.shared.latest().suffix(3)
print("wake: \(wakeEnabled ? wake : "disabled")")
if latest.isEmpty {
print("transcripts: (none yet)")
} else {
print("last transcripts:")
latest.forEach { print("- \($0)") }
}
}
private var configURL: URL? { configPath.map { URL(fileURLWithPath: $0) } }
}