Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/hop/blob/main/Sources/CliDev.swift # hop Hop: a small native macOS launcher. Clipboard history, find, on-device dictation and your coding agent behind one key. Brought by drakestapleton Sign in to star 1 stars 1 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `hop / Sources / CliDev.swift` 391 lines · 24328 bytes Raw Blame History 1 import AppKit 2 3 /// The developer side of `hop` in a terminal: ask a model, read what was copied, open an app by Hop's own 4 /// matching, see Hop's state, put `hop` on the PATH, and `--json` for scripts. Answers and items go to standard 5 /// output and nothing else does: notes, who answered and errors go to standard error, so a pipe gets only the result. 6 /// Exit status: 0 done, 1 nothing found or it failed, 2 the command was not written correctly. 7 extension Cli { 8 /// Every command: its arguments, one line on what it does, and what else is worth knowing. 9 static let guide: [(name: String, args: String, what: String, more: String)] = [ 10 ("show", "", "open Hop's box, starting Hop if it is not running", 11 "hop typed alone in a terminal does the same. Hop has no Dock icon of its own while it runs, only the one in the menu bar. Opening Hop.app while Hop runs also opens the box; opening it when Hop is not running only starts Hop."), 12 ("ask", "[-m ] [question]", "ask the model Hop's Ask uses; the answer streams to standard output", 13 "Text piped in is added under the question (git diff | hop ask review this). Without -m the model is chosen as on the Ask screen: your own model first when it answers. The request goes where that model's settings send it. Who answered is said on standard error. Each question stands alone: Hop keeps no conversation and adds no Cortex notes (the Claude CLI saves its own session files, as it does for the Ask screen)."), 14 ("fuse", "[--plan] [--stronger-than ] [--kind ] [--difficulty ] [--stakes ] [--brief ] [--] ", "let Hop choose who answers or does the work", "Uses the same chooser as Agent. A coding tool may act on files after the configured permission checks."), 15 ("clip", "[--json] [-n ] [ | ]", "what you copied: 20 of them (pinned first, then newest), the ones with these words, or one item whole", 16 "Read only: nothing is changed and Hop need not be running. The order is the Clipboard screen's. A lone number prints that text item exactly as it was copied (hop clip 1 | pbcopy). Images are listed but not printed."), 17 ("open", "[--which] ", "open or switch to an app, matched as the one box matches it", 18 "Part of a name, initials or a slip of the finger are enough. --which only says which app it would be."), 19 ("find", "[--json] ", "search this Mac and every machine in the settings at once", ""), 20 ("run", " ", "run a command on a machine (the network route is automatic)", "The exit status is the remote command's, as ssh reports it."), 21 ("machines", "[--json]", "which machines are reachable, and by which route", ""), 22 ("status", "[--json]", "version, whether Hop is running, settings, models, machines, clipboard", 23 "Only your own models (this Mac, your network) are asked whether they answer; nothing is sent anywhere else."), 24 ("swarm", "[ | board | check] [--posts]", "list the agent swarms Hop can read, or show one", ""), 25 ("panel", "", "the launcher panel written in Omega: type, Enter opens the app", ""), 26 ("hear", "