CLI command platform
The CLI command platform is Omarchy's public command surface. It gives people, menus, key bindings, services, and automation one stable way to control the desktop, manage system state, launch applications and coding agents, and complete setup work.
Command center
The command center turns readable omarchy routes into executable actions. It keeps direct executable calls, route aliases, help, and command discovery on one path.
Command routes
omarchy resolves the longest known route and then runs the matching executable. A command can expose a clear route such as omarchy agent account add while keeping a filename route and older aliases for scripts and key bindings.
When a route is incomplete, the command center shows the related group or command help. An unknown route returns a failure and can suggest a nearby route. This makes command mistakes visible instead of sending them to an unintended action.
This diagram shows how an interactive or automated caller reaches an Omarchy capability.
flowchart LR
A[User, menu, key binding, service, or agent] --> B[omarchy route]
B --> C{Known route?}
C -->|Yes| D[Selected executable]
C -->|No| E[Help or suggestion]
D --> F[Desktop, system, app, agent, or state result]
References: bin/omarchy• L158-176 bin/omarchy• L284-337 bin/omarchy• L1023-1205
Command metadata
Each executable can describe its public name, group, summary, arguments, examples, aliases, visibility, and need for elevated access in its leading metadata. The command center uses that data to build help and discovery output, so the metadata is part of the user-facing command contract.
Hidden commands support other commands and panels without filling normal command lists. They still take part in route checks and can expose focused machine data.
References: bin/omarchy• L198-337 bin/omarchy• L905-1021 bin/omarchy-agent• L1-5 bin/omarchy-agent-pi-defaults• L1-5
Command discovery
omarchy commands gives people a readable list and gives tools Markdown or JSON records. The records include the route, executable, group, summary, arguments, aliases, visibility, and privilege need. --check finds route collisions, missing summaries, bad metadata, and missing executables before another tool depends on the catalog.
References: bin/omarchy• L615-658 bin/omarchy• L686-840 bin/omarchy• L846-889
Shared operational conventions
Commands share a small set of rules so a menu action and a terminal call have the same meaning. These rules cover output, session use, privilege, state changes, and failure reporting.
User-facing output
Commands use normal terminal output for direct work and Omarchy notifications or shell messages when the caller has no terminal. The shared i18n command selects the current catalog, falls back to English, formats plural text, and formats numbers for the active language.
Interactive menus return a selected value to their caller. This lets a command own the choice and lets another command own the state change. Notifications can add typed follow-up actions without turning message text into shell code.
References: bin/omarchy-i18n• L1-20 bin/omarchy-i18n• L47-65 bin/omarchy-menu-select• L1-20 bin/omarchy-notification-send• L121-180
Session boundaries
Commands that affect the running desktop use the current Omarchy session as their source of truth. Browser and terminal launchers resolve the active desktop choice, while system exit commands close applications and detach the final action from the terminal that requested it.
Long work has a clear completion point. A command reports success only after its main result is ready, while optional presentation such as a notification or OSD can fail without changing the core result.
References: bin/omarchy-launch-browser• L6-75 bin/omarchy-launch-terminal• L1-15 bin/omarchy-system• L64-119 bin/omarchy-notification-send• L140-180
Privileged boundaries
Commands that change installed state, boot state, passwords, hardware settings, or system services mark their elevated need and use a fixed operation boundary. User-session work stays outside that boundary, and root work does not trust a caller-selected executable or environment.
Updates, snapshots, hibernation, and device changes also use locks, checks, retry markers, or restore paths. These controls keep an interrupted action from being reported as complete or from leaving the next boot in an unsafe state.
References: bin/omarchy-update• L14-53 bin/omarchy-update• L70-160 bin/omarchy-snapshot• L1-45 bin/omarchy-apply-gpu-memory• L1-21 bin/omarchy-hibernation-setup• L1-61 bin/omarchy-dev-link• L17-49
Capability surface
The command platform exposes one user outcome at a time. The families below show the main outcomes without requiring each caller to know the desktop or system rules behind them.
Desktop controls
Desktop commands control windows, bars, docks, audio, notifications, reminders, Wi-Fi, and session exit. They connect a terminal or automation caller to the live desktop and report the result through the same shell and notification paths used by menus.
The bar and dock commands treat layout as shared user state. Their read and write forms let panels inspect the current layout and let setup flows change it without replacing unrelated user choices.
References: bin/omarchy-bar• L1-14 bin/omarchy-dock• L1-10 bin/omarchy-hyprland-window-close-all• L1-29 bin/omarchy-reminder• L1-8 bin/omarchy-restart-wifi• L1-17
Application and menu workflows
Application commands turn a desktop choice into a launch or focus action. Browser commands find an installed default handler, web-app commands require a supported Chromium path, and terminal commands carry the active terminal or Files location into the new window.
Menu commands provide a small interface for selection and input. Keybinding menus turn live desktop bindings into searchable actions, and region menus return a stable choice to the command that applies it. The launchers, menus, and application lifecycle page describes these workflows in more detail.
References: bin/omarchy-cmd-default-browser• L1-18 bin/omarchy-launch-browser• L6-35 bin/omarchy-launch-webapp• L1-45 bin/omarchy-cmd-terminal-cwd• L1-55 bin/omarchy-menu-keybindings• L1-18 bin/omarchy-menu-region-formats• L1-37
Agent and model workflows
Agent commands give many coding agents one launch contract. A caller can use the selected default, choose a named agent or provider, pass a prompt, open an inline session, or use a local model. The launcher adapts the session to the selected agent while keeping the Omarchy route stable.
The same surface manages the wider agent lifecycle:
- Defaults and launchers: A selected default can be a hosted agent, a local model, or a supported local harness.
omarchy agentstarts it or opens the agent chooser when no default exists. - Accounts: Subscription accounts can be added, listed, renamed, selected, re-authenticated, removed, and copied between machines. Claude, Codex, and Grok keep separate account identities and offer a threshold at which Omarchy can notify the user and offer another account.
- Usage: Provider collectors publish one display-ready JSON record per agent. The agents panel reads those records instead of reading each provider's files or service directly.
- Local models:
omarchy modelscan set up, start, stop, share, pair, update, and remove models. Ready text models receive launchers, and a model that is still loading has a visible warm-up boundary before an agent session starts. - Agent-assisted work:
omarchy agent makestarts guided creation of a theme, plugin, app, or game. Crash diagnosis gathers the event facts and sends them to the selected agent.
References: bin/omarchy-agent• L17-31 bin/omarchy-agent• L70-124 bin/omarchy-agent• L283-315 bin/omarchy-agent-account-add• L3-16 bin/omarchy-agent-account-threshold• L1-25 bin/omarchy-agent-account-state• L5-21 bin/omarchy-agent-usage-update• L1-10 bin/omarchy-models• L1-18 bin/omarchy-models-launchers• L1-15 bin/omarchy-agent-make• L1-30 bin/omarchy-agent-crash• L1-52
System state and lifecycle
System commands manage Omarchy state that can outlive the current session. They cover themes, icon sets, regions, provisioning, migrations, updates, snapshots, hibernation, security setup, device checks, and the optional Windows VM.
These commands distinguish live session state from installed state and next-boot state. Setup and update flows keep retry markers until their work is complete, and reset or removal flows protect user-managed data instead of treating every file or package as platform-owned.
References: bin/omarchy-provision-first-run• L1-16 bin/omarchy-provision-first-run• L39-99 bin/omarchy-provision-user• L84-138 bin/omarchy-migrate• L31-100 bin/omarchy-update• L91-160 bin/omarchy-windows-vm• L1-39
Language and region support
Language commands set the display language and session locale. Region commands set date, time, number, money, measurement, and paper formats without changing the display language. The shared session helper applies the result to the current session and the next login.
The command surface also uses the same language choice for notifications, menu labels, time output, and number formatting. The input methods and language support page explains how this locale flow connects to typing support.
References: bin/omarchy-locale-session• L1-7 bin/omarchy-locale-session• L35-71 bin/omarchy-region-formats• L1-21 bin/omarchy-region-formats• L63-112 bin/omarchy-notification-time• L1-11
Automation model
Automation uses the same routes as an interactive user. Structured discovery, focused JSON output, progress events, and exit status let panels, wrappers, and agents use commands without copying desktop behavior.
Machine-readable state
Commands expose JSON when a caller needs state rather than terminal layout. Account commands return identity and active-account state, model commands return readiness and sharing state, usage collectors publish complete records, and reminders can return a complete active-reminder record.
Writers replace a complete record after a successful collection. Readers can therefore treat the record as one old-or-new value. A valid empty or unavailable state is still different from a process failure, so callers must use both the data and the exit status.
References: bin/omarchy• L750-801 bin/omarchy-agent-account-list• L22-46 bin/omarchy-agent-account-state• L1238-1257 bin/omarchy-agent-usage-update• L47-57 bin/omarchy-reminder• L74-117
Progress and failure behavior
Long agent account actions can emit progress, status, completion, and error events for a panel that has no terminal. The normal exit status remains the final command contract, while events give the panel a live view of work in progress.
The command center returns a non-zero result for unknown routes, invalid discovery options, metadata failures, missing executables, and missing required arguments. Capability commands keep their own failure boundary: a missing browser, session, model, snapshot target, safe locale, transfer endpoint, or boot verification stops the action before it claims success.
References: bin/omarchy-agent-account-add• L9-16 bin/omarchy-agent-account-add• L103-109 bin/omarchy-agent-account-add• L209-249 bin/omarchy• L803-840 bin/omarchy• L1152-1204 bin/omarchy-models-warmup• L19-33 bin/omarchy-update-boot• L1-39
Change checklist
When these files or sections are changed, remember to consider these:
- A new or renamed
bin/omarchy-*executable must keep its route, metadata, aliases, executable behavior, and discovery record aligned. - A route or alias change must be checked against existing routes. A collision can make one command unreachable while both files still run directly.
- A new JSON field or progress event must keep its meaning stable for the panel or wrapper that consumes it. Human terminal text is not a machine contract.
- A menu, keybinding, notification, or launcher change must preserve the link between the displayed action, its dispatcher, and the final desktop result.
- An agent launch change must keep default selection, prompt forwarding, provider or local-model choice, account selection, and launcher state aligned.
- An account change must preserve identity matching, active-account state, running-session rules, threshold alerts, usage records, and transfer validation.
- A model change must keep setup state, readiness, start and stop behavior, sharing, launcher generation, and agent launch selection consistent.
- A privileged, provisioning, kernel, snapshot, update, lifecycle, or device change must preserve source checks, locks, retry markers, rollback points, and safe completion boundaries.
- A language or region change must keep locale generation, session environment, catalog fallback, number formatting, and input behavior aligned.
- A renamed command must update its route and every caller that uses its old executable path. This applies to model, region-format, and GPU-memory commands.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Two commands claim one route | The command center selects no reliable target | omarchy commands --check route validation |
| A command loses its summary or executable bit | Discovery shows an action that cannot run or cannot be understood | Metadata and executable checks |
| No default agent is selected | A prompted launch has nowhere to send its work | --pick opens the agent chooser; direct launch returns a clear error |
| A local model is still loading or cannot start | An agent opens too early or hides the real start error | Readiness state and omarchy-models-warmup boundary |
| An account changes while its home is in use | Credentials can move from under a running session | Account locks and home-use checks |
| An account transfer is incomplete or too large | The destination receives a partial or mismatched login | Versioned validation, size limits, identity checks, and rollback |
| An update cannot verify boot files | The system may reboot into an unverified update | Boot verification blocks completion and the reboot offer |
| A locale is saved before generation succeeds | The session points at a locale the system cannot use | Generate first, then write and apply the session values |
| A notification message is parsed as an action | Untrusted text can become a command vector | Typed arguments and explicit action argv |
Key files
| File | Why to read it |
|---|---|
bin/omarchy | Defines route resolution, help, discovery formats, aliases, and metadata checks. |
bin/omarchy-agent | Shows the common launch boundary for hosted agents, providers, prompts, and local models. |
bin/omarchy-default-agent | Defines default-agent selection and the supported agent choices. |
bin/omarchy-agent-account-state | Defines account identity, active selection, thresholds, and session rules. |
bin/omarchy-agent-account-add | Shows sign-in, progress events, launcher creation, and default selection. |
bin/omarchy-agent-account-transfer | Shows the versioned account-copy contract and destination safeguards. |
bin/omarchy-agent-usage-update | Shows how provider usage records reach the agents panel. |
bin/omarchy-models | Defines the user-facing lifecycle for local models and paired machines. |
bin/omarchy-models-launchers | Shows how ready local models become application launchers. |
bin/omarchy-menu-select | Shows the shared menu selection contract used by higher-level workflows. |
bin/omarchy-launch-browser | Shows default-browser lookup, launch handoff, and focus behavior. |
bin/omarchy-system | Shows session exit sequencing and detached system actions. |
bin/omarchy-update | Shows the update lifecycle, lock, snapshot, migration, boot, and restart boundaries. |
bin/omarchy-dev-link | Shows how a development checkout becomes the command and agent-skill source. |
bin/omarchy-i18n | Shows localized command text, fallback, plural forms, and number formatting. |
bin/omarchy-region-formats | Shows regional format selection without changing display language. |