commit 3eeef30313cb3e143c81255ca8f14c5a315ffe50 Author: Prad Nukala Date: Wed Oct 14 13:32:31 2026 -0400 Import from root chezmoi source diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73c49f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +conf.d/secrets.fish +fish_variables diff --git a/auto-Niri.fish b/auto-Niri.fish new file mode 100644 index 0000000..02f9606 --- /dev/null +++ b/auto-Niri.fish @@ -0,0 +1,5 @@ +# Auto start Niri on tty1 +if test -z "$DISPLAY" ;and test "$XDG_VTNR" -eq 1 + mkdir -p ~/.cache + exec niri-session > ~/.cache/niri.log 2>&1 +end diff --git a/completions/ccc.fish b/completions/ccc.fish new file mode 100644 index 0000000..f4c8f89 --- /dev/null +++ b/completions/ccc.fish @@ -0,0 +1 @@ +complete --command ccc --no-files --arguments "(env _CCC_COMPLETE=complete_fish _TYPER_COMPLETE_FISH_ACTION=get-args _TYPER_COMPLETE_ARGS=(commandline -cp) ccc)" --condition "env _CCC_COMPLETE=complete_fish _TYPER_COMPLETE_FISH_ACTION=is-args _TYPER_COMPLETE_ARGS=(commandline -cp) ccc" diff --git a/completions/grok.fish b/completions/grok.fish new file mode 100644 index 0000000..5148a5c --- /dev/null +++ b/completions/grok.fish @@ -0,0 +1,685 @@ +# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. +function __fish_grok_global_optspecs + string join \n v/version cwd= leader-socket= debug debug-file= always-approve trust allow= deny= p/single= prompt-json= prompt-file= verbatim output-format= include-partial-messages json-schema= m/model= reasoning-effort= rules= compaction-mode= compaction-detail= system-prompt-override= r/resume= load= c/continue s/session-id= fork-session w/worktree= worktree-ref= restore-code no-plan no-subagents no-ask-user experimental-memory no-memory agent= agents= tools= disallowed-tools= max-turns= permission-mode= disable-web-search no-wait-for-background background-wait-timeout= sandbox= storage-mode= client-identifier= hunk-tracker-mode= terminal fs-read fs-write no-auto-update todo-gate installer= no-alt-screen minimal fullscreen log-sampling force-login oauth leader no-leader h/help +end + +function __fish_grok_needs_command + # Figure out if the current invocation already has a command. + set -l cmd (commandline -opc) + set -e cmd[1] + argparse -s (__fish_grok_global_optspecs) -- $cmd 2>/dev/null + or return + if set -q argv[1] + # Also print the command, so this can be used to figure out what it is. + echo $argv[1] + return 1 + end + return 0 +end + +function __fish_grok_using_subcommand + set -l cmd (__fish_grok_needs_command) + test -z "$cmd" + and return 1 + contains -- $cmd[1] $argv +end + +complete -c grok -n "__fish_grok_needs_command" -l cwd -d 'Working directory' -r -F +complete -c grok -n "__fish_grok_needs_command" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_needs_command" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_needs_command" -l allow -d 'Permission allow rule (compat alias: --allowedTools)' -r +complete -c grok -n "__fish_grok_needs_command" -l deny -d 'Permission deny rule (compat alias: --disallowedTools)' -r +complete -c grok -n "__fish_grok_needs_command" -s p -l single -d 'Single-turn prompt. Prints the response to stdout and exits' -r +complete -c grok -n "__fish_grok_needs_command" -l prompt-json -d 'Single-turn prompt as JSON content blocks' -r +complete -c grok -n "__fish_grok_needs_command" -l prompt-file -d 'Single-turn prompt from a file' -r -F +complete -c grok -n "__fish_grok_needs_command" -l output-format -d 'Output format for headless mode' -r -f -a "plain\t'' +json\t'' +streaming-json\t'NDJSON of the agent native ACP session updates' +streaming-messages-json\t'NDJSON in the Anthropic Messages API wire format'" +complete -c grok -n "__fish_grok_needs_command" -l json-schema -d 'JSON Schema for structured output. When set, the model is constrained to produce JSON matching this schema. Implies --output-format json. Example: --json-schema \'{"type":"object","properties":{"name":{"type":"string"}}}\'' -r +complete -c grok -n "__fish_grok_needs_command" -s m -l model -d 'Model ID to use' -r +complete -c grok -n "__fish_grok_needs_command" -l reasoning-effort -l effort -d 'Reasoning effort for reasoning models' -r +complete -c grok -n "__fish_grok_needs_command" -l rules -d 'Extra rules to append to the system prompt' -r +complete -c grok -n "__fish_grok_needs_command" -l compaction-mode -d 'Compaction mode [summary|transcript|segments]: `summary` (default) adds no pointer; `transcript` points at the raw transcript; `segments` persists per-segment markdown to grep. Sets `GROK_COMPACTION_MODE`' -r +complete -c grok -n "__fish_grok_needs_command" -l compaction-detail -d 'Segments verbatim detail [none|minimal|balanced|verbose] (default `verbose`). Only affects `--compaction-mode segments`. Sets `GROK_COMPACTION_DETAIL`' -r +complete -c grok -n "__fish_grok_needs_command" -l system-prompt-override -d 'Override the agent\'s system prompt (compat alias: --system-prompt)' -r +complete -c grok -n "__fish_grok_needs_command" -s r -l resume -d 'Resume a session by ID or title, or the most recent if omitted. Non-ID values match session titles for the current directory (ignoring letter case; a sole renamed match wins among duplicates, otherwise ambiguity errors; UUID-shaped values always mean IDs)' -r +complete -c grok -n "__fish_grok_needs_command" -l load -d 'Resume a previous session by session ID (alias for --resume)' -r +complete -c grok -n "__fish_grok_needs_command" -s s -l session-id -d 'Use a specific session UUID for a **new** conversation (must be a valid UUID and must not already exist under the target session directory). With `--resume`/`--continue`, only valid together with `--fork-session` (names the forked session). Does not resume existing sessions — use `--resume` / `--continue` instead' -r +complete -c grok -n "__fish_grok_needs_command" -s w -l worktree -d 'Start the session in a new git worktree, optionally named. With `--resume` of a remote session, pass `--restore-code` to apply the snapshot codebase (conversation is restored either way). Headless (`-p`) does not create a worktree from this flag' -r +complete -c grok -n "__fish_grok_needs_command" -l worktree-ref -l ref -d 'Branch, tag, or commit to base the worktree on (with `--worktree`). Defaults to the current HEAD of the source checkout when omitted' -r +complete -c grok -n "__fish_grok_needs_command" -l agent -d 'Agent name or definition file path' -r +complete -c grok -n "__fish_grok_needs_command" -l agents -d 'Inline subagent definitions as JSON' -r +complete -c grok -n "__fish_grok_needs_command" -l tools -d 'Built-in tools to allow (comma-separated)' -r +complete -c grok -n "__fish_grok_needs_command" -l disallowed-tools -d 'Built-in tools to remove (comma-separated)' -r +complete -c grok -n "__fish_grok_needs_command" -l max-turns -d 'Maximum number of agent turns' -r +complete -c grok -n "__fish_grok_needs_command" -l permission-mode -d 'Permission mode' -r -f -a "default\t'' +acceptEdits\t'' +auto\t'' +dontAsk\t'' +bypassPermissions\t'' +plan\t''" +complete -c grok -n "__fish_grok_needs_command" -l background-wait-timeout -d 'Max seconds to wait for background work after the first turn ends (headless only). Applies to bash/monitor `task_completed`, background subagents (`SubagentFinished`), and any still-running non-persistent work. Persistent `monitor(persistent:true)` never completes and always waits the full timeout — use `--no-wait-for-background` or a lower timeout for throughput. Conflicts with `--no-wait-for-background`' -r +complete -c grok -n "__fish_grok_needs_command" -l sandbox -d 'Sandbox profile for filesystem and network access' -r +complete -c grok -n "__fish_grok_needs_command" -l storage-mode -d 'Session storage mode: local or writeback' -r +complete -c grok -n "__fish_grok_needs_command" -l client-identifier -d 'Override the client identifier sent to the agent' -r +complete -c grok -n "__fish_grok_needs_command" -l hunk-tracker-mode -d 'Hunk tracker mode: agent_only, all_dirty, or off ("disabled" is an alias for off, which turns the hunk tracker off entirely)' -r +complete -c grok -n "__fish_grok_needs_command" -l installer -d 'Set the installer field in config.toml' -r +complete -c grok -n "__fish_grok_needs_command" -s v -l version -d 'Print version' +complete -c grok -n "__fish_grok_needs_command" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_needs_command" -l always-approve -d 'Auto-approve all tool executions' +complete -c grok -n "__fish_grok_needs_command" -l trust -d 'Trust this folder and persist the decision to the trust store' +complete -c grok -n "__fish_grok_needs_command" -l verbatim -d 'Send the prompt exactly as given' +complete -c grok -n "__fish_grok_needs_command" -l include-partial-messages -d 'Emit incremental `stream_event` lines (text/thinking deltas) alongside whole messages. Only affects `--output-format streaming-messages-json`' +complete -c grok -n "__fish_grok_needs_command" -s c -l continue -d 'Continue the most recent session for the current working directory' +complete -c grok -n "__fish_grok_needs_command" -l fork-session -d 'When resuming (`--resume` / `--continue`), create a new session ID instead of reusing the original (optionally set via `--session-id`)' +complete -c grok -n "__fish_grok_needs_command" -l restore-code -d 'Restore the original session\'s repository snapshot when resuming. Remote sessions require `--worktree` (never checks out into the current directory). Without this flag, resume restores conversation only' +complete -c grok -n "__fish_grok_needs_command" -l no-plan -d 'Disable plan mode' +complete -c grok -n "__fish_grok_needs_command" -l no-subagents -d 'Disable subagent spawning' +complete -c grok -n "__fish_grok_needs_command" -l no-ask-user -d 'Disable structured question prompts from the agent' +complete -c grok -n "__fish_grok_needs_command" -l experimental-memory -d 'Enable cross-session memory' +complete -c grok -n "__fish_grok_needs_command" -l no-memory -d 'Disable cross-session memory for this session' +complete -c grok -n "__fish_grok_needs_command" -l disable-web-search -d 'Disable web search and web fetch tools' +complete -c grok -n "__fish_grok_needs_command" -l no-wait-for-background -d 'Exit as soon as the first agent turn ends, without waiting for pending background bash/monitor tasks or background subagents (headless only). Default for all `grok -p` runs is to wait (up to `--background-wait-timeout`) so eval harnesses see full task completion. Use this for fast scripts that only need the first turn\'s text. Does not wait for server-side auto-wake output or persistent monitors (those hit the timeout)' +complete -c grok -n "__fish_grok_needs_command" -l terminal -d 'Enable terminal support for the agent' +complete -c grok -n "__fish_grok_needs_command" -l fs-read -d 'Enable client-side file reads' +complete -c grok -n "__fish_grok_needs_command" -l fs-write -d 'Enable client-side file writes' +complete -c grok -n "__fish_grok_needs_command" -l no-auto-update -d 'Disable automatic updates for this session' +complete -c grok -n "__fish_grok_needs_command" -l todo-gate -d 'Enable the runtime turn-end TodoGate for this session' +complete -c grok -n "__fish_grok_needs_command" -l no-alt-screen -d 'Run inline instead of using the terminal alternate screen' +complete -c grok -n "__fish_grok_needs_command" -l minimal -d 'Experimental: scrollback-native rendering. Finalized blocks are printed into the terminal\'s native scrollback (use the terminal\'s own scroll / selection); a small pinned region holds the prompt + running turn. Session-scoped only — does not write config. To default plain `grok` to minimal, set `[ui] screen_mode = "minimal"` in ~/.grok/config.toml' +complete -c grok -n "__fish_grok_needs_command" -l fullscreen -d 'Open in the standard fullscreen TUI for this session, overriding a config `[ui] screen_mode = "minimal"` preference. Session-scoped only — does not write config. Fullscreen-vs-inline still follows the alt-screen policy (--no-alt-screen, [terminal] alt_screen, terminal auto-detection)' +complete -c grok -n "__fish_grok_needs_command" -l log-sampling -d 'Write sampling events to ~/.grok/logs/sampling.jsonl' +complete -c grok -n "__fish_grok_needs_command" -l force-login -d 'Show the login screen even when credentials are already available' +complete -c grok -n "__fish_grok_needs_command" -l oauth -d 'Use OAuth when the welcome screen starts authentication' +complete -c grok -n "__fish_grok_needs_command" -l leader -d 'Connect to a shared leader process' +complete -c grok -n "__fish_grok_needs_command" -l no-leader -d 'Run standalone even when leader mode is configured' +complete -c grok -n "__fish_grok_needs_command" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_needs_command" -a "agent" -d 'Run Grok without the interactive UI' +complete -c grok -n "__fish_grok_needs_command" -a "inspect" -d 'Show the configuration Grok discovers for this directory' +complete -c grok -n "__fish_grok_needs_command" -a "doctor" -d 'Check terminal, clipboard, color, and input support without starting Grok' +complete -c grok -n "__fish_grok_needs_command" -a "leader" -d 'Manage running leader processes' +complete -c grok -n "__fish_grok_needs_command" -a "logout" -d 'Sign out and clear cached credentials' +complete -c grok -n "__fish_grok_needs_command" -a "login" -d 'Sign in to Grok' +complete -c grok -n "__fish_grok_needs_command" -a "mcp" -d 'Manage MCP server configurations' +complete -c grok -n "__fish_grok_needs_command" -a "plugin" -d 'Manage plugins and marketplace sources' +complete -c grok -n "__fish_grok_needs_command" -a "memory" -d 'Manage cross-session memory' +complete -c grok -n "__fish_grok_needs_command" -a "models" -d 'List available models and exit' +complete -c grok -n "__fish_grok_needs_command" -a "sessions" -d 'List, search, or restore sessions' +complete -c grok -n "__fish_grok_needs_command" -a "setup" -d 'Fetch and install managed configuration' +complete -c grok -n "__fish_grok_needs_command" -a "share" -d 'Share a session and print the share URL' +complete -c grok -n "__fish_grok_needs_command" -a "wrap" -d 'Run any command with local clipboard support (OSC 52 → system clipboard)' +complete -c grok -n "__fish_grok_needs_command" -a "export" -d 'Export a session transcript as Markdown' +complete -c grok -n "__fish_grok_needs_command" -a "trace" -d 'Export or upload session trace data' +complete -c grok -n "__fish_grok_needs_command" -a "update" -d 'Check for updates or install a specific version' +complete -c grok -n "__fish_grok_needs_command" -a "version" -d 'Print version information' +complete -c grok -n "__fish_grok_needs_command" -a "v" -d 'Print version information' +complete -c grok -n "__fish_grok_needs_command" -a "completions" -d 'Generate shell completion scripts (bash, zsh, fish, powershell, ...)' +complete -c grok -n "__fish_grok_needs_command" -a "worktree" -d 'Manage git worktrees' +complete -c grok -n "__fish_grok_needs_command" -a "du" -d 'Show what the grok home (~/.grok) uses on disk' +complete -c grok -n "__fish_grok_needs_command" -a "disk-usage" -d 'Show what the grok home (~/.grok) uses on disk' +complete -c grok -n "__fish_grok_needs_command" -a "workspace" -d 'Expose this workspace to the Computer Hub (via the leader)' +complete -c grok -n "__fish_grok_needs_command" -a "dashboard" -d 'Open the Agent Dashboard view at startup' +complete -c grok -n "__fish_grok_needs_command" -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -s m -l model -d 'Model ID to use' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l reasoning-effort -l effort -d 'Reasoning effort for reasoning models' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l agent-profile -d 'Path to an agent profile file' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l plugin-dir -d 'Load a plugin from this directory for this process only (repeatable). Highest-priority plugin scope; always trusted — hooks and MCP servers activate without a prompt. Used by the Agent SDKs to inject per-connection plugins' -r -f -a "(__fish_complete_directories)" +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l grok-ws-origin -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l grok-ws-url -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l cli-chat-proxy-base-url -d 'Override the CLI chat proxy base URL' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l xai-api-base-url -d 'Override the public xAI API base URL' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l reauth -l --reauthenticate -d 'Run authentication before starting the agent' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l always-approve -d 'Auto-approve all tool executions' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l leader -d 'Connect to a shared leader process instead of starting a new agent. Allows multiple clients to share one backend. Defaults to [cli] use_leader in config.toml' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l no-leader -d 'Start a new agent even when config enables leader mode' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -f -a "stdio" -d 'Run the agent over stdio' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -f -a "headless" -d 'Run the agent headlessly over the Grok WebSocket relay' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -f -a "serve" -d 'Run the agent as a WebSocket server' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -f -a "leader" -d 'Run as the shared leader process for other clients' +complete -c grok -n "__fish_grok_using_subcommand agent; and not __fish_seen_subcommand_from stdio headless serve leader help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from stdio" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from stdio" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from stdio" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from stdio" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -l grok-ws-origin -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -l grok-ws-url -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from headless" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l bind -d 'Address for the server to listen on' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l secret -d 'Secret token for client authentication (auto-generated if not provided)' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l remote -d 'Remote agent URL for proxy mode' -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l grok-ws-origin -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l grok-ws-url -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from serve" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l grok-ws-origin -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l grok-ws-url -r +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l no-exit-on-disconnect -d 'Keep the leader running after the last client disconnects' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l relay-on-demand -d 'Defer the grok.com relay WebSocket until the first headless IPC client registers. Without this flag the leader connects the relay eagerly at startup — required for bare leaders (headless remote env / systemd) that receive remote prompts *through* the relay. Passed by leaders auto-spawned from interactive clients (TUI/IDE), which only need the relay if a headless client appears' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l no-auto-update -d 'Disable periodic auto-update checks for the leader' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from leader" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from help" -f -a "stdio" -d 'Run the agent over stdio' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from help" -f -a "headless" -d 'Run the agent headlessly over the Grok WebSocket relay' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from help" -f -a "serve" -d 'Run the agent as a WebSocket server' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from help" -f -a "leader" -d 'Run as the shared leader process for other clients' +complete -c grok -n "__fish_grok_using_subcommand agent; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand inspect" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand inspect" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand inspect" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand inspect" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand inspect" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -l json -d 'Print the diagnostic report as JSON' +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -f -a "fix" -d 'Apply an automatic fix' +complete -c grok -n "__fish_grok_using_subcommand doctor; and not __fish_seen_subcommand_from fix help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from fix" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from fix" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from fix" -l yes -d 'Apply the displayed changes without confirmation' +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from fix" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from fix" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from help" -f -a "fix" -d 'Apply an automatic fix' +complete -c grok -n "__fish_grok_using_subcommand doctor; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -f -a "list" -d 'List running leader processes' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -f -a "info" -d 'Show details for a leader process' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -f -a "kill" -d 'Stop all running leader processes' +complete -c grok -n "__fish_grok_using_subcommand leader; and not __fish_seen_subcommand_from list info kill help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from info" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from kill" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from kill" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from kill" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from kill" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from help" -f -a "list" -d 'List running leader processes' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from help" -f -a "info" -d 'Show details for a leader process' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from help" -f -a "kill" -d 'Stop all running leader processes' +complete -c grok -n "__fish_grok_using_subcommand leader; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand logout" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand logout" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand logout" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand logout" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand login" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand login" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand login" -l legacy -d 'Ignored (kept for backwards compatibility). OAuth2 is now the only auth method' +complete -c grok -n "__fish_grok_using_subcommand login" -l oauth -d 'Use Grok OAuth via auth.x.ai' +complete -c grok -n "__fish_grok_using_subcommand login" -l device-auth -l device-code -d 'Use device-code authentication for headless/remote environments' +complete -c grok -n "__fish_grok_using_subcommand login" -l devbox -d 'Authenticate for remote development environments (hidden)' +complete -c grok -n "__fish_grok_using_subcommand login" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand login" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "list" -d 'List configured MCP servers' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "add" -d 'Add or update an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "remove" -d 'Remove an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "enable" -d 'Enable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "disable" -d 'Disable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "doctor" -d 'Diagnose MCP server configuration and connectivity' +complete -c grok -n "__fish_grok_using_subcommand mcp; and not __fish_seen_subcommand_from list add remove enable disable doctor help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -s t -l transport -d 'Transport type. Defaults to stdio' -r -f -a "stdio\t'Launch a local process and communicate over stdin/stdout' +http\t'Connect to a remote server over streamable HTTP' +sse\t'Connect to a remote server over Server-Sent Events'" +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -s s -l scope -d 'Config to write to: user (~/.grok/config.toml) or project (./.grok/config.toml)' -r -f -a "user\t'`~/.grok/config.toml`, available in all your projects' +project\t'`./.grok/config.toml`, shared with everyone working in this directory'" +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -s e -l env -d 'Environment variable for the server process (repeatable)' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -s H -l header -d 'HTTP header for remote servers (repeatable)' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l command -d 'Legacy alias for the positional command argument' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l args -d 'Legacy companion to --command' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l url -d 'Legacy alias for adding a remote server by URL' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l type -d 'Legacy transport type for --url servers' -r +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from add" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from remove" -s s -l scope -d 'Config to remove from. When omitted, all scopes are searched' -r -f -a "user\t'`~/.grok/config.toml`, available in all your projects' +project\t'`./.grok/config.toml`, shared with everyone working in this directory'" +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from remove" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from remove" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from remove" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from remove" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from enable" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from enable" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from enable" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from enable" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from disable" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from disable" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from disable" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from disable" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from doctor" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from doctor" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from doctor" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from doctor" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from doctor" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "list" -d 'List configured MCP servers' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "add" -d 'Add or update an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "remove" -d 'Remove an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "enable" -d 'Enable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "disable" -d 'Disable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "doctor" -d 'Diagnose MCP server configuration and connectivity' +complete -c grok -n "__fish_grok_using_subcommand mcp; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "list" -d 'List installed plugins' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "install" -d 'Install a plugin from a git URL or local path' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "uninstall" -d 'Uninstall an installed plugin by name' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "rm" -d 'Uninstall an installed plugin by name' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "remove" -d 'Uninstall an installed plugin by name' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "update" -d 'Update installed plugin(s)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "enable" -d 'Enable a disabled plugin' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "disable" -d 'Disable a plugin without uninstalling it' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "details" -d 'Show a plugin\'s component inventory' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "validate" -d 'Validate a plugin manifest' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "tag" -d 'Create a release git tag from the plugin\'s manifest version' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "marketplace" -d 'Manage marketplace sources' +complete -c grok -n "__fish_grok_using_subcommand plugin; and not __fish_seen_subcommand_from list install uninstall rm remove update enable disable details validate tag marketplace help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -l available -d 'Include available plugins from marketplace sources. Requires --json' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from install" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from install" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from install" -l trust -d 'Trust the plugin immediately (skip confirmation prompt)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from install" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -l confirm -d 'Skip confirmation for multi-plugin repos' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -l keep-data -d 'Preserve the plugin\'s persistent data directory' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -l confirm -d 'Skip confirmation for multi-plugin repos' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -l keep-data -d 'Preserve the plugin\'s persistent data directory' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from rm" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -l confirm -d 'Skip confirmation for multi-plugin repos' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -l keep-data -d 'Preserve the plugin\'s persistent data directory' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from remove" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from update" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from update" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from update" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from update" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from enable" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from enable" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from enable" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from enable" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from disable" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from disable" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from disable" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from disable" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from details" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from details" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from details" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from details" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from validate" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from validate" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from validate" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from validate" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -l push -d 'Push the tag to the remote after creating it' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -s f -l force -d 'Create the tag even if the working tree is dirty or tag exists' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -l dry-run -d 'Print what would be tagged without creating the tag' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from tag" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -f -a "list" -d 'List configured marketplace sources and their plugins' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -f -a "add" -d 'Add a marketplace source (git URL, GitHub shorthand, or local path)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -f -a "remove" -d 'Remove a marketplace source and uninstall its plugins' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -f -a "update" -d 'Refresh marketplace source(s) and sync git caches' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from marketplace" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "list" -d 'List installed plugins' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "install" -d 'Install a plugin from a git URL or local path' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Uninstall an installed plugin by name' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "update" -d 'Update installed plugin(s)' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "enable" -d 'Enable a disabled plugin' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "disable" -d 'Disable a plugin without uninstalling it' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "details" -d 'Show a plugin\'s component inventory' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "validate" -d 'Validate a plugin manifest' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "tag" -d 'Create a release git tag from the plugin\'s manifest version' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "marketplace" -d 'Manage marketplace sources' +complete -c grok -n "__fish_grok_using_subcommand plugin; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -f -a "clear" -d 'Clear memory files (workspace by default)' +complete -c grok -n "__fish_grok_using_subcommand memory; and not __fish_seen_subcommand_from clear help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l workspace -d 'Clear workspace-scoped memory (MEMORY.md, sessions/, index.sqlite)' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l global -d 'Clear global MEMORY.md' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l all -d 'Clear both workspace and global memory' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -s y -l yes -d 'Skip confirmation prompt' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from clear" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from help" -f -a "clear" -d 'Clear memory files (workspace by default)' +complete -c grok -n "__fish_grok_using_subcommand memory; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand models" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand models" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand models" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand models" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -f -a "list" -d 'List recent sessions (same as search with no query)' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -f -a "search" -d 'Search sessions by keyword' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -f -a "delete" -d 'Permanently delete a session from history' +complete -c grok -n "__fish_grok_using_subcommand sessions; and not __fish_seen_subcommand_from list search delete help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from list" -s n -l limit -d 'Maximum number of sessions to show' -r +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from search" -s n -l limit -d 'Maximum number of sessions to show' -r +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from search" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from search" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from search" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from search" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from delete" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from delete" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from delete" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from delete" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from help" -f -a "list" -d 'List recent sessions (same as search with no query)' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from help" -f -a "search" -d 'Search sessions by keyword' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from help" -f -a "delete" -d 'Permanently delete a session from history' +complete -c grok -n "__fish_grok_using_subcommand sessions; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand setup" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand setup" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand setup" -l json -d 'Print the fetched configuration as JSON instead of installing it; writes nothing to ~/.grok' +complete -c grok -n "__fish_grok_using_subcommand setup" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand setup" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand share" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand share" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand share" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand share" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand wrap" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand wrap" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand wrap" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand wrap" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_using_subcommand export" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand export" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand export" -s c -l clipboard -d 'Copy to clipboard instead of writing to stdout' +complete -c grok -n "__fish_grok_using_subcommand export" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand export" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand trace" -s o -l output -d 'Output path (default: $GROK_HOME/trace-exports/.tar.gz)' -r -F +complete -c grok -n "__fish_grok_using_subcommand trace" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand trace" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand trace" -l local -d 'Save locally only, skip remote upload' +complete -c grok -n "__fish_grok_using_subcommand trace" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand trace" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand trace" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand update" -l version -d 'Install a specific version (e.g. 0.1.150 or 0.1.151-alpha.2)' -r +complete -c grok -n "__fish_grok_using_subcommand update" -l trigger -d 'Internal: what spawned this `grok update` (`user_command`, `auto_background`, `leader_converge`). Hidden' -r +complete -c grok -n "__fish_grok_using_subcommand update" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand update" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand update" -l check -d 'Check for updates without installing' +complete -c grok -n "__fish_grok_using_subcommand update" -l json -d 'Emit machine-readable JSON output (for --check)' +complete -c grok -n "__fish_grok_using_subcommand update" -l force-reinstall -d 'Force re-download and install even if already up to date' +complete -c grok -n "__fish_grok_using_subcommand update" -l alpha -d 'Switch to the alpha release channel (faster updates, may have bugs)' +complete -c grok -n "__fish_grok_using_subcommand update" -l stable -d 'Switch to the stable release channel (default, weekly releases)' +complete -c grok -n "__fish_grok_using_subcommand update" -l enterprise -d 'Switch to the enterprise release channel' +complete -c grok -n "__fish_grok_using_subcommand update" -l auto -d 'Internal compat alias for `--trigger=auto_background` (older parents still spawn children with it)' +complete -c grok -n "__fish_grok_using_subcommand update" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand update" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand version" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand version" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand version" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand version" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand version" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand v" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand v" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand v" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand v" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand v" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand completions" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand completions" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand completions" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand completions" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "list" -d 'List tracked worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "ls" -d 'List tracked worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "show" -d 'Show details for a specific worktree' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "rm" -d 'Remove worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "gc" -d 'Garbage-collect orphaned/stale worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "db" -d 'Database maintenance' +complete -c grok -n "__fish_grok_using_subcommand worktree; and not __fish_seen_subcommand_from list ls show rm gc db help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l repo -r +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l type -r +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l json +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l all +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l repo -r +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l type -r +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l json +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l all +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from ls" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from show" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from show" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from show" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -s f -l force +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -l dry-run +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from rm" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -l max-age -r +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -l dry-run +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -s f -l force +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from gc" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -f -a "rebuild" -d 'Rebuild DB from filesystem scan' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -f -a "stats" -d 'Show DB statistics' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -f -a "path" -d 'Print DB file path' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from db" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "list" -d 'List tracked worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "show" -d 'Show details for a specific worktree' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "rm" -d 'Remove worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "gc" -d 'Garbage-collect orphaned/stale worktrees' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "db" -d 'Database maintenance' +complete -c grok -n "__fish_grok_using_subcommand worktree; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand du" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand du" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand du" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand du" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand du" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand disk-usage" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand disk-usage" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand disk-usage" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand disk-usage" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand disk-usage" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "start" -d 'Start (or update) the workspace→hub exposure' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "pause" -d 'Drain and disconnect from the hub, keeping the exposure warm' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "resume" -d 'Reconnect a paused exposure to the hub' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "stop" -d 'Stop exposing the workspace (the leader keeps running)' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "restart" -d 'Restart the exposure (stop, then start with the given options)' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "status" -d 'Show the current workspace-exposure status' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "list" -d 'Show the current workspace-exposure status' +complete -c grok -n "__fish_grok_using_subcommand workspace; and not __fish_seen_subcommand_from start pause resume stop restart status list help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l hub-url -d 'Computer Hub WebSocket URL (default: `[hub].url`, then the prod hub)' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l cwd -d 'Workspace root directory to expose. Defaults to the current directory' -r -f -a "(__fish_complete_directories)" +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l leader -d 'Force leader mode for this command, overriding config' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l no-leader -d 'Refuse to start even when config enables leader mode' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from start" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from pause" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from resume" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from stop" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l hub-url -d 'Computer Hub WebSocket URL (default: `[hub].url`, then the prod hub)' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l cwd -d 'Workspace root directory to expose. Defaults to the current directory' -r -f -a "(__fish_complete_directories)" +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l leader -d 'Force leader mode for this command, overriding config' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l no-leader -d 'Refuse to start even when config enables leader mode' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from restart" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -l pid -d 'Leader process ID from `grok leader list`' -r +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -l json -d 'Emit machine-readable JSON output' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "start" -d 'Start (or update) the workspace→hub exposure' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "pause" -d 'Drain and disconnect from the hub, keeping the exposure warm' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "resume" -d 'Reconnect a paused exposure to the hub' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "stop" -d 'Stop exposing the workspace (the leader keeps running)' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "restart" -d 'Restart the exposure (stop, then start with the given options)' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "status" -d 'Show the current workspace-exposure status' +complete -c grok -n "__fish_grok_using_subcommand workspace; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand dashboard" -l leader-socket -d 'Use a custom leader socket path instead of the default `~/.grok/leader.sock`' -r -F +complete -c grok -n "__fish_grok_using_subcommand dashboard" -l debug-file -d 'Write debug logs to FILE' -r -F +complete -c grok -n "__fish_grok_using_subcommand dashboard" -l debug -d 'Enable debug logging' +complete -c grok -n "__fish_grok_using_subcommand dashboard" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "agent" -d 'Run Grok without the interactive UI' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "inspect" -d 'Show the configuration Grok discovers for this directory' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "doctor" -d 'Check terminal, clipboard, color, and input support without starting Grok' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "leader" -d 'Manage running leader processes' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "logout" -d 'Sign out and clear cached credentials' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "login" -d 'Sign in to Grok' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "mcp" -d 'Manage MCP server configurations' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "plugin" -d 'Manage plugins and marketplace sources' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "memory" -d 'Manage cross-session memory' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "models" -d 'List available models and exit' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "sessions" -d 'List, search, or restore sessions' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "setup" -d 'Fetch and install managed configuration' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "share" -d 'Share a session and print the share URL' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "wrap" -d 'Run any command with local clipboard support (OSC 52 → system clipboard)' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "export" -d 'Export a session transcript as Markdown' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "trace" -d 'Export or upload session trace data' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "update" -d 'Check for updates or install a specific version' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "version" -d 'Print version information' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "completions" -d 'Generate shell completion scripts (bash, zsh, fish, powershell, ...)' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "worktree" -d 'Manage git worktrees' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "du" -d 'Show what the grok home (~/.grok) uses on disk' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "workspace" -d 'Expose this workspace to the Computer Hub (via the leader)' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "dashboard" -d 'Open the Agent Dashboard view at startup' +complete -c grok -n "__fish_grok_using_subcommand help; and not __fish_seen_subcommand_from agent inspect doctor leader logout login mcp plugin memory models sessions setup share wrap export trace update version completions worktree du workspace dashboard help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from agent" -f -a "stdio" -d 'Run the agent over stdio' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from agent" -f -a "headless" -d 'Run the agent headlessly over the Grok WebSocket relay' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from agent" -f -a "serve" -d 'Run the agent as a WebSocket server' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from agent" -f -a "leader" -d 'Run as the shared leader process for other clients' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from doctor" -f -a "fix" -d 'Apply an automatic fix' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from leader" -f -a "list" -d 'List running leader processes' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from leader" -f -a "info" -d 'Show details for a leader process' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from leader" -f -a "kill" -d 'Stop all running leader processes' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "list" -d 'List configured MCP servers' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "add" -d 'Add or update an MCP server' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "remove" -d 'Remove an MCP server' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "enable" -d 'Enable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "disable" -d 'Disable an MCP server' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from mcp" -f -a "doctor" -d 'Diagnose MCP server configuration and connectivity' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "list" -d 'List installed plugins' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "install" -d 'Install a plugin from a git URL or local path' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "uninstall" -d 'Uninstall an installed plugin by name' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "update" -d 'Update installed plugin(s)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "enable" -d 'Enable a disabled plugin' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "disable" -d 'Disable a plugin without uninstalling it' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "details" -d 'Show a plugin\'s component inventory' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "validate" -d 'Validate a plugin manifest' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "tag" -d 'Create a release git tag from the plugin\'s manifest version' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from plugin" -f -a "marketplace" -d 'Manage marketplace sources' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from memory" -f -a "clear" -d 'Clear memory files (workspace by default)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from sessions" -f -a "list" -d 'List recent sessions (same as search with no query)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from sessions" -f -a "search" -d 'Search sessions by keyword' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from sessions" -f -a "delete" -d 'Permanently delete a session from history' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from worktree" -f -a "list" -d 'List tracked worktrees' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from worktree" -f -a "show" -d 'Show details for a specific worktree' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from worktree" -f -a "rm" -d 'Remove worktrees' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from worktree" -f -a "gc" -d 'Garbage-collect orphaned/stale worktrees' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from worktree" -f -a "db" -d 'Database maintenance' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "start" -d 'Start (or update) the workspace→hub exposure' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "pause" -d 'Drain and disconnect from the hub, keeping the exposure warm' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "resume" -d 'Reconnect a paused exposure to the hub' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "stop" -d 'Stop exposing the workspace (the leader keeps running)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "restart" -d 'Restart the exposure (stop, then start with the given options)' +complete -c grok -n "__fish_grok_using_subcommand help; and __fish_seen_subcommand_from workspace" -f -a "status" -d 'Show the current workspace-exposure status' diff --git a/completions/mise.fish b/completions/mise.fish new file mode 100644 index 0000000..ff7fb5b --- /dev/null +++ b/completions/mise.fish @@ -0,0 +1 @@ +mise completion fish | source diff --git a/completions/nvm.fish b/completions/nvm.fish new file mode 100644 index 0000000..14be1b7 --- /dev/null +++ b/completions/nvm.fish @@ -0,0 +1,21 @@ +complete --command nvm --exclusive +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" +complete --command nvm --long silent --description "Suppress standard output" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/completions/omp.fish b/completions/omp.fish new file mode 100644 index 0000000..b89887a --- /dev/null +++ b/completions/omp.fish @@ -0,0 +1 @@ +omp completions fish | source diff --git a/completions/ostt.fish b/completions/ostt.fish new file mode 100644 index 0000000..1d9a56f --- /dev/null +++ b/completions/ostt.fish @@ -0,0 +1,425 @@ +# Print an optspec for argparse to handle cmd's options that are independent of any subcommand. +function __fish_ostt_global_optspecs + string join \n c/clipboard paste o/output= p/process= m/model= param= h/help V/version +end + +function __fish_ostt_needs_command + # Figure out if the current invocation already has a command. + set -l cmd (commandline -opc) + set -e cmd[1] + argparse -s (__fish_ostt_global_optspecs) -- $cmd 2>/dev/null + or return + if set -q argv[1] + # Also print the command, so this can be used to figure out what it is. + echo $argv[1] + return 1 + end + return 0 +end + +function __fish_ostt_using_subcommand + set -l cmd (__fish_ostt_needs_command) + test -z "$cmd" + and return 1 + contains -- $cmd[1] $argv +end + +complete -c ostt -n "__fish_ostt_needs_command" -s o -l output -d 'Write transcription to file instead of stdout (record default command)' -r +complete -c ostt -n "__fish_ostt_needs_command" -s p -l process -d 'Enable processing after transcription' -r +complete -c ostt -n "__fish_ostt_needs_command" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_needs_command" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_needs_command" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout (record default command)' +complete -c ostt -n "__fish_ostt_needs_command" -l paste -d 'Paste transcription into the focused app (record default command)' +complete -c ostt -n "__fish_ostt_needs_command" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_needs_command" -s V -l version -d 'Print version' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "record" -d 'Record audio with real-time visualization (default)' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "r" -d 'Record audio with real-time visualization (default)' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "retry" -d 'Retry transcription of a previous recording' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "transcribe" -d 'Transcribe a pre-recorded audio file' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "t" -d 'Transcribe a pre-recorded audio file' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "replay" -d 'Replay a previous recording using system audio player' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "rp" -d 'Replay a previous recording using system audio player' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "auth" -d 'Manage cloud provider credentials' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "a" -d 'Manage cloud provider credentials' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "model" -d 'Choose and manage cloud or local transcription models' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "history" -d 'View and browse transcription history' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "h" -d 'View and browse transcription history' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "keyword" -d 'Manage keywords for improved transcription accuracy' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "k" -d 'Manage keywords for improved transcription accuracy' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "replace" -d 'Manage deterministic text replace rules' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "config" -d 'Open configuration file in your preferred editor' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "c" -d 'Open configuration file in your preferred editor' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "logs" -d 'Show recent log entries from the application' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "process" -d 'Post-process a transcription from history' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "p" -d 'Post-process a transcription from history' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "launch" -d 'Launch ostt in a popup terminal window' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "l" -d 'Launch ostt in a popup terminal window' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "completions" -d 'Generate shell completion script' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "daemon" -d 'Manage the local model daemon' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "d" -d 'Manage the local model daemon' +complete -c ostt -n "__fish_ostt_needs_command" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand record" -s o -l output -d 'Write transcription to file instead of stdout' -r +complete -c ostt -n "__fish_ostt_using_subcommand record" -s p -l process -d 'Enable processing after transcription. Optionally specify action ID to skip picker' -r +complete -c ostt -n "__fish_ostt_using_subcommand record" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_using_subcommand record" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand record" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout' +complete -c ostt -n "__fish_ostt_using_subcommand record" -l paste -d 'Paste transcription into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand record" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand r" -s o -l output -d 'Write transcription to file instead of stdout' -r +complete -c ostt -n "__fish_ostt_using_subcommand r" -s p -l process -d 'Enable processing after transcription. Optionally specify action ID to skip picker' -r +complete -c ostt -n "__fish_ostt_using_subcommand r" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_using_subcommand r" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand r" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout' +complete -c ostt -n "__fish_ostt_using_subcommand r" -l paste -d 'Paste transcription into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand r" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand retry" -s o -l output -d 'Write transcription to file instead of stdout' -r +complete -c ostt -n "__fish_ostt_using_subcommand retry" -s p -l process -d 'Enable processing after transcription. Optionally specify action ID to skip picker' -r +complete -c ostt -n "__fish_ostt_using_subcommand retry" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_using_subcommand retry" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand retry" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout' +complete -c ostt -n "__fish_ostt_using_subcommand retry" -l paste -d 'Paste transcription into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand retry" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -s o -l output -d 'Write transcription to file instead of stdout' -r +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -s p -l process -d 'Enable processing after transcription. Optionally specify action ID to skip picker' -r +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout' +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -l paste -d 'Paste transcription into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand transcribe" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand t" -s o -l output -d 'Write transcription to file instead of stdout' -r +complete -c ostt -n "__fish_ostt_using_subcommand t" -s p -l process -d 'Enable processing after transcription. Optionally specify action ID to skip picker' -r +complete -c ostt -n "__fish_ostt_using_subcommand t" -s m -l model -d 'Override transcription model for this run' -r +complete -c ostt -n "__fish_ostt_using_subcommand t" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand t" -s c -l clipboard -d 'Copy transcription to clipboard instead of stdout' +complete -c ostt -n "__fish_ostt_using_subcommand t" -l paste -d 'Paste transcription into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand t" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand replay" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand replay" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand rp" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand rp" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -f -a "login" -d 'Add or update a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -f -a "logout" -d 'Remove a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -f -a "list" -d 'List authenticated providers' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -f -a "status" -d 'Show authentication status' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and not __fish_seen_subcommand_from login logout list status help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from login" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from login" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from logout" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from logout" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from status" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from help" -f -a "login" -d 'Add or update a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from help" -f -a "logout" -d 'Remove a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from help" -f -a "list" -d 'List authenticated providers' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from help" -f -a "status" -d 'Show authentication status' +complete -c ostt -n "__fish_ostt_using_subcommand auth; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -f -a "login" -d 'Add or update a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -f -a "logout" -d 'Remove a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -f -a "list" -d 'List authenticated providers' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -f -a "status" -d 'Show authentication status' +complete -c ostt -n "__fish_ostt_using_subcommand a; and not __fish_seen_subcommand_from login logout list status help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from login" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from login" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from logout" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from logout" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from status" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from help" -f -a "login" -d 'Add or update a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from help" -f -a "logout" -d 'Remove a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from help" -f -a "list" -d 'List authenticated providers' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from help" -f -a "status" -d 'Show authentication status' +complete -c ostt -n "__fish_ostt_using_subcommand a; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "list" -d 'List available transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "current" -d 'Show the currently selected transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "params" -d 'List supported transcription params for a transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "select" -d 'Select the active transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "local" -d 'Manage local transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand model; and not __fish_seen_subcommand_from list current params select local help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from list" -l provider -d 'Filter by provider ID' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from list" -l installed -d 'Show only downloaded local models' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from current" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from current" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from params" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from params" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from params" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from select" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from select" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from local" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from local" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from local" -f -a "download" -d 'Download a local model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from local" -f -a "remove" -d 'Remove a downloaded local model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from local" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "list" -d 'List available transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "current" -d 'Show the currently selected transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "params" -d 'List supported transcription params for a transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "select" -d 'Select the active transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "local" -d 'Manage local transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand model; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -f -a "list" -d 'List transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -f -a "show" -d 'Show a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -f -a "copy" -d 'Copy a transcription from history to clipboard' +complete -c ostt -n "__fish_ostt_using_subcommand history; and not __fish_seen_subcommand_from list show copy help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from list" -l limit -d 'Limit to N most recent entries' -r +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from show" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from copy" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from copy" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "list" -d 'List transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "show" -d 'Show a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "copy" -d 'Copy a transcription from history to clipboard' +complete -c ostt -n "__fish_ostt_using_subcommand history; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -f -a "list" -d 'List transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -f -a "show" -d 'Show a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -f -a "copy" -d 'Copy a transcription from history to clipboard' +complete -c ostt -n "__fish_ostt_using_subcommand h; and not __fish_seen_subcommand_from list show copy help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from list" -l limit -d 'Limit to N most recent entries' -r +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from show" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from show" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from copy" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from copy" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from help" -f -a "list" -d 'List transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from help" -f -a "show" -d 'Show a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from help" -f -a "copy" -d 'Copy a transcription from history to clipboard' +complete -c ostt -n "__fish_ostt_using_subcommand h; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -f -a "list" -d 'List transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -f -a "add" -d 'Add transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -f -a "remove" -d 'Remove transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and not __fish_seen_subcommand_from list add remove help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from add" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from add" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from remove" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from remove" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from help" -f -a "list" -d 'List transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from help" -f -a "add" -d 'Add transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from help" -f -a "remove" -d 'Remove transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand keyword; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -f -a "list" -d 'List transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -f -a "add" -d 'Add transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -f -a "remove" -d 'Remove transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and not __fish_seen_subcommand_from list add remove help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from list" -l format -d 'Output format' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from list" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from add" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from add" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from remove" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from remove" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from help" -f -a "list" -d 'List transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from help" -f -a "add" -d 'Add transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from help" -f -a "remove" -d 'Remove transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand k; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand replace" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand replace" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand config; and not __fish_seen_subcommand_from path list-devices help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand config; and not __fish_seen_subcommand_from path list-devices help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand config; and not __fish_seen_subcommand_from path list-devices help" -f -a "path" -d 'Print the config file path' +complete -c ostt -n "__fish_ostt_using_subcommand config; and not __fish_seen_subcommand_from path list-devices help" -f -a "list-devices" -d 'List audio input devices for config selection' +complete -c ostt -n "__fish_ostt_using_subcommand config; and not __fish_seen_subcommand_from path list-devices help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from path" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from path" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from list-devices" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from list-devices" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "path" -d 'Print the config file path' +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "list-devices" -d 'List audio input devices for config selection' +complete -c ostt -n "__fish_ostt_using_subcommand config; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand c; and not __fish_seen_subcommand_from path list-devices help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand c; and not __fish_seen_subcommand_from path list-devices help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand c; and not __fish_seen_subcommand_from path list-devices help" -f -a "path" -d 'Print the config file path' +complete -c ostt -n "__fish_ostt_using_subcommand c; and not __fish_seen_subcommand_from path list-devices help" -f -a "list-devices" -d 'List audio input devices for config selection' +complete -c ostt -n "__fish_ostt_using_subcommand c; and not __fish_seen_subcommand_from path list-devices help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from path" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from path" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from list-devices" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from list-devices" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from help" -f -a "path" -d 'Print the config file path' +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from help" -f -a "list-devices" -d 'List audio input devices for config selection' +complete -c ostt -n "__fish_ostt_using_subcommand c; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and not __fish_seen_subcommand_from follow path help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand logs; and not __fish_seen_subcommand_from follow path help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and not __fish_seen_subcommand_from follow path help" -f -a "follow" -d 'Follow the latest log file' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and not __fish_seen_subcommand_from follow path help" -f -a "path" -d 'Print the latest log file path' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and not __fish_seen_subcommand_from follow path help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from follow" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from follow" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from path" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from path" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from help" -f -a "follow" -d 'Follow the latest log file' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from help" -f -a "path" -d 'Print the latest log file path' +complete -c ostt -n "__fish_ostt_using_subcommand logs; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand process" -s o -l output -d 'Write result to file instead of stdout (shadows global -o)' -r +complete -c ostt -n "__fish_ostt_using_subcommand process" -l format -d 'Output format for `ostt process list`' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand process" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand process" -s c -l clipboard -d 'Copy result to clipboard instead of stdout (shadows global -c)' +complete -c ostt -n "__fish_ostt_using_subcommand process" -l paste -d 'Paste result into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand process" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand p" -s o -l output -d 'Write result to file instead of stdout (shadows global -o)' -r +complete -c ostt -n "__fish_ostt_using_subcommand p" -l format -d 'Output format for `ostt process list`' -r -f -a "table\t'' +json\t''" +complete -c ostt -n "__fish_ostt_using_subcommand p" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand p" -s c -l clipboard -d 'Copy result to clipboard instead of stdout (shadows global -c)' +complete -c ostt -n "__fish_ostt_using_subcommand p" -l paste -d 'Paste result into the focused app' +complete -c ostt -n "__fish_ostt_using_subcommand p" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand launch" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand launch" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand l" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand l" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and not __fish_seen_subcommand_from install help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand completions; and not __fish_seen_subcommand_from install help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and not __fish_seen_subcommand_from install help" -a "install" -d 'Install completions to the standard system directory' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and not __fish_seen_subcommand_from install help" -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and __fish_seen_subcommand_from install" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand completions; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and __fish_seen_subcommand_from help" -f -a "install" -d 'Install completions to the standard system directory' +complete -c ostt -n "__fish_ostt_using_subcommand completions; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "start" -d 'Start the daemon for the active local model' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "stop" -d 'Stop the running daemon' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "restart" -d 'Restart the daemon with the currently active local model' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "status" -d 'Show daemon status (running, model, PID, service)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "install" -d 'Install daemon as a login service (auto-start on login)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "uninstall" -d 'Remove the daemon login service' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "run" -d '[Internal] Run the daemon process — used by the service manager and daemon start' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from start" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from start" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from stop" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from stop" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from restart" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from restart" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from status" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from install" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from uninstall" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from run" -l model-id -d 'Model ID to load (defaults to the currently active local model)' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from run" -l idle-timeout-secs -d 'Exit after this many seconds of inactivity (omit for no timeout)' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from run" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "start" -d 'Start the daemon for the active local model' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "stop" -d 'Stop the running daemon' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "restart" -d 'Restart the daemon with the currently active local model' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "status" -d 'Show daemon status (running, model, PID, service)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "install" -d 'Install daemon as a login service (auto-start on login)' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Remove the daemon login service' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "run" -d '[Internal] Run the daemon process — used by the service manager and daemon start' +complete -c ostt -n "__fish_ostt_using_subcommand daemon; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -s h -l help -d 'Print help (see more with \'--help\')' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "start" -d 'Start the daemon for the active local model' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "stop" -d 'Stop the running daemon' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "restart" -d 'Restart the daemon with the currently active local model' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "status" -d 'Show daemon status (running, model, PID, service)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "install" -d 'Install daemon as a login service (auto-start on login)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "uninstall" -d 'Remove the daemon login service' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "run" -d '[Internal] Run the daemon process — used by the service manager and daemon start' +complete -c ostt -n "__fish_ostt_using_subcommand d; and not __fish_seen_subcommand_from start stop restart status install uninstall run help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from start" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from start" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from stop" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from stop" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from restart" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from restart" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from status" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from status" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from install" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from uninstall" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from run" -l model-id -d 'Model ID to load (defaults to the currently active local model)' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from run" -l idle-timeout-secs -d 'Exit after this many seconds of inactivity (omit for no timeout)' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from run" -l param -d 'Override a transcription param for this run, as key=value' -r +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from run" -s h -l help -d 'Print help' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "start" -d 'Start the daemon for the active local model' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "stop" -d 'Stop the running daemon' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "restart" -d 'Restart the daemon with the currently active local model' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "status" -d 'Show daemon status (running, model, PID, service)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "install" -d 'Install daemon as a login service (auto-start on login)' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Remove the daemon login service' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "run" -d '[Internal] Run the daemon process — used by the service manager and daemon start' +complete -c ostt -n "__fish_ostt_using_subcommand d; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "record" -d 'Record audio with real-time visualization (default)' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "retry" -d 'Retry transcription of a previous recording' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "transcribe" -d 'Transcribe a pre-recorded audio file' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "replay" -d 'Replay a previous recording using system audio player' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "auth" -d 'Manage cloud provider credentials' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "model" -d 'Choose and manage cloud or local transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "history" -d 'View and browse transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "keyword" -d 'Manage keywords for improved transcription accuracy' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "replace" -d 'Manage deterministic text replace rules' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "config" -d 'Open configuration file in your preferred editor' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "logs" -d 'Show recent log entries from the application' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "process" -d 'Post-process a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "launch" -d 'Launch ostt in a popup terminal window' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "completions" -d 'Generate shell completion script' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "daemon" -d 'Manage the local model daemon' +complete -c ostt -n "__fish_ostt_using_subcommand help; and not __fish_seen_subcommand_from record retry transcribe replay auth model history keyword replace config logs process launch completions daemon help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from auth" -f -a "login" -d 'Add or update a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from auth" -f -a "logout" -d 'Remove a cloud provider credential' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from auth" -f -a "list" -d 'List authenticated providers' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from auth" -f -a "status" -d 'Show authentication status' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from model" -f -a "list" -d 'List available transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from model" -f -a "current" -d 'Show the currently selected transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from model" -f -a "params" -d 'List supported transcription params for a transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from model" -f -a "select" -d 'Select the active transcription model' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from model" -f -a "local" -d 'Manage local transcription models' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "list" -d 'List transcription history' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "show" -d 'Show a transcription from history' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from history" -f -a "copy" -d 'Copy a transcription from history to clipboard' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from keyword" -f -a "list" -d 'List transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from keyword" -f -a "add" -d 'Add transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from keyword" -f -a "remove" -d 'Remove transcription keywords' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "path" -d 'Print the config file path' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from config" -f -a "list-devices" -d 'List audio input devices for config selection' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from logs" -f -a "follow" -d 'Follow the latest log file' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from logs" -f -a "path" -d 'Print the latest log file path' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from completions" -f -a "install" -d 'Install completions to the standard system directory' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "start" -d 'Start the daemon for the active local model' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "stop" -d 'Stop the running daemon' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "restart" -d 'Restart the daemon with the currently active local model' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "status" -d 'Show daemon status (running, model, PID, service)' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "install" -d 'Install daemon as a login service (auto-start on login)' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "uninstall" -d 'Remove the daemon login service' +complete -c ostt -n "__fish_ostt_using_subcommand help; and __fish_seen_subcommand_from daemon" -f -a "run" -d '[Internal] Run the daemon process — used by the service manager and daemon start' diff --git a/conf.d/00-path.fish b/conf.d/00-path.fish new file mode 100644 index 0000000..1540202 --- /dev/null +++ b/conf.d/00-path.fish @@ -0,0 +1,18 @@ +# PATH — runs for every shell (scripts need these too). +# ~/.local/bin and ~/.cargo/bin are handled by inir-path.fish / rustup.fish. +fish_add_path $HOME/.bun/bin +fish_add_path $HOME/.local/share/go/bin +fish_add_path $HOME/.maestro/bin +fish_add_path $HOME/.grok/bin +fish_add_path $HOME/.opencode/bin +fish_add_path -a $HOME/.foundry/bin + +# Android SDK (relocated under ~/.local/share/android) +fish_add_path -a $HOME/.local/share/android/platform-tools +fish_add_path -a $HOME/.local/share/android/cmdline-tools/latest/bin +fish_add_path -a $HOME/.local/share/android/emulator +fish_add_path -a $HOME/local/share/pnpm + +# pnpm +set -gx PNPM_HOME $HOME/.local/share/pnpm +fish_add_path $PNPM_HOME/bin diff --git a/conf.d/10-env.fish b/conf.d/10-env.fish new file mode 100644 index 0000000..080e920 --- /dev/null +++ b/conf.d/10-env.fish @@ -0,0 +1,69 @@ +# Environment — non-secret. Secrets live in conf.d/secrets.fish (gitignored). +set -g fish_greeting + +# Bottom-pinned prompt toggle (config.fish + functions/clear.fish). +# 1 = pin prompt to the bottom of the terminal, 0 = default top prompt. +# Respects an inherited value, so `FISH_BOTTOM_PROMPT=0 fish` opts out. +set -q FISH_BOTTOM_PROMPT; or set -gx FISH_BOTTOM_PROMPT 0 + +# GPU (ROCm / HIP) — used by ML scripts, so set unconditionally. +set -gx HSA_OVERRIDE_GFX_VERSION 11.5.0 +set -gx ROCR_VISIBLE_DEVICES 0 +set -gx HIP_VISIBLE_DEVICES 0 + +set -gx EGET_BIN $HOME/.local/bin + +# Repo roots (ghq) +set -gx GHQ_ROOT $HOME/Code +set -gx CODE_ROOT $HOME/Code + +set -gx EDITOR nvim +set -gx VISUAL nvim + +# Go env (GOPATH/GOBIN) is pinned in ~/.config/mise/config.toml [env] because +# mise's fish hook re-applies env each prompt and would clobber a shell-set +# GOBIN. GOROOT is provided by mise (toolchain under ~/.local/share/mise). + +# Android SDK — relocated under ~/.local/share/android. +set -gx ANDROID_HOME $HOME/.local/share/android +set -gx ANDROID_SDK_ROOT $ANDROID_HOME + +# Git hosts (non-secret; tokens are in secrets.fish) +set -gx GITEA_LOGIN prad.codes +set -gx GITLAB_HOST git.sonr.org + +# GITHUB_TOKEN from gh's keyring login — never stored on disk. An inherited +# value wins, so nested shells skip the gh call. +if not set -q GITHUB_TOKEN; and command -q gh + set -l _gh_token (gh auth token 2>/dev/null) + test -n "$_gh_token"; and set -gx GITHUB_TOKEN $_gh_token +end + +set -gx EDITOR nvim +set -gx VISUAL nvim + +test -x /usr/bin/brave-origin; and set -gx BROWSER /usr/bin/brave-origin +test -x /usr/bin/chromium; and set -gx CHROME_EXECUTABLE /usr/bin/chromium +# Puppeteer / CDP tools — chrome-headless-shell via @puppeteer/browsers, +# symlinked from ~/.config/chrome-headless-shell// into ~/.local/bin. +# NOTE: omp's browser tool prefers detected system Chrome over this env var; +# ~/.local/bin/google-chrome-stable shims its first detection candidate to the +# same binary (and masks the broken /usr/bin/google-chrome wrapper). +set -gx PUPPETEER_EXECUTABLE_PATH $HOME/.local/bin/chrome-headless-shell +set -gx ZEAL_DOCSETS $HOME/.var/app/org.zealdocs.Zeal/data/Zeal/Zeal/docsets +set -gx SHARP_IGNORE_GLOBAL_LIBVIPS 1 + +set -gx FZF_DEFAULT_OPTS " + --height=~40% + --layout=default + --info=inline-right + --border=rounded + --prompt=' ' + --pointer='▶' + --marker='✓' + --color=fg:#ffffff,fg+:#ffffff,bg:-1,bg+:#3c4048 + --color=hl:#5ef1ff,hl+:#5ef1ff + --color=info:#7b8496,header:#7b8496,border:#7b8496 + --color=prompt:#5ef1ff,pointer:#ffaecf,marker:#5eff6c,spinner:#f1ff5e + --color=gutter:-1,query:#ffffff +" diff --git a/conf.d/20-aliases.fish b/conf.d/20-aliases.fish new file mode 100644 index 0000000..632494d --- /dev/null +++ b/conf.d/20-aliases.fish @@ -0,0 +1,78 @@ +# Aliases — generated from .chezmoidata/aliases.yaml (shared with bash/zsh +# via ~/.config/shell/aliases.sh). Add shell-agnostic aliases in the YAML; +# fish-only bits live below the generated block. + +# Editors / file managers +alias e nvim +alias vim nvim +alias e.f 'cd ~/.local/share/chezmoi/dot_config/fish && yazi' +alias e.h 'cd ~/.local/share/chezmoi/dot_config/hypr && yazi' +alias e.k 'yazi ~/.local/share/chezmoi/dot_config/kitty' +alias e.n 'yazi ~/.local/share/chezmoi/dot_config/niri' +alias e.y 'yazi ~/.config/yazi' +alias e.t 'nvim ~/.config/tmux/tmux.conf' +alias e.v 'yazi ~/.config/nvim/lua' + +# Bun +alias br 'bun run' +alias br.d 'bun run dev' +alias br.b 'bun run build' +alias br.t 'bun run test' +alias bi 'bun install' +alias bg 'bun install -g' +alias bx 'bunx' + +# Quick directory jumps +alias cdc 'cd ~/.config && yazi' +alias ,, 'cd ~/.local/share/chezmoi && yazi' +alias cdk 'cd ~/Documents/Knowledge && obsidian' +alias cdl 'cd ~/.local && yazi' +alias cds 'cd ~/.local/share/services && ls' +alias cdw 'cd ~/Downloads && yazi' + +# Tools +alias hx helix +alias dd lazydocker +alias gg lazygit +alias ff 'exec fish' +alias npx bunx +alias sm 'sudo micro' +alias sd 'ssh prad@192.168.1.68' +alias oc opencode +alias dss 'dotstate sync' +alias fabric fabric-ai +alias bk bead-kanban +alias sua 'shelly upgrade-all -n' +alias lc leetcode +alias tk task +alias .. 'cd ..' + +# Clipboard +if command -v wl-copy >/dev/null 2>&1 + alias cpy wl-copy + alias pst wl-paste +else if command -v pbcopy >/dev/null 2>&1 + alias cpy pbcopy + alias pst pbpaste +end + +# q exits the shell; if this shell was spawned from yazi's own `q` bind +# (`shell "$SHELL" --block`), also tell that yazi to quit so exiting +# doesn't bounce back into the file manager. +function q --description 'exit (and quit parent yazi)' + if set -q YAZI_ID; and command -q ya + ya emit quit 2>/dev/null + end + exit +end + +# Interactive-only: don't override `ls` for scripts. +if status is-interactive + # `clear` is functions/clear.fish (kitty scrollback + bottom-pinned + # prompt) — don't alias it here, an alias would shadow the autoload. + alias celar clear + alias claer clear + if command -v eza >/dev/null 2>&1 + alias ls 'eza --icons' + end +end diff --git a/conf.d/30-ssh-agent.fish b/conf.d/30-ssh-agent.fish new file mode 100644 index 0000000..2d9a843 --- /dev/null +++ b/conf.d/30-ssh-agent.fish @@ -0,0 +1,13 @@ +# Start or reuse a single ssh-agent shared across shells. +# Respects an externally provided SSH_AUTH_SOCK (systemd unit, forwarding, keyring). +if status is-interactive; and not set -q SSH_AUTH_SOCK + set -l env_file $HOME/.ssh/agent.env.fish + test -r $env_file; and source $env_file + + # ssh-add exit 2 = no agent reachable (0/1 = agent alive) + ssh-add -l >/dev/null 2>&1 + if test $status -eq 2 + ssh-agent -c | string replace -r '^setenv (\S+) (\S+);$' 'set -gx $1 $2' | string match -rv '^echo ' >$env_file + source $env_file + end +end diff --git a/conf.d/40-tools.fish b/conf.d/40-tools.fish new file mode 100644 index 0000000..75f869d --- /dev/null +++ b/conf.d/40-tools.fish @@ -0,0 +1,28 @@ +# Tool initialization. +# mise provides tool shims, so activate it for every shell (scripts included). +mise activate fish | source + +# Everything below spawns subprocesses or only matters for a prompt — +# skip it for non-interactive shells to keep scripts fast. +status is-interactive; or return + +# Material You terminal colors generated from the wallpaper (quickshell). +if test -f ~/.local/state/quickshell/user/generated/terminal/sequences.txt + cat ~/.local/state/quickshell/user/generated/terminal/sequences.txt +end + +command -v tv >/dev/null 2>&1; and tv init fish | source +command -v starship >/dev/null 2>&1; and starship init fish | source +command -v zoxide >/dev/null 2>&1; and zoxide init fish | source +command -v entire >/dev/null 2>&1; and entire completion fish | source +# television fuzzy finder — sourced BEFORE hishtory so hishtory keeps +# ctrl-r; tv's default binds are curated in fish_user_key_bindings. +command -v tv >/dev/null 2>&1; and tv init fish | source + +# hishtory shell history +test -f ~/.hishtory/config.fish; and source ~/.hishtory/config.fish + +# unsloth studio python venv +test -f ~/.unsloth/studio/unsloth_studio/bin/activate.fish + and source ~/.unsloth/studio/unsloth_studio/bin/activate.fish + diff --git a/conf.d/50-terminal-title.fish b/conf.d/50-terminal-title.fish new file mode 100644 index 0000000..176a0fb --- /dev/null +++ b/conf.d/50-terminal-title.fish @@ -0,0 +1,8 @@ +# Set the tmux/screen window name from $PWD (the ESC-k sequence). +# fish_title() handles the regular terminal title; this targets multiplexers. +status is-interactive; or return + +function terminal_title --on-variable PWD + printf '\033k%s\033\\' (prompt_pwd) +end +terminal_title diff --git a/conf.d/inir-env.fish b/conf.d/inir-env.fish new file mode 100644 index 0000000..e5d2ba6 --- /dev/null +++ b/conf.d/inir-env.fish @@ -0,0 +1,3 @@ +# iNiR environment — auto-generated by setup install +set -gx INIR_VENV "/home/prad/.local/state/quickshell/.venv" +set -gx ILLOGICAL_IMPULSE_VIRTUAL_ENV "$INIR_VENV" diff --git a/conf.d/inir-path.fish b/conf.d/inir-path.fish new file mode 100644 index 0000000..0e437f9 --- /dev/null +++ b/conf.d/inir-path.fish @@ -0,0 +1,3 @@ +if not contains -- "/home/prad/.local/bin" $PATH + set -gx PATH "/home/prad/.local/bin" $PATH +end diff --git a/conf.d/nvm.fish b/conf.d/nvm.fish new file mode 100644 index 0000000..7545699 --- /dev/null +++ b/conf.d/nvm.fish @@ -0,0 +1,28 @@ +set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share +set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist +set --query nvm_data || set --global nvm_data $XDG_DATA_HOME/nvm + +function _nvm_install --on-event nvm_install + test ! -d $nvm_data && command mkdir -p $nvm_data + echo "Downloading the Node distribution index..." 2>/dev/null + _nvm_index_update +end + +function _nvm_update --on-event nvm_update + set --query --universal nvm_data && set --erase --universal nvm_data + set --query --universal nvm_mirror && set --erase --universal nvm_mirror + set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist +end + +function _nvm_uninstall --on-event nvm_uninstall + command rm -rf $nvm_data + + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + + set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source + functions --erase (functions --all | string match --entire --regex -- "^_nvm_") +end + +if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version + nvm use --silent $nvm_default_version +end diff --git a/conf.d/opencode-background-subagents.fish b/conf.d/opencode-background-subagents.fish new file mode 100644 index 0000000..348257d --- /dev/null +++ b/conf.d/opencode-background-subagents.fish @@ -0,0 +1,4 @@ +# >>> oh-my-opencode-slim background subagents >>> +set -gx OPENCODE_EXPERIMENTAL_BACKGROUND_SUBAGENTS true +set -gx OPENCODE_ENABLE_EXA 1 +# <<< oh-my-opencode-slim background subagents <<< diff --git a/conf.d/pnpm-filter.fish b/conf.d/pnpm-filter.fish new file mode 100644 index 0000000..210ada4 --- /dev/null +++ b/conf.d/pnpm-filter.fish @@ -0,0 +1,42 @@ +# ~/.config/fish/conf.d/pnpm-filter.fish + +# Shared helper: pick a workspace package name via gum filter +function __pnpm_pick_pkg + pnpm m ls --depth -1 --json 2>/dev/null \ + | jq -r '.[] | select(.name != null) | .name' \ + | gum filter --placeholder "Select package…" --height 12 +end + +# pnpmf: add deps to a selected package +# usage: pnpmf viem zod +function pnpmf -d "pnpm add to a workspace package (gum filter)" + set -l pkg (__pnpm_pick_pkg); or return + gum spin --title "Adding $argv → $pkg" -- pnpm --filter $pkg add $argv +end + +# pnpmfd: add devDependencies +function pnpmfd -d "pnpm add -D to a workspace package" + set -l pkg (__pnpm_pick_pkg); or return + gum spin --title "Adding (dev) $argv → $pkg" -- pnpm --filter $pkg add -D $argv +end + +# pnpmfr: remove deps +function pnpmfr -d "pnpm remove from a workspace package" + set -l pkg (__pnpm_pick_pkg); or return + pnpm --filter $pkg remove $argv +end + +# pnpmfw: link a sibling workspace package (workspace:^) +function pnpmfw -d "pnpm add --workspace sibling package" + set -l pkg (__pnpm_pick_pkg); or return + set -l dep (__pnpm_pick_pkg); or return + pnpm --filter $pkg add $dep --workspace +end + +# pnpmfx: run a script in a selected package, script also picked via gum +function pnpmfx -d "pnpm run script in a workspace package" + set -l pkg (__pnpm_pick_pkg); or return + set -l dir (pnpm m ls --depth -1 --json | jq -r ".[] | select(.name == \"$pkg\") | .path") + set -l script (jq -r '.scripts | keys[]' $dir/package.json | gum filter --placeholder "Script…"); or return + pnpm --filter $pkg run $script +end diff --git a/conf.d/rustup.fish b/conf.d/rustup.fish new file mode 100644 index 0000000..e4cb363 --- /dev/null +++ b/conf.d/rustup.fish @@ -0,0 +1 @@ +source "$HOME/.cargo/env.fish" diff --git a/conf.d/uv.env.fish b/conf.d/uv.env.fish new file mode 100644 index 0000000..d97734b --- /dev/null +++ b/conf.d/uv.env.fish @@ -0,0 +1,2 @@ + +source "$HOME/.local/share/../bin/env.fish" diff --git a/config.fish b/config.fish new file mode 100644 index 0000000..f29ae8f --- /dev/null +++ b/config.fish @@ -0,0 +1,104 @@ +# Config is split into autoloaded files (see `man fish` → Configuration files): +# conf.d/00-path.fish PATH entries +# conf.d/10-env.fish environment + fish_greeting + fzf theme +# conf.d/20-aliases.fish aliases +# conf.d/40-tools.fish starship / zoxide / mise / hishtory init +# conf.d/50-terminal-title.fish tmux window title +# conf.d/secrets.fish API keys (gitignored) +# functions/ one autoloaded function per file +# functions/fish_user_key_bindings.fish key bindings +# +# Nothing needs to live here; keep it empty so startup stays fast. + +function starship_transient_prompt_func + starship module character +end + +function starship_transient_rprompt_func + starship module time +end + +starship init fish | source +enable_transience + +# Pin the prompt to the bottom of the terminal (FISH_BOTTOM_PROMPT=1, the +# default from conf.d/10-env.fish; set 0 for the normal top prompt). +# functions/clear.fish and the ctrl-l binding re-pin it after clearing. +status is-interactive; and test "$FISH_BOTTOM_PROMPT" = 1; and tput cup $LINES 0 + +# >>> grok installer >>> +fish_add_path $HOME/.grok/bin +# <<< grok installer <<< + +# Generated for envman. Do not edit. +test -s ~/.config/envman/load.fish; and source ~/.config/envman/load.fish + +if status is-interactive + atuin init fish | source + # atuin 18.21 dropped `atuin ai init`; the `?` binding it used to emit is + # copied below as _atuin_ai_question_mark. +end + +# cmux +fish_add_path "/home/prad/.cmux/bin" +fish_add_path "/home/prad/.cache/.bun/bin" + +for _f in $HOME/.config/herdr/plugins/github/herdr-automatic-rename-*/shell/hook.fish + test -r "$_f"; and source "$_f"; and break +end + + +# Question mark at start of line - natural language mode +function _atuin_ai_question_mark + set -l buf (commandline -b) + + # If buffer is empty or just contains '?', trigger natural language mode + if test -z "$buf" -o "$buf" = "?" + commandline -r "" + + # Close the semantic prompt zone (OSC 133 C) so terminals with + # shell integration don't erase the TUI's output during their + # resize-time prompt reflow. + printf '\033]133;C\007' > /dev/tty + + # Run atuin ai inline, swapping stdout and stderr + set -l output (atuin ai inline --hook 3>&1 1>&2 2>&3 | string collect) + + if string match --quiet '__atuin_ai_print__:*' "$output" + echo (string replace "__atuin_ai_print__:" "" -- "$output" | string collect) + commandline -f repaint + else if test "$output" = "__atuin_ai_cancel__" + commandline -f repaint + else if string match --quiet '__atuin_ai_execute__:*' "$output" + # Execute the command immediately + set -l cmd (string replace "__atuin_ai_execute__:" "" -- "$output" | string collect) + commandline -r "$cmd" + commandline -f repaint + commandline -f execute + else if string match --quiet '__atuin_ai_insert__:*' "$output" + # Insert the command for editing + set -l cmd (string replace "__atuin_ai_insert__:" "" -- "$output" | string collect) + commandline -r "$cmd" + commandline -f repaint + else if test -n "$output" + # Default: insert for editing + commandline -r "$output" + commandline -f repaint + else + commandline -f repaint + end + else if not contains -- "$fish_key_bindings" fish_vi_key_bindings fish_hybrid_key_bindings + # Not at empty prompt, just insert the question mark + commandline -i "?" + end +end + +# Set up keybindings +bind "?" _atuin_ai_question_mark + +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)" + +# Added by LM Studio CLI (lms) +set -gx PATH $PATH /home/prad/.lmstudio/bin +# End of LM Studio CLI section + diff --git a/config.fish.bak.1783797282 b/config.fish.bak.1783797282 new file mode 100644 index 0000000..92cdbcd --- /dev/null +++ b/config.fish.bak.1783797282 @@ -0,0 +1,27 @@ +# Config is split into autoloaded files (see `man fish` → Configuration files): +# conf.d/00-path.fish PATH entries +# conf.d/10-env.fish environment + fish_greeting + fzf theme +# conf.d/20-aliases.fish aliases +# conf.d/40-tools.fish starship / zoxide / mise / hishtory init +# conf.d/50-terminal-title.fish tmux window title +# conf.d/secrets.fish API keys (gitignored) +# functions/ one autoloaded function per file +# functions/fish_user_key_bindings.fish key bindings +# +# Nothing needs to live here; keep it empty so startup stays fast. + +function starship_transient_prompt_func + starship module character +end + +function starship_transient_rprompt_func + starship module time +end + +starship init fish | source +enable_transience + +# Pin the prompt to the bottom of the terminal (FISH_BOTTOM_PROMPT=1, the +# default from conf.d/10-env.fish; set 0 for the normal top prompt). +# functions/clear.fish and the ctrl-l binding re-pin it after clearing. +status is-interactive; and test "$FISH_BOTTOM_PROMPT" = 1; and tput cup $LINES 0 diff --git a/fish_plugins b/fish_plugins new file mode 100644 index 0000000..aea2aa0 --- /dev/null +++ b/fish_plugins @@ -0,0 +1 @@ +jorgebucaran/nvm.fish diff --git a/functions/_gho_bind.fish b/functions/_gho_bind.fish new file mode 100644 index 0000000..3518ae6 --- /dev/null +++ b/functions/_gho_bind.fish @@ -0,0 +1,13 @@ +function _gho_bind --description 'ctrl-o: gho (tv --inline), then redraw the prompt in the right place' + set -l before $PWD + gho + if test "$PWD" = "$before" + # Cancelled (or the nvim action ran): tv --inline left the cursor on + # the line below the prompt; step back so repaint redraws in place. + printf '\033[A' >/dev/tty + else + # cd + clear + onefetch: put the prompt below onefetch's output. + printf '\n' >/dev/tty + end + commandline -f repaint +end diff --git a/functions/_jobs_bind.fish b/functions/_jobs_bind.fish new file mode 100644 index 0000000..7ffe067 --- /dev/null +++ b/functions/_jobs_bind.fish @@ -0,0 +1,54 @@ +function _jobs_bind --description 'ctrl-z: fg the only job, or pick one from the jobs tv cable' + # Only reached at the prompt: while a job owns the terminal, ctrl-z is the + # tty's SIGTSTP and stops it. So ctrl-z toggles: suspend, then resume. + # Records for the `jobs` cable: display, job id, process group (tabs). + set -l recs + for line in (jobs 2>/dev/null) + set -l f (string split \t -- $line) + string match -qr '^\d+$' -- $f[1]; or continue # header row + set -a recs (printf '%%%s %-8s %s\t%s\t%s' $f[1] $f[4] $f[5] $f[1] $f[2]) + end + + set -l id + switch (count $recs) + case 0 + return + case 1 + set id (string split \t -- $recs[1])[2] + case '*' + set -lx TV_JOBS (mktemp) + printf '%s\n' $recs >$TV_JOBS + set id (_tv_inline jobs) + rm -f $TV_JOBS + end + + if test -z "$id" + commandline -f repaint + return + end + + # Run fg as a command line, not from the binding: a binding runs with the + # terminal still in fish's reader mode (extended keys on), so a job that + # never had the terminal (started with &) would get ctrl-z/ctrl-c as escape + # sequences instead of signals. The leading space keeps it out of history. + # Whatever was typed comes back at the next prompt. + set -l buf (commandline | string collect) + if test -n "$buf" + set -g __jobs_bind_buf $buf + function __jobs_bind_restore --on-event fish_prompt + functions -e __jobs_bind_restore + commandline -r -- $__jobs_bind_buf + set -e __jobs_bind_buf + end + end + + # Executing leaves "❯ __jobs_bind_fg 1" on the prompt line: step up and + # erase it, and drop fg's "Send job … to foreground" (stderr of fg only; + # the job keeps its own stdout/stderr). + function __jobs_bind_fg + printf '\033[A\033[2K\r' >/dev/tty + fg %$argv[1] 2>/dev/null + end + commandline -r -- " __jobs_bind_fg $id" + commandline -f execute +end diff --git a/functions/_nvm_index_update.fish b/functions/_nvm_index_update.fish new file mode 100644 index 0000000..c66753d --- /dev/null +++ b/functions/_nvm_index_update.fish @@ -0,0 +1,20 @@ +function _nvm_index_update + test ! -d $nvm_data && command mkdir -p $nvm_data + + set --local index $nvm_data/.index + + if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp + command rm -f $index.temp + echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2 + return 1 + end + + command awk -v OFS=\t ' + /v0.9.12/ { exit } # Unsupported + NR > 1 { + print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") + } + ' $index.temp >$index + + command rm -f $index.temp +end diff --git a/functions/_nvm_list.fish b/functions/_nvm_list.fish new file mode 100644 index 0000000..1623bb8 --- /dev/null +++ b/functions/_nvm_list.fish @@ -0,0 +1,14 @@ +function _nvm_list + set --local versions $nvm_data/* + + set --query versions[1] && + string match --entire --regex -- ( + string replace --all -- $nvm_data/ "" $versions | + string match --regex -- "v\d.+" | + string escape --style=regex | + string join "|" + ) <$nvm_data/.index + + command --all node | + string match --quiet --invert --regex -- "^$nvm_data" && echo system +end diff --git a/functions/_nvm_version_activate.fish b/functions/_nvm_version_activate.fish new file mode 100644 index 0000000..f7dfef7 --- /dev/null +++ b/functions/_nvm_version_activate.fish @@ -0,0 +1,4 @@ +function _nvm_version_activate --argument-names ver + set --global --export nvm_current_version $ver + set --prepend PATH $nvm_data/$ver/bin +end diff --git a/functions/_nvm_version_deactivate.fish b/functions/_nvm_version_deactivate.fish new file mode 100644 index 0000000..24dd36e --- /dev/null +++ b/functions/_nvm_version_deactivate.fish @@ -0,0 +1,5 @@ +function _nvm_version_deactivate --argument-names ver + test "$nvm_current_version" = "$ver" && set --erase nvm_current_version + set --local index (contains --index -- $nvm_data/$ver/bin $PATH) && + set --erase PATH[$index] +end diff --git a/functions/_pj_bind.fish b/functions/_pj_bind.fish new file mode 100644 index 0000000..bc265d7 --- /dev/null +++ b/functions/_pj_bind.fish @@ -0,0 +1,21 @@ +function _pj_bind --description 'ctrl-p / down: pj (tv --inline), then redraw the prompt in the right place' + # pj reports through $PJ_STATE: `open` = the picker was cancelled and + # left the cursor on the line below the prompt; empty = no task sources, + # nothing drawn — but fish's repaint after an external command still + # lands one line low, so both step back up. `ran` = a task printed + # output: new line, prompt below it. + set -lx PJ_STATE (mktemp) + if contains -- --quiet $argv + set -lx PJ_QUIET 1 + end + pj + set -l state (cat $PJ_STATE) + switch "$state" + case open '' + printf '\033[A' >/dev/tty + case ran + printf '\n' >/dev/tty + end + rm -f $PJ_STATE + commandline -f repaint +end diff --git a/functions/_pj_bind_down.fish b/functions/_pj_bind_down.fish new file mode 100644 index 0000000..948aa39 --- /dev/null +++ b/functions/_pj_bind_down.fish @@ -0,0 +1,21 @@ +function _pj_bind_down --description "down arrow: pj tv cable on an idle empty prompt, else fish's down-or-search" + # Mirror of atuin's up binding (atuin owns up, this owns down). Everything + # that legitimately needs the arrow keys keeps them: + # - non-empty buffer → multiline cursor movement / forward history search + # - paging mode → tab-completion pager navigation (tab on an empty + # line opens the pager with an empty buffer) + # - search mode → history-search navigation + # down-or-search is fish's own input function, called as a command exactly + # the way atuin's _atuin_bind_up calls up-or-search. + set -l buf (commandline | string collect) + if test -n "$buf"; or commandline --paging-mode; or commandline --search-mode + down-or-search + return + end + + # _pj_bind runs ~/.local/bin/pj (also ctrl-p), which opens the `pj` tv + # cable. --quiet (PJ_QUIET) keeps it silent when the tree has no task + # source at all, so down is a no-op outside projects instead of printing + # an error per press. + _pj_bind --quiet +end diff --git a/functions/_tv_inline.fish b/functions/_tv_inline.fish new file mode 100644 index 0000000..af2b544 --- /dev/null +++ b/functions/_tv_inline.fish @@ -0,0 +1,10 @@ +function _tv_inline --description 'tv --inline below the prompt, cursor back on the prompt line; stdout is the pick' + # tv --inline opens on the line below the prompt and leaves the cursor on + # its own first row when it exits; step back up so the following + # `commandline -f repaint` redraws the prompt in place instead of one line + # lower. /dev/tty keeps the move out of callers that capture stdout (gho). + tv $argv --inline + set -l st $status + printf '\033[A' >/dev/tty + return $st +end diff --git a/functions/ai.fish b/functions/ai.fish new file mode 100644 index 0000000..447b452 --- /dev/null +++ b/functions/ai.fish @@ -0,0 +1,15 @@ +function ai --description 'Choose and launch an AI CLI via gum' + set -l choice (gum choose --header 'AI CLI' claude opencode codex hermes fractal) + test -n "$choice"; or return # cancelled (Esc / Ctrl-C) → bail out + + switch $choice + case claude + claude --dangerously-skip-permissions + case '*' + # labels match the binary names, so just run it + # add a dedicated `case` here if another tool needs flags + $choice + end +end + + diff --git a/functions/c.fish b/functions/c.fish new file mode 100644 index 0000000..26a8bcd --- /dev/null +++ b/functions/c.fish @@ -0,0 +1,9 @@ +function c + if test -z "$argv[1]" + clear + else + cd $argv[1] + end +end + + diff --git a/functions/c2p.fish b/functions/c2p.fish new file mode 100644 index 0000000..106a3c6 --- /dev/null +++ b/functions/c2p.fish @@ -0,0 +1,3 @@ +function c2p --description "Code2Prompt with fuzzy-search template" + fd --type f --extension hbs . $HOME/.config/code2prompt | fzf | xargs code2prompt --template +end diff --git a/functions/cd.fish b/functions/cd.fish new file mode 100644 index 0000000..ba28ff2 --- /dev/null +++ b/functions/cd.fish @@ -0,0 +1,20 @@ +function cd --description 'cd with zoxide fallback, else builtin cd' + if test (count $argv) -eq 0 + builtin cd $HOME + else if test "$argv[1]" = '-' + builtin cd - + else if builtin cd $argv[1] 2>/dev/null + # exact path resolved, nothing else to do + else if type -q zoxide + set -l target (zoxide query -- $argv[1] 2>/dev/null) + if test -n "$target" + builtin cd $target + else + builtin cd $argv[1] # let builtin cd surface the real error + end + else + builtin cd $argv[1] + end + + type -q zoxide; and zoxide add $PWD +end diff --git a/functions/clear.fish b/functions/clear.fish new file mode 100644 index 0000000..7054070 --- /dev/null +++ b/functions/clear.fish @@ -0,0 +1,11 @@ +function clear --wraps clear --description 'clear screen + kitty scrollback, prompt pinned to the bottom' + if not status is-interactive + command clear $argv + return + end + # kitty doesn't clear scrollback with plain `clear`; 3J drops it. + printf '\033[2J\033[3J\033[1;1H' + # Re-pin only when the bottom prompt is enabled (FISH_BOTTOM_PROMPT=0 + # keeps the default top prompt). + test "$FISH_BOTTOM_PROMPT" = 1; and tput cup $LINES 0 +end diff --git a/functions/clip-last.fish b/functions/clip-last.fish new file mode 100644 index 0000000..3a5f256 --- /dev/null +++ b/functions/clip-last.fish @@ -0,0 +1,4 @@ +function clip-last --description 'Re-run last command, copy output to clipboard' + eval $history[1] | cpy + notify-send -a fish "Clipboard" "Command output copied to clipboard" +end diff --git a/functions/cp-appid.fish b/functions/cp-appid.fish new file mode 100644 index 0000000..6489665 --- /dev/null +++ b/functions/cp-appid.fish @@ -0,0 +1,43 @@ +function cp-appid --description "Fuzzy-pick a desktop app ID and copy to clipboard" + set -l search_dirs \ + /usr/share/applications \ + /usr/local/share/applications \ + $HOME/.local/share/applications \ + /var/lib/flatpak/exports/share/applications \ + $HOME/.local/share/flatpak/exports/share/applications \ + /var/lib/snapd/desktop/applications + + set -l existing_dirs + for d in $search_dirs + test -d $d; and set -a existing_dirs $d + end + + test (count $existing_dirs) -eq 0 + and echo "No application directories found." >&2 + and return 1 + + set -l chosen ( + fd --type f --extension desktop . $existing_dirs \ + | while read -l f + set -l app_id (basename $f .desktop) + set -l name (rg -m1 '^Name=' $f | string replace 'Name=' '') + test -z "$name"; and set name $app_id + echo "$name\t$app_id" + end \ + | sort -u -t\t -k1 \ + | fzf \ + --delimiter='\t' \ + --with-nth=1,2 \ + --prompt="App ID › " \ + --height=50% \ + --layout=reverse \ + --border=rounded \ + --info=inline + ) + + test -z "$chosen"; and return 0 + + set -l app_id (string split '\t' $chosen)[2] + echo -n $app_id | wl-copy + echo "Copied: $app_id" +end diff --git a/functions/czs.fish b/functions/czs.fish new file mode 100644 index 0000000..23d0ce1 --- /dev/null +++ b/functions/czs.fish @@ -0,0 +1,37 @@ +function czs --description 'chezmoi: re-add drifted files, then commit + push the source repo' + # Optional targets scope both the status view and the re-add, + # e.g. `chs ~/.config/fish`. No args = all managed files. + set -l drift (chezmoi status $argv) + or return + + if test -n "$drift" + printf '%s\n' $drift + # re-add takes the local (destination) contents as truth for modified + # files; templates are never overwritten, non-file entries are ignored. + chezmoi re-add $argv + or return + else + echo "chs: in sync — nothing to re-add" + end + + # Commit + sync the source repo (~/.local/share/chezmoi). + set -l src (chezmoi source-path) + if test -n "$(git -C $src status --porcelain)" + git -C $src add -A + and git -C $src commit --quiet -m 'chs: re-add drifted files' + or return + echo "chs: committed "(git -C $src rev-parse --short HEAD) + end + + # Push anything unpushed — covers this commit AND leftovers from a + # previously failed push. --autostash tolerates post-commit hooks + # (beads export) re-dirtying the tree mid-sync. + set -l ahead (git -C $src rev-list --count @{upstream}..HEAD 2>/dev/null; or echo 0) + if test $ahead -gt 0 + git -C $src pull --rebase --autostash --quiet + and git -C $src push --quiet + and echo "chs: pushed $ahead commit(s) to "(git -C $src remote get-url origin) + else + echo "chs: remote up to date" + end +end diff --git a/functions/extract_agents.fish b/functions/extract_agents.fish new file mode 100644 index 0000000..5c048a2 --- /dev/null +++ b/functions/extract_agents.fish @@ -0,0 +1,18 @@ +function extract_agents -d "Copy all AGENTS.md files to a target directory while preserving structure" + set -l out_dir $argv[1] + + # Validate input + if test -z "$out_dir" + echo "Error: Output directory required." + echo "Usage: extract_agents " + return 1 + end + + # Ensure output directory exists + mkdir -p $out_dir + + # Find and copy preserving relative paths + fd -t f -g "AGENTS.md" -x cp --parents "{}" $out_dir + + echo "Extraction complete. Check $out_dir." +end diff --git a/functions/fab.fish b/functions/fab.fish new file mode 100644 index 0000000..f83dec6 --- /dev/null +++ b/functions/fab.fish @@ -0,0 +1,40 @@ +function fab -d "Fuzzy find and execute a Fabric pattern" + set -l json_file ~/.config/fabric/pattern_explainations.json + + if not test -f $json_file + set_color red; echo "Error: $json_file not found."; set_color normal + return 1 + end + + # 1. Safely capture piped input (if any) to a temp file + # This preserves all formatting, newlines, and avoids variable escaping issues + set -l temp_input (mktemp) + if not isatty stdin + cat > $temp_input + end + + # 2. Parse JSON to TSV -> fzf (Name in list, Description in preview) -> Extract Name + set -l selection (jq -r '.[] | "\(.name)\t\(.description)"' $json_file | \ + fzf --delimiter '\t' \ + --with-nth 1 \ + --preview 'echo {2}' \ + --preview-window 'right:60%:wrap' \ + --prompt 'Pattern > ' \ + --info inline \ + --bind 'ctrl-/:toggle-preview') + + # 3. Execute with or without the piped data + if test -n "$selection" + set -l pattern (string split -f 1 \t "$selection") + + # If our temp file has data (-s), pipe it. Otherwise, run bare. + if test -s $temp_input + cat $temp_input | fabric --pattern "$pattern" + else + fabric --pattern "$pattern" + end + end + + # 4. Clean up + rm -f $temp_input +end diff --git a/functions/fish_title.fish b/functions/fish_title.fish new file mode 100644 index 0000000..65a8f0c --- /dev/null +++ b/functions/fish_title.fish @@ -0,0 +1,8 @@ +function fish_title + # Show a short hostname over SSH, otherwise just the current directory. + if set -q SSH_TTY + echo (prompt_hostname | string sub -l 10):(prompt_pwd) + else + prompt_pwd + end +end diff --git a/functions/fish_user_key_bindings.fish b/functions/fish_user_key_bindings.fish new file mode 100644 index 0000000..1b90e48 --- /dev/null +++ b/functions/fish_user_key_bindings.fish @@ -0,0 +1,50 @@ +function fish_user_key_bindings + # Vi mode first: it rebinds the preset tables and (on first activation) + # re-triggers this function via the fish_key_bindings handler, so custom + # binds must come after it to land on top. + fish_vi_key_bindings + + # Vi mode types in `insert`; bind customs there AND in `default` (normal) + # so the keys work regardless of mode. + for mode in insert default + # Keys owned by kitty.conf never reach fish and are NOT bound here: + # ctrl-g → lazygit overlay, ctrl-y → yazi vsplit, + # ctrl-h/j/k/l → vim-aware split nav (pass_keys.py). + # ctrl-e: tv git-files (bat preview, enter opens nvim). ctrl-o, ctrl-p + # and down also open tv cables — same keys in zsh and bash. tv runs + # --inline below the prompt; _tv_inline/_gho_bind/_pj_bind put the + # prompt back in place (or below any output) afterwards. ctrl-a: + # omp-session resumes or starts omp for the repo (same in zsh); when it + # opens the omp-sessions cable and it is cancelled, it steps back up. + # ctrl-n: always a new omp session. + bind -M $mode ctrl-e '_tv_inline git-files; commandline -f repaint' + bind -M $mode ctrl-b purple repaint + bind -M $mode ctrl-y clip-last + + bind -M $mode ctrl-o _gho_bind + bind -M $mode ctrl-p _pj_bind + bind -M $mode ctrl-a 'omp-session; commandline -f repaint' + bind -M $mode ctrl-n 'omp; commandline -f repaint' + bind -M $mode ctrl-w 'atuin ai inline; commandline -f repaint' + # ctrl-z at the prompt: fg the only background job, or pick one from + # the jobs tv cable when there are several (_jobs_bind). + bind -M $mode ctrl-z _jobs_bind + + # Arrow keys: atuin owns up (bound from config.fish, survives the + # fish_vi_key_bindings reset above because that only erases presets), + # down opens the pj tv cable — but only on an idle, empty prompt; see + # _pj_bind_down. + bind -M $mode down _pj_bind_down + + # ctrl-f: yazi (cd's to yazi's exit dir on quit). + bind -M $mode ctrl-f 'yy; commandline -f repaint' + bind -M $mode ctrl-g 'lazygit; commandline -f repaint' + + # ctrl-c routes through the clear wrapper (kitty scrollback + prompt + # pinned to the bottom) AND wipes any text typed on the command line. + bind -M $mode ctrl-c 'commandline -r ""; clear; commandline -f repaint' + + # ctrl-q mirrors ctrl-d's preset (`exit`) — quit the shell. + bind -M $mode ctrl-q exit + end +end diff --git a/functions/gdc.fish b/functions/gdc.fish new file mode 100644 index 0000000..7707748 --- /dev/null +++ b/functions/gdc.fish @@ -0,0 +1,9 @@ +function gdc --description "Discard all git changes with gum confirmation" + if gum confirm "Discard all uncommitted changes? This is irreversible." + git reset --hard HEAD + git clean -fd + echo "Changes wiped." + else + echo "Operation aborted." + end +end diff --git a/functions/gh-sonr-org-migrate.fish b/functions/gh-sonr-org-migrate.fish new file mode 100644 index 0000000..e960b7a --- /dev/null +++ b/functions/gh-sonr-org-migrate.fish @@ -0,0 +1,151 @@ +#!/usr/bin/env fish +# sonr-consolidate.fish +# Migrates all repos from orgs matching "sonr" into sonr-io, +# prompting via gum for renames on collision, then deletes emptied orgs. +# +# Requires: gh (authenticated as org owner on all orgs), gum, jq + +set -g TARGET_ORG sonr-io + +# ── Preflight ──────────────────────────────────────────────────────────────── +for bin in gh gum jq + if not command -q $bin + echo (set_color red)"missing dependency: $bin"(set_color normal) + exit 1 + end +end + +if not gh auth status &>/dev/null + echo (set_color red)"gh is not authenticated"(set_color normal) + exit 1 +end + +# ── Discover source orgs ───────────────────────────────────────────────────── +# All orgs the user belongs to whose login contains "sonr", excluding target. +set -l source_orgs (gh api user/orgs --paginate --jq '.[].login' \ + | string match -r '.*sonr.*' \ + | string match -v $TARGET_ORG) + +if test (count $source_orgs) -eq 0 + echo "No source orgs found. Nothing to do." + exit 0 +end + +echo (set_color cyan)"Source orgs:"(set_color normal) +printf ' %s\n' $source_orgs +echo (set_color cyan)"Target org:"(set_color normal)" $TARGET_ORG" +echo + +# Let the user confirm / trim the list interactively +set -l selected_orgs (printf '%s\n' $source_orgs | gum choose --no-limit \ + --header "Select orgs to migrate into $TARGET_ORG (space to toggle, enter to confirm)") + +if test (count $selected_orgs) -eq 0 + echo "Nothing selected. Exiting." + exit 0 +end + +# ── Helpers ────────────────────────────────────────────────────────────────── +function repo_exists_in_target + gh api "repos/$TARGET_ORG/$argv[1]" --silent &>/dev/null +end + +function transfer_repo + # $1 = source org, $2 = repo name, $3 = (optional) new name + set -l src $argv[1] + set -l repo $argv[2] + set -l args -f new_owner=$TARGET_ORG + if set -q argv[3]; and test -n "$argv[3]" + set -a args -f new_name=$argv[3] + end + gh api -X POST "repos/$src/$repo/transfer" $args --silent +end + +# ── Migration ──────────────────────────────────────────────────────────────── +set -g failed_transfers + +for org in $selected_orgs + echo + echo (set_color --bold cyan)"── $org ──"(set_color normal) + + set -l repos (gh api "orgs/$org/repos" --paginate --jq '.[].name') + + if test (count $repos) -eq 0 + echo " (no repos)" + continue + end + + for repo in $repos + set -l new_name "" + + if repo_exists_in_target $repo + echo (set_color yellow)" ⚠ $repo already exists in $TARGET_ORG"(set_color normal) + while true + set new_name (gum input \ + --header "New name for $org/$repo (exists in $TARGET_ORG)" \ + --placeholder "$org-$repo" \ + --value "$org-$repo") + if test -z "$new_name" + echo " skipped $org/$repo" + set new_name __SKIP__ + break + end + if repo_exists_in_target $new_name + echo (set_color yellow)" $new_name also exists — pick another"(set_color normal) + else + break + end + end + test "$new_name" = __SKIP__; and continue + end + + set -l label "$org/$repo → $TARGET_ORG/"(test -n "$new_name"; and echo $new_name; or echo $repo) + if transfer_repo $org $repo $new_name + echo (set_color green)" ✓ $label"(set_color normal) + else + echo (set_color red)" ✗ failed: $label"(set_color normal) + set -a failed_transfers "$org/$repo" + end + end +end + +if test (count $failed_transfers) -gt 0 + echo + echo (set_color red)"Failed transfers (orgs containing these will NOT be deleted):"(set_color normal) + printf ' %s\n' $failed_transfers +end + +# ── Wait for transfers to settle ───────────────────────────────────────────── +# GitHub repo transfers are asynchronous; give them time to drain. +echo +gum spin --title "Waiting 30s for transfers to settle..." -- sleep 30 + +# ── Delete emptied orgs ────────────────────────────────────────────────────── +echo +for org in $selected_orgs + # Skip orgs with failed transfers + if string match -q "$org/*" -- $failed_transfers + echo (set_color yellow)"skipping delete: $org (had failures)"(set_color normal) + continue + end + + set -l remaining (gh api "orgs/$org/repos" --paginate --jq '. | length' | jq -s 'add // 0') + + if test "$remaining" -gt 0 + echo (set_color yellow)"skipping delete: $org still has $remaining repo(s) (transfer pending?)"(set_color normal) + continue + end + + if gum confirm "Delete empty org $org?" + if gh api -X DELETE "orgs/$org" --silent + echo (set_color green)"✓ deleted $org"(set_color normal) + else + echo (set_color red)"✗ could not delete $org (API delete requires org owner; may need manual deletion in Settings)"(set_color normal) + end + else + echo "kept $org" + end +end + +echo +echo (set_color --bold green)"Done."(set_color normal) diff --git a/functions/gh-wiki.fish b/functions/gh-wiki.fish new file mode 100644 index 0000000..d989567 --- /dev/null +++ b/functions/gh-wiki.fish @@ -0,0 +1,150 @@ +function gh-wiki --description "Clone a GitHub wiki and build one PDF from its Markdown pages" + # Usage: gh-wiki [-o OUTPUT.pdf] [-t TEMPLATE] [-d] [-k] + argparse 'h/help' 'o/output=' 't/template=' 'd/docker' 'k/keep' -- $argv + or return 1 + + if set -q _flag_help; or test (count $argv) -eq 0 + echo "Usage: gh-wiki [-o OUTPUT.pdf] [-t TEMPLATE] [-d] [-k]" + echo " -o Output PDF path (default: -wiki.pdf in the current directory)" + echo " -t Pandoc template (default: eisvogel, from ~/.local/share/pandoc/templates)" + echo " -d Use the pandoc/extra Docker image instead of the local pandoc" + echo " -k Keep the clone in /tmp" + return 0 + end + + # --- Check dependencies --------------------------------------------- + set -l deps git gum + set -l engine + if set -q _flag_docker + set -a deps docker + else + set -a deps pandoc + # Eisvogel needs a XeTeX engine; tectonic is a self-contained one. + for e in xelatex tectonic + command -q $e; and set engine $e; and break + end + if test -z "$engine" + echo "gh-wiki: install xelatex or tectonic, or pass -d to use Docker" >&2 + return 1 + end + end + for bin in $deps + if not command -q $bin + echo "gh-wiki: '$bin' is not installed" >&2 + return 1 + end + end + + set -l url $argv[1] + + # Accept a plain repo URL and turn it into the wiki URL. + if not string match -q '*.wiki.git' $url + set url (string replace -r '(\.git)?/?$' '.wiki.git' $url) + end + + # Repo name: https://github.com/user/repo.wiki.git -> repo + set -l repo (string replace -r '\.wiki\.git$' '' (basename $url)) + set -l clone_dir (mktemp -d /tmp/gh-wiki-$repo-XXXXXX) + set -l out "$repo-wiki.pdf" + set -q _flag_output; and set out $_flag_output + + # --- Clone ---------------------------------------------------------- + gum spin --show-error --spinner dot --title "Cloning $url" -- \ + git clone --quiet --depth 1 $url $clone_dir + or begin + gum log --level error "Clone failed: $url" + rm -rf $clone_dir + return 1 + end + + # --- Collect pages -------------------------------------------------- + # Home first, then the rest in alphabetical order. Skip wiki chrome. + set -l pages + test -f $clone_dir/Home.md; and set -a pages $clone_dir/Home.md + for f in (find $clone_dir -maxdepth 1 -name '*.md' | sort) + set -l name (basename $f) + string match -q 'Home.md' $name; and continue + string match -q '_*' $name; and continue + set -a pages $f + end + + if test (count $pages) -eq 0 + gum log --level error "No Markdown pages found in $url" + rm -rf $clone_dir + return 1 + end + gum log --level info "Found "(count $pages)" pages" + + # --- Build one Markdown source -------------------------------------- + # Each page becomes a chapter. Its own headings move one level down. + set -l src_name _combined.md + set -l src $clone_dir/$src_name + for f in $pages + set -l title (string replace -a -- '-' ' ' (basename $f .md)) + printf '\n# %s\n\n' "$title" >> $src + cat $f >> $src + printf '\n\n' >> $src + end + + # --- Shared pandoc options ------------------------------------------ + set -l template eisvogel + set -q _flag_template; and set template $_flag_template + set -l common_args \ + --from gfm \ + --shift-heading-level-by=1 \ + --toc --toc-depth=2 \ + --number-sections \ + -M title="$repo Wiki" \ + -M date=(date +%Y-%m-%d) \ + -V titlepage=true \ + -V toc-own-page=true + + # --- Render --------------------------------------------------------- + set -l status_code 0 + if set -q _flag_docker + # pandoc/extra ships pandoc, LaTeX and Eisvogel. Mount the clone as + # /data, write the PDF there, then move it to the requested path. + set -l tmp_pdf _out.pdf + gum spin --show-error --spinner line --title "Rendering $out" -- \ + docker run --rm \ + --volume "$clone_dir:/data" \ + --user (id -u):(id -g) \ + pandoc/extra $src_name -o $tmp_pdf \ + --resource-path /data \ + --template $template --pdf-engine xelatex \ + $common_args + set status_code $status + test $status_code -eq 0; and mv $clone_dir/$tmp_pdf $out + else + set -l pandoc_args --pdf-engine $engine + # Tectonic's bundle lacks Eisvogel's default sourcesans/sourcecodepro + # packages; naming system fonts makes the template skip them. + test $engine = tectonic; and set -a pandoc_args \ + -V mainfont="Noto Sans" -V monofont="JetBrains Mono" + set -l data_dir (pandoc --version | string match -r 'User data directory: (.*)' | tail -n1) + if test -f "$data_dir/templates/$template.latex"; or test -f "$template" + set -a pandoc_args --template $template + else + gum log --level warn "Template '$template' not found; using the pandoc default" + end + gum spin --show-error --spinner line --title "Rendering $out" -- \ + pandoc $src -o $out \ + --resource-path $clone_dir \ + $pandoc_args \ + $common_args + set status_code $status + end + + # --- Clean up ------------------------------------------------------- + if set -q _flag_keep + gum log --level info "Clone kept at $clone_dir" + else + rm -rf $clone_dir + end + + if test $status_code -ne 0 + gum log --level error "pandoc failed" + return $status_code + end + gum log --level info "Wrote $out" +end diff --git a/functions/ghg.fish b/functions/ghg.fish new file mode 100644 index 0000000..c77b559 --- /dev/null +++ b/functions/ghg.fish @@ -0,0 +1,5 @@ +function ghg -a repo --description 'ghq get + cd (clone/path logic in ~/.local/bin/ghg-clone)' + set -l dir (ghg-clone $repo); or return + cd $dir; or return + clear; and onefetch +end diff --git a/functions/ghn.fish b/functions/ghn.fish new file mode 100644 index 0000000..79688dd --- /dev/null +++ b/functions/ghn.fish @@ -0,0 +1,4 @@ +function ghn -a repo --description 'create repo + cd (logic in ~/.local/bin/ghn)' + set -l dir (command ghn $repo); or return + cd $dir +end diff --git a/functions/gho.fish b/functions/gho.fish new file mode 100644 index 0000000..67e7fd3 --- /dev/null +++ b/functions/gho.fish @@ -0,0 +1,9 @@ +function gho --description 'pick a ghq repo / Obsidian vault (tv ghq-repos cable) + cd' + set -l dir (tv ghq-repos --inline); or return + test -n "$dir"; or return 1 + cd $dir; or return + clear + if test -d .git + onefetch + end +end diff --git a/functions/git-summary.fish b/functions/git-summary.fish new file mode 100644 index 0000000..349cabf --- /dev/null +++ b/functions/git-summary.fish @@ -0,0 +1,22 @@ +function git-summary --description "Aggregate all AGENTS.md files in the current git repo via code2prompt" + # Resolve the repo root so it works from any subdirectory + set -l repo_root (git rev-parse --show-toplevel 2>/dev/null) + if test -z "$repo_root" + echo "git-summary: not inside a git repository" >&2 + return 1 + end + + set -l template ~/.config/code2prompt/agents-md.hbs + if not test -f $template + echo "git-summary: template not found at $template" >&2 + return 1 + end + + # Pass through any extra flags (e.g. --output-file, --tokens) + code2prompt $repo_root \ + --include "AGENTS.md" \ + --include "**/AGENTS.md" \ + --template $template \ + $argv +end + diff --git a/functions/gtm.fish b/functions/gtm.fish new file mode 100644 index 0000000..4002f12 --- /dev/null +++ b/functions/gtm.fish @@ -0,0 +1,160 @@ +# ~/.config/fish/functions/gtm.fish +# Migrate GitHub repos → prad.codes (Gitea) via tea. +# Usage: gtm [/ | ] — no arg: multi-select via fzf + +function gtm --description "Migrate GitHub repo(s) to a prad.codes org via tea" + # -- Preflight ------------------------------------------------------------ + for bin in gh tea gum jq + if not command -q $bin + echo "gtm: missing dependency: $bin" >&2 + return 1 + end + end + + set -l gh_token (gh auth token 2>/dev/null) + if test -z "$gh_token" + echo "gtm: gh not authenticated (run: gh auth login)" >&2 + return 1 + end + + # -- Resolve source repos ------------------------------------------------- + # Each entry: nameWithOwner \t isPrivate + set -l repos + + if test (count $argv) -ge 1 + # Direct mode: accepts owner/repo, https://…, ssh://…, git@host:… + # Same normalization as ghg-clone: strip scheme, user@, scp colon, .git + set -l rel ( + printf '%s\n' $argv[1] \ + | sed -E 's#^[[:alnum:]]+://##; s#^[^@/]+@##; s#:#/#; s#\.git$##; s#/+$##' + ) + # Reduce to owner/repo: take the last two path segments + set -l parts (string split / -- $rel | string match -rv '^$') + if test (count $parts) -lt 2 + echo "usage: gtm [/ | ]" >&2 + return 1 + end + # If a host segment is present, it must be github.com — that's the + # only source this migrator pulls from (clone-url is hardcoded to it) + if test (count $parts) -gt 2; and test "$parts[-3]" != github.com + echo "gtm: source must be a github.com repo, got host: $parts[-3]" >&2 + return 1 + end + set -l nwo "$parts[-2]/$parts[-1]" + if not string match -qr '^[\w.-]+/[\w.-]+$' -- $nwo + echo "gtm: could not parse owner/repo from: $argv[1]" >&2 + return 1 + end + set -l meta ( + gh repo view $nwo \ + --json nameWithOwner,isPrivate \ + --jq '[.nameWithOwner, (.isPrivate|tostring)] | @tsv' 2>/dev/null + ) + if test -z "$meta" + echo "gtm: repo not found or inaccessible: $nwo" >&2 + return 1 + end + set repos $meta + else + # Interactive mode: fzf multi-select + if not command -q fzf + echo "gtm: missing dependency: fzf" >&2 + return 1 + end + set repos ( + gh repo list --limit 200 \ + --json nameWithOwner,isPrivate,description \ + --jq '.[] | [.nameWithOwner, (.isPrivate|tostring), .description // ""] | @tsv' \ + | fzf --multi \ + --delimiter '\t' \ + --with-nth 1,3 \ + --prompt 'migrate> ' \ + --header 'TAB: multi-select · ENTER: confirm' \ + --preview 'gh repo view {1}' \ + --preview-window 'right:50%:wrap' + ) + if test (count $repos) -eq 0 + echo "gtm: nothing selected" >&2 + return 1 + end + end + + # -- Select target org on prad.codes -------------------------------------- + set -l owner ( + tea organizations list -o simple \ + | string trim \ + | string match -rv '^$' \ + | gum choose --header "Target org on prad.codes" + ) + if test -z "$owner" + echo "gtm: no target org selected" >&2 + return 1 + end + + # -- Options -------------------------------------------------------------- + set -l extras ( + gum choose --no-limit \ + --header "Migration options (space to toggle)" \ + "wiki" "issues" "labels" "pull-requests" "releases" "milestones" "lfs" "mirror" + ) + set -l extra_flags + for opt in $extras + set -a extra_flags "--$opt" + end + + # -- Migrate -------------------------------------------------------------- + set -l failed + set -l migrated # repo names successfully landed on prad.codes/$owner + for line in $repos + set -l fields (string split \t -- $line) + set -l nwo $fields[1] + set -l is_private $fields[2] + set -l name (string split -m1 / -- $nwo)[2] + + set -l flags --name $name --owner $owner \ + --clone-url "https://github.com/$nwo.git" \ + --service git \ + --auth-token $gh_token \ + $extra_flags + + if test "$is_private" = true + set -a flags --private + end + + echo "→ migrating $nwo → prad.codes/$owner/$name" + if tea repos migrate $flags + set -a migrated $name + else + set -a failed $nwo + echo "✗ failed: $nwo" >&2 + end + end + + # -- Optional local clone ------------------------------------------------- + if test (count $migrated) -gt 0 + and gum confirm "Clone "(count $migrated)" migrated repo(s) locally via ghg-clone?" + set -l last_dir + for name in $migrated + set -l dir (ghg-clone "https://prad.codes/$owner/$name") + if test -n "$dir" + set last_dir $dir + else + echo "✗ clone failed: $owner/$name" >&2 + end + end + # Single repo → drop into it (function runs in-shell, so cd sticks) + if test (count $migrated) -eq 1 -a -n "$last_dir" + cd $last_dir + end + end + + # -- Summary -------------------------------------------------------------- + if test (count $failed) -gt 0 + echo + echo "gtm: "(count $failed)" migration(s) failed:" >&2 + printf ' %s\n' $failed >&2 + return 1 + end + echo + echo "✓ done — "(count $repos)" repo(s) migrated to $owner" +end diff --git a/functions/launch_omp_livediff_overlay.fish b/functions/launch_omp_livediff_overlay.fish new file mode 100644 index 0000000..484f65d --- /dev/null +++ b/functions/launch_omp_livediff_overlay.fish @@ -0,0 +1,16 @@ +function launch_omp_livediff_overlay --description "Overlay omp on the current kitty window with a livediff split beside it" + # kitty appends -PID to config-file listen_on sockets, so a hardcoded + # --to unix:@kitty-local never matches. kitty @ resolves the real + # address from $KITTY_LISTEN_ON on its own. + if not set -q KITTY_LISTEN_ON + echo "launch_omp_livediff_overlay: no kitty remote-control socket (KITTY_LISTEN_ON unset)" >&2 + return 1 + end + + # omp overlays the current window; capture its window id + set -l wid (kitty @ launch --type=overlay-main --cwd=current omp) + or return + + # livediff side by side in the same tab; keep focus on omp + kitty @ launch --match id:$wid --location=vsplit --keep-focus --cwd=current livediff +end diff --git a/functions/lc-elir.fish b/functions/lc-elir.fish new file mode 100644 index 0000000..a085a31 --- /dev/null +++ b/functions/lc-elir.fish @@ -0,0 +1,16 @@ +function lc-elir -d "fzf-pick LeetCode solution files and run /leetcode-eli5 on each via omp" + set -l root (count $argv > /dev/null; and echo $argv[1]; or echo .) + # Match only numbered problem files: 1365.some-slug.js anywhere in the tree + set -l files (fd --type f '^\d+\..+\.(js|ts)$' $root \ + | fzf --multi \ + --prompt='eli5> ' \ + --delimiter=/ \ + --with-nth=-3.. \ + --preview 'bat --color=always --line-range=:40 {}' \ + --preview-window=right:60%) + test -z "$files"; and return 1 + for f in $files + echo "── /leetcode-eli5 $f" + omp -p "/leetcode-eli5 $f" + end +end diff --git a/functions/mdcp.fish b/functions/mdcp.fish new file mode 100644 index 0000000..908da8a --- /dev/null +++ b/functions/mdcp.fish @@ -0,0 +1,8 @@ +function mdcp -a url + if test -z "$url" + echo "usage: mdcp " >&2 + return 1 + end + curl.md $url | cpy + pst | mdfried +end diff --git a/functions/mdp.fish b/functions/mdp.fish new file mode 100644 index 0000000..556ba1c --- /dev/null +++ b/functions/mdp.fish @@ -0,0 +1,10 @@ +# ~/.config/fish/functions/mdv.fish +function mdp -d "Interactive Markdown selector and previewer" + # Find markdown files up to 3 directories deep + set -l file (fd --type f --extension md --max-depth 3 | fzf --preview 'mdfried {}' --preview-window=right:60%:wrap) + + # Execute mdfried on the selected file if one was chosen + if test -n "$file" + mdfried "$file" + end +end diff --git a/functions/nvm.fish b/functions/nvm.fish new file mode 100644 index 0000000..64d94c5 --- /dev/null +++ b/functions/nvm.fish @@ -0,0 +1,237 @@ +function nvm --description "Node version manager" + for silent in --silent -s + if set --local index (contains --index -- $silent $argv) + set --erase argv[$index] && break + end + set --erase silent + end + + set --local cmd $argv[1] + set --local ver $argv[2] + + if set --query silent && ! set --query cmd[1] + echo "nvm: Version number not specified (see nvm -h for usage)" >&2 + return 1 + end + + if ! set --query ver[1] && contains -- "$cmd" install use + for file in .nvmrc .node-version + set file (_nvm_find_up $PWD $file) && read ver <$file && break + end + + if ! set --query ver[1] + echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 + return 1 + end + end + + set --local their_version $ver + + switch "$cmd" + case -v --version + echo "nvm, version 2.2.18" + case "" -h --help + echo "Usage: nvm install Download and activate the specified Node version" + echo " nvm install Install the version specified in the nearest .nvmrc file" + echo " nvm use Activate the specified Node version in the current shell" + echo " nvm use Activate the version specified in the nearest .nvmrc file" + echo " nvm list List installed Node versions" + echo " nvm list-remote List available Node versions to install" + echo " nvm list-remote List Node versions matching a given regex pattern" + echo " nvm current Print the currently-active Node version" + echo " nvm uninstall Uninstall the specified Node version" + echo "Options:" + echo " -s, --silent Suppress standard output" + echo " -v, --version Print the version of nvm" + echo " -h, --help Print this help message" + echo "Variables:" + echo " nvm_arch Override architecture, e.g. x64-musl" + echo " nvm_mirror Use a mirror for downloading Node binaries" + echo " nvm_default_version Set the default version for new shells" + echo " nvm_default_packages Install a list of packages every time a Node version is installed" + echo " nvm_data Set a custom directory for storing nvm data" + echo "Examples:" + echo " nvm install latest Install the latest version of Node" + echo " nvm use 14.15.1 Use Node version 14.15.1" + echo " nvm use system Activate the system's Node version" + + case install + _nvm_index_update + + string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias + + if ! set --query ver[1] + echo "nvm: Invalid version number or alias: \"$their_version\"" >&2 + return 1 + end + + if test ! -e $nvm_data/$ver + set --local os (command uname -s | string lower) + set --local ext tar.gz + set --local arch (command uname -m) + set --local tarcmd tar + + switch $os + case aix + set arch ppc64 + case sunos + case linux + case darwin + case {msys_nt,mingw\*_nt}\* + set os win + set ext zip + set tarcmd bsdtar + case \* + echo "nvm: Unsupported operating system: \"$os\"" >&2 + return 1 + end + + switch $arch + case i\*86 + set arch x86 + case x86_64 + set arch x64 + case arm64 + string match --regex --quiet "v(?\d+)" $ver + if test "$os" = darwin -a $major -lt 16 + set arch x64 + end + case armv6 armv6l + set arch armv6l + case armv7 armv7l + set arch armv7l + case armv8 armv8l aarch64 + set arch arm64 + end + + set --query nvm_arch && set arch $nvm_arch + + set --local dir "node-$ver-$os-$arch" + set --local url $nvm_mirror/$ver/$dir.$ext + + command mkdir -p $nvm_data/$ver + + if ! set --query silent + echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias" + echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" + end + + if ! command curl -q $silent --progress-bar --location $url | + command $tarcmd --extract --gzip --directory $nvm_data/$ver 2>/dev/null + command rm -rf $nvm_data/$ver + echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 + return 1 + end + + set --query silent || echo -en "\033[F\33[2K\x1b[0m" + + if test "$os" = win + command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin + else + command mv $nvm_data/$ver/$dir/* $nvm_data/$ver + command rm -rf $nvm_data/$ver/$dir + end + end + + if test $ver != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + _nvm_version_activate $ver + + set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages + end + + set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case use + test $ver = default && set ver $nvm_default_version + _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __ + + if ! set --query ver[1] + echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2 + return 1 + end + + if test $ver != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + test $ver != system && _nvm_version_activate $ver + end + + set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case uninstall + if test -z "$ver" + echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 + return 1 + end + + test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version + + _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __ + + if ! set -q ver[1] + echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2 + return 1 + end + + set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node") + + _nvm_version_deactivate $ver + + command rm -rf $nvm_data/$ver + case current + _nvm_current + case ls list + _nvm_list | _nvm_list_format (_nvm_current) $argv[2] + case lsr {ls,list}-remote + _nvm_index_update || return + _nvm_list | command awk ' + FILENAME == "-" && (is_local[$1] = FNR == NR) { next } { + print $0 (is_local[$1] ? " ✓" : "") + } + ' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2] + case \* + echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2 + return 1 + end +end + +function _nvm_find_up --argument-names path file + test -e "$path/$file" && echo $path/$file || begin + test ! -z "$path" || return + _nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file + end +end + +function _nvm_version_match --argument-names ver + string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver | + string replace --filter --regex -- '^v?(\d+)' 'v$1' | + string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$' +end + +function _nvm_list_format --argument-names current regex + command awk -v current="$current" -v regex="$regex" ' + $0 ~ regex { + aliases[versions[i++] = $1] = $2 " " $3 + pad = (n = length($1)) > pad ? n : pad + } + END { + if (!i) exit 1 + while (i--) + printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n", + versions[i], aliases[versions[i]]) + } + ' +end + +function _nvm_current + command --search --quiet node || return + set --query nvm_current_version && echo $nvm_current_version || echo system +end + +function _nvm_node_info + set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm))) + test -f $npm_path/package.json || set --local npm_version_default (command npm --version) + command node --eval " + console.log(process.version) + console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) + console.log(process.execPath) + " | string replace -- ~ \~ +end diff --git a/functions/y.fish b/functions/y.fish new file mode 100644 index 0000000..80ef371 --- /dev/null +++ b/functions/y.fish @@ -0,0 +1,8 @@ +function y + set tmp (mktemp -t "yazi-cwd.XXXXXX") + command yazi $argv --cwd-file="$tmp" + if read -z cwd < "$tmp"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd" + builtin cd -- "$cwd" + end + command rm -f -- "$tmp" +end diff --git a/functions/yy.fish b/functions/yy.fish new file mode 100644 index 0000000..799c0e9 --- /dev/null +++ b/functions/yy.fish @@ -0,0 +1,8 @@ +function yy + set tmp (mktemp -t "yazi-cwd.XXXXXX") + command yazi $argv --cwd-file="$tmp" + if read -z cwd < "$tmp"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd" + builtin cd -- "$cwd" + end + rm -f -- "$tmp" +end diff --git a/themes/cyberdream.theme b/themes/cyberdream.theme new file mode 100644 index 0000000..a76d50d --- /dev/null +++ b/themes/cyberdream.theme @@ -0,0 +1,30 @@ +# name: 'cyberdream' +# url: 'https://github.com/scottmckendry/cyberdream.nvim' +# preferred_background: 16181a + +fish_color_normal ffffff +fish_color_command 5ef1ff +fish_color_param ffaecf +fish_color_keyword 5eff6c +fish_color_quote f1ff5e +fish_color_redirection 5ea1ff +fish_color_end bd5eff +fish_color_comment 7b8496 +fish_color_error ff6e5e +fish_color_gray 7b8496 +fish_color_selection --background=3c4048 +fish_color_search_match --background=3c4048 +fish_color_option f1ff5e +fish_color_operator 5ea1ff +fish_color_escape ffaecf +fish_color_autosuggestion 7b8496 +fish_color_cancel ff6e5e +fish_color_cwd ffbd5e +fish_color_user 5ef5d2 +fish_color_host 5eff6c +fish_color_host_remote f1ff5e +fish_color_status ff6e5e +fish_pager_color_progress 7b8496 +fish_pager_color_prefix 5ea1ff +fish_pager_color_completion ffffff +fish_pager_color_description 7b8496