# How to Get a Machine-Readable Omarchy Command List

> Easily get your machine-readable Omarchy command list using the omarchy commands --json command. Automate your workflows with structured JSON output.

- Repository: [Omacom/omarchy](https://github.com/omacom/omarchy)
- Tags: how-to-guide
- Published: 2026-08-31

---

**Run `omarchy commands --json` to output all available commands as structured JSON that can be parsed by scripts and automation tools.**

Omarchy is an opinionated dotfiles framework that provides a unified CLI for managing your development environment. When building integrations or automation around Omarchy, you need programmatic access to its available commands. The framework includes a built-in `commands` sub-command specifically designed for this purpose, implemented in the main entry-point script.

## The `omarchy commands --json` Command

Omarchy exposes its internal command registry through the `commands` sub-command. By default, this prints a human-readable list. Adding the `--json` flag switches the output to machine-readable JSON format.

```bash

# Get machine-readable command list

omarchy commands --json

```

In `quattro/bin/omarchy`, the `--json` flag is handled at lines 543-544, which triggers JSON serialization of the command registry rather than the default table output.

## Including Hidden Commands

Some Omarchy commands are marked as hidden—typically internal utilities or advanced features not intended for typical users. To include these in your machine-readable output, combine `--all` with `--json`:

```bash

# Include hidden commands in JSON output

omarchy commands --all --json

```

This `--all` flag is documented alongside the standard `commands` usage at line 542 of the same script.

## Practical Usage Examples

### Pretty-Print with `jq`

```bash
omarchy commands --json | jq .

```

### Filter for Specific Command Groups

```bash
omarchy commands --json | jq '.[] | select(.group == "system")'

```

### Generate Shell Completions

```bash
omarchy commands --json | jq -r '.[].name' > omarchy_commands.txt

```

### Validate in CI Pipelines

```bash
#!/bin/bash
if ! omarchy commands --json | jq empty; then
  echo "Invalid JSON output from omarchy commands"
  exit 1
fi

```

## JSON Output Structure

Based on the implementation in `quattro/bin/omarchy`, the JSON output includes fields such as:

- **name** – the command identifier
- **group** – functional category (e.g., "system", "dev", "deploy")
- **description** – short human-readable summary
- **hidden** – boolean flag for visibility status

The exact schema is determined by how the command registry is populated in the main Omarchy script.

## Key Source Files

| File | Purpose |
|------|---------|
| `quattro/bin/omarchy` | Main CLI entry point implementing `commands` sub-command with `--json` and `--all` flags |
| Lines 542-544 | Flag parsing and output format selection |

## Summary

- Use **`omarchy commands --json`** for machine-readable command listings
- Add **`--all`** to include hidden/internal commands
- Output is valid JSON suitable for piping to `jq`, parsing in scripts, or generating documentation
- Implementation lives in `quattro/bin/omarchy` with flag handling at lines 542-544

## Frequently Asked Questions

### Does Omarchy support other output formats besides JSON?

No. As implemented in the source code, the `commands` sub-command only supports default human-readable output and JSON via the `--json` flag. There is no `--yaml` or `--csv` option in the current version of `quattro/bin/omarchy`.

### Can I get command arguments and options in the JSON output?

The JSON output from `omarchy commands --json` focuses on command metadata (name, group, description, hidden status). Detailed argument and option specifications for each command are not included in this output. You would need to invoke `omarchy <command> --help` for individual command details.

### Is the JSON schema versioned or stable?

The Omarchy source code does not indicate schema versioning for the `commands --json` output. The structure is determined by the internal command registry representation. If building long-term integrations, consider pinning your Omarchy version and validating the JSON structure in your test suite.

### Where is the `commands` sub-command implemented?

The `commands` sub-command is implemented in the main entry script at `quattro/bin/omarchy`, with flag parsing and output formatting logic concentrated around lines 542-544 according to the source analysis.