# What Programming Language Is the Omarchy CLI Written In?

> Discover the programming language powering the Omarchy CLI. Learn how it uses Bash, associative arrays, and metadata parsing for efficient command routing.

- Repository: [Omacom/omarchy](https://github.com/omacom/omarchy)
- Tags: internals
- Published: 2026-09-12

---

**The Omarchy CLI is written entirely in Bash (shell script), implementing a lightweight command-router pattern using associative arrays and metadata parsing.**

The Omarchy command-line interface serves as the primary entry point for managing the Omarchy system configuration and utilities. According to the `omacom/omarchy` repository source code, the entire core CLI is implemented as a **Bash script**, requiring only Bash 5+ to run on Linux systems without additional runtimes or dependencies.

## Core Implementation: Pure Bash Shell Scripting

The entry point `bin/omarchy` declares its interpreter explicitly with the shebang `#!/bin/bash`. This single file constitutes the entire routing engine for the CLI, leveraging modern Bash features to discover and dispatch sub-commands dynamically.

The script utilizes **associative arrays**—specifically `COMMAND_ROUTE`, `COMMAND_GROUP`, and similar variables—to build an in-memory routing table. These data structures map command names to their respective executable paths, enabling efficient lookup when users invoke commands like `omarchy update` or `omarchy toggle`.

Because the implementation is pure Bash, the CLI runs on any Linux distribution with Bash version 5 or higher installed, eliminating the need for Python, Node.js, or compiled binary dependencies for core functionality.

## Architecture: Command Routing in Bash

The Omarchy CLI follows a sophisticated command-router pattern entirely within its Bash environment.

### Metadata Discovery and Parsing

When invoked, the main script scans the filesystem for files matching the `bin/omarchy-*` pattern. Each sub-command file (such as `bin/omarchy-update`, `bin/omarchy-toggle`, or `bin/omarchy-theme-set`) contains comment-based metadata defining its summary, usage instructions, and group membership.

The router parses these comments to populate the associative arrays, building a complete map of available commands without hardcoding them in the main executable. This design allows new commands to be added simply by dropping appropriately named scripts into the `bin/` directory.

### Command Dispatching

After parsing user input, the router matches arguments against the `COMMAND_ROUTE` array to identify the target binary. It handles special cases such as `--help` flags and command aliases before using `exec` to replace the current process with the selected sub-command.

This dispatch mechanism forwards all remaining arguments to the target script, ensuring seamless pass-through of flags and parameters:

```bash

# Update the system and Omarchy components

omarchy update

# Toggle the night-light feature

omarchy toggle nightlight

# Show help for a specific command

omarchy update --help

```

## Sub-Command Structure

Individual Omarchy commands are themselves standalone Bash scripts following the naming convention `bin/omarchy-<command>`. For example:

- **`bin/omarchy-update`** implements the system update workflow
- **`bin/omarchy-toggle`** handles feature toggles for components like nightlight
- **`bin/omarchy-theme-set`** manages theme configuration changes

Each script operates independently but integrates with the main router through the standardized metadata comments that describe its functionality.

## Language Extensibility Beyond Bash

While the core Omarchy CLI is strictly Bash, the architecture supports extensions written in other languages. The repository includes examples such as [`plugins/panels/dropbox/status.py`](https://github.com/omacom/omarchy/blob/main/plugins/panels/dropbox/status.py), which demonstrates Python integration within the broader Omarchy ecosystem.

Because the router uses `exec` to launch sub-commands, any executable file can serve as a command handler. This design allows developers to implement performance-critical utilities in compiled languages like Rust or Go while maintaining the lightweight Bash foundation for orchestration.

## Summary

- The Omarchy CLI core is implemented in **Bash** within the `bin/omarchy` entry point
- Command routing relies on **associative arrays** (`COMMAND_ROUTE`, `COMMAND_GROUP`) to map user input to executables
- Sub-commands follow the `bin/omarchy-*` file pattern and are parsed for metadata at runtime
- The system requires **Bash 5+** but supports sub-commands written in any language via `exec` dispatch

## Frequently Asked Questions

### Is the Omarchy CLI written in Python?

No, the core CLI is implemented entirely in Bash. While the repository includes Python plugins such as [`plugins/panels/dropbox/status.py`](https://github.com/omacom/omarchy/blob/main/plugins/panels/dropbox/status.py) for specific panel integrations, the command-line interface itself—including the routing logic and entry point—is a shell script.

### What version of Bash does Omarchy require?

The CLI requires **Bash version 5 or higher** to support modern language features like associative arrays used in the command routing system. This dependency is declared in the shebang `#!/bin/bash` and verified at runtime.

### How does Omarchy handle sub-command routing?

The main `bin/omarchy` script scans executable files matching the `bin/omarchy-*` pattern, parses their metadata comments, and stores routing information in associative arrays. When a user executes a command, the router looks up the key in `COMMAND_ROUTE` and uses `exec` to dispatch to the appropriate binary.

### Can I write Omarchy extensions in other languages?

Yes. While the core router is Bash, the `exec` dispatch mechanism allows individual sub-commands to be implemented in any programming language. Simply create an executable file following the `bin/omarchy-<name>` convention, and the router will handle invocation regardless of the implementation language.