> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CodexMono CLI Reference

> Complete CodexMono 1.0.5 CLI and npm package reference: all commands, font families, coverage queries, integrity checks, configuration snippets, platform behavior, and web paths.

CodexMono ships its fonts, metadata, CSS, integrity ledger, and a zero-dependency
Node.js CLI in `@monolex/codexmono`.

*Verified against `@monolex/codexmono 1.0.5`, published to npm on
2026-05-20. The package requires Node.js 12 or newer.*

<Warning>
  CodexMono 1.0.5 has root help, but no per-command help parser. Use bare
  `codexmono`, `codexmono help`, or root `codexmono --help`. Do **not** append
  `--help` to `install` or `uninstall`: `codexmono install --help` runs the
  default `core` installation, and `codexmono uninstall --help` runs the default
  `all` removal.
</Warning>

## Install the Package, Then Choose a Font Set

```bash theme={null}
npm install -g @monolex/codexmono

codexmono                 # command guide; does not install fonts
codexmono install core    # four base fonts
codexmono list core
codexmono doctor
```

The npm `postinstall` script prints the philosophy and command map; it does not
copy fonts into the operating system. Bare `codexmono` also prints the hub.
Font installation is always an explicit command.

For a one-shot invocation, include the action and target:

```bash theme={null}
npx @monolex/codexmono install all
```

Bare `npx @monolex/codexmono` only prints the guide.

## Font Targets

Every target contains the Latin, KR, EA, and Traditional variants for its
layer:

| Target   | Files | Layer                                             | Default use                                           |
| -------- | ----: | ------------------------------------------------- | ----------------------------------------------------- |
| `core`   |     4 | Base CodexMono coverage                           | Source code, box drawing, math, and multilingual text |
| `nerd`   |     4 | Core coverage plus terminal compatibility symbols | Prompt themes and icon-heavy terminals                |
| `hermes` |     4 | Nerd layer plus emoji and broader Unicode         | Messaging and mixed human/agent output                |
| `all`    |    12 | All three layers                                  | Complete local or web package surface                 |

`base` and `default` are aliases for `core`.

### Bundled variants

| Family                       | Characters | Package size | Coverage role                                 |
| ---------------------------- | ---------: | -----------: | --------------------------------------------- |
| CodexMono                    |      4,007 |      0.65 MB | Latin, Greek, Cyrillic, math, and box drawing |
| CodexMono KR                 |     15,132 |      5.83 MB | Korean Hangul and Japanese Kana               |
| CodexMono EA                 |     36,440 |     18.36 MB | Korean, Japanese, and Simplified Chinese      |
| CodexMono Traditional        |     33,726 |     17.18 MB | Traditional Chinese                           |
| CodexMono Nerd               |     14,400 |      2.66 MB | Base plus terminal symbols                    |
| CodexMono KR Nerd            |     25,525 |      7.83 MB | KR plus terminal symbols                      |
| CodexMono EA Nerd            |     46,832 |     20.37 MB | EA plus terminal symbols                      |
| CodexMono Traditional Nerd   |     44,118 |     19.18 MB | Traditional plus terminal symbols             |
| CodexMono Hermes             |     15,860 |      3.46 MB | Nerd plus emoji and broader Unicode           |
| CodexMono KR Hermes          |     26,986 |      8.64 MB | KR integrated messenger family                |
| CodexMono EA Hermes          |     48,253 |     21.17 MB | EA integrated messenger family                |
| CodexMono Traditional Hermes |     45,528 |     19.99 MB | Traditional integrated messenger family       |

Each family is bundled in both TTF and WOFF2 form. The character counts describe
the packaged font metadata, not which files are currently installed.

## Complete Command Map

Version 1.0.5 advertises 12 commands. `help` is also accepted as a root alias.

| Command                     | Default target | What it does                                                                                                                     | Important output or flags                                                                      |
| --------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `install [target]`          | `core`         | Copies the target's TTF files into the platform font directory. Existing same-named files are replaced.                          | Explicit write; Linux refreshes `fc-cache`; Windows prints administrator `Copy-Item` commands. |
| `uninstall [target]`        | `all`          | Removes the target's exact bundled TTF names from the platform font directory.                                                   | Explicit write; unrelated or renamed fonts are not removed.                                    |
| `list [target]`             | `all`          | Checks whether each target TTF filename exists in the system font directory.                                                     | Human status only; this is a presence check, not a checksum.                                   |
| `info [target]`             | `all`          | Prints family names, character counts, sizes, descriptions, and package paths.                                                   | `--json` returns one object per TTF family.                                                    |
| `path [target]`             | `core`         | Prints absolute paths to the packaged font files.                                                                                | TTF by default; add `--woff2` for web paths.                                                   |
| `css [target]`              | `all`          | Generates `@font-face` blocks for the selected package paths.                                                                    | Human/CSS output; does not edit a project.                                                     |
| `verify [target]`           | `all`          | SHA-256-checks packaged TTF and WOFF2 files against `docs/CHECKSUMS.md`.                                                         | `--json`; nonzero when a selected package file is missing or mismatched.                       |
| `config <editor> [family]`  | `CodexMono EA` | Prints an editor or terminal configuration snippet.                                                                              | Family selector: `core`, `nerd`, or `hermes`.                                                  |
| `doctor`                    | —              | Checks the system font directory, installed family counts, package integrity, Linux fontconfig, and non-bundled CodexMono files. | Non-bundled files are warnings; package integrity failures are critical.                       |
| `which <char-or-codepoint>` | —              | Reads the packaged TTF cmap tables and lists every bundled font containing one code point.                                       | Accepts a literal character, `U+XXXX`, or `0xXXXX`; supports `--json`.                         |
| `chars <text>`              | —              | Reports per-code-point coverage across all 12 packaged TTF files.                                                                | Quote whitespace or shell-sensitive text; supports `--json`.                                   |
| `version`                   | —              | Prints the CLI/package version.                                                                                                  | Root aliases: `--version`, `-v`.                                                               |

Root help aliases are `help`, `--help`, and `-h`. Flags are collected after the
first argument, so the command must come first:

```bash theme={null}
codexmono info all --json       # correct
codexmono path hermes --woff2   # correct
codexmono --json info all       # wrong: --json is treated as the command
```

`--json` is implemented for `info`, `verify`, `which`, and `chars` only.
`--woff2` affects `path` only.

## Install, Remove, and Diagnose

```bash theme={null}
codexmono install hermes
codexmono list hermes
codexmono doctor

# Destructive: bare uninstall means all 12 bundled names.
codexmono uninstall all
```

| Platform | Install behavior                                                                         | Font directory         |
| -------- | ---------------------------------------------------------------------------------------- | ---------------------- |
| macOS    | Copies selected TTF files directly.                                                      | `~/Library/Fonts`      |
| Linux    | Copies selected TTF files, then runs `fc-cache -f -v`.                                   | `~/.local/share/fonts` |
| Windows  | Prints administrator PowerShell copy instructions; it does not silently elevate or copy. | `C:\Windows\Fonts`     |

On Windows, uninstall likewise prints the filenames to remove manually.

`list` and `doctor` distinguish installed-font state from package state:

* `list` checks exact TTF filenames in the system font directory.
* `verify` hashes the 24 packaged TTF/WOFF2 files, not installed copies.
* `doctor` combines installed counts and package integrity, and warns about
  matching non-bundled names such as older or custom CodexMono builds.

## Machine-Readable Queries

### Package metadata

```bash theme={null}
codexmono info all --json
```

Each array item contains `family`, `file`, `characters`, `size`, `description`,
`ttf`, and `woff2`.

### Integrity

```bash theme={null}
codexmono verify all --json
```

Each result contains `file` and `status`. Successful files use `ok`; failures
can use `missing` or `mismatch` and include available `expected`/`actual`
digests. Version 1.0.5 contains 24 checked font files.

### Character ownership

```bash theme={null}
codexmono which 한 --json
codexmono which U+1F600 --json
codexmono chars "A한😀" --json
```

`which` returns `input`, normalized `codepoint`, rendered `char`, and
`covered_by`. `chars` returns one row per Unicode code point with `char`,
`codepoint`, `count`, and `covered`.

In version 1.0.5, Latin `A` is covered by all 12 fonts, Hangul `한` by 9, and
emoji `😀` by the 4 Hermes variants. These are packaged cmap results and do not
depend on system installation.

## Editor and Terminal Snippets

```bash theme={null}
codexmono config vscode hermes
codexmono config ghostty nerd
codexmono config terminal core
```

Supported editors are `vscode`, `kitty`, `alacritty`, `wezterm`, `ghostty`,
`vim`, `neovim`, `iterm2`, `jetbrains`, and `terminal` (macOS Terminal). The
family selector maps `core` to `CodexMono`, `nerd` to `CodexMono Nerd`, and
`hermes` to `CodexMono Hermes`. Omitting it uses `CodexMono EA`.

The command only prints a snippet or GUI path. It does not edit the target
application's configuration.

## Web Use

Use package paths when a bundler owns assets:

```bash theme={null}
codexmono path core --woff2
codexmono css core
```

Or import the packaged preset:

```css theme={null}
@import '@monolex/codexmono/css/codexmono.css';
```

The generated `css` command covers the selected Core, Nerd, or Hermes families;
the static preset focuses on the Core family. Both reference the package's
WOFF2 and TTF assets with `font-weight: 100 800`, normal style, and
`font-display: swap`.

## Published Package Proof

The npm 1.0.5 tarball has integrity
`sha512-4n3d7OwKnWxV4aH7Pp/sJqytaJsl/kwJv07BqwVvekYU+9He97/PPQltF+duAyU1nfoUhUuGWHfj3uNm4UOdXw==`.
An npm dry-run reports 43 entries, a 145,955,994-byte packed archive, a
212,955,602-byte unpacked package, 12 TTF files, 12 WOFF2 files, and 7 license
files. The package has no runtime or development dependencies.

The published artifact includes `initiate/initiate.md` and
`initiate/initiate.json`. It does not include `initiate/SKILL.md` in version
1.0.5; treat the root command and `initiate.md` as the packaged agent reference
for this release.

## Related Documentation

<CardGroup cols={2}>
  <Card title="Distribution" icon="truck" href="/codexmono/technical/distribution">
    Package architecture, CSS distribution, JavaScript metadata, and licensing.
  </Card>

  <Card title="600-Unit Contract" icon="ruler" href="/codexmono/philosophy-foundation/600-units">
    Why Latin cells use 600 units and East Asian cells use 1200.
  </Card>

  <Card title="Monogrid" icon="border-all" href="/codexmono/technical/monogrid">
    Validate box-drawing alignment against CodexMono display widths.
  </Card>

  <Card title="Terminal Integration" icon="terminal" href="/codexmono/integration/terminal-integration">
    Connect font metrics to terminal rendering and width ownership.
  </Card>
</CardGroup>
