# @unified-latex/unified-latex-cli

> Command line interface to common unified-latex options

Latest version **1.8.4** (published 2026-04-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @unified-latex/unified-latex-cli
pnpm add @unified-latex/unified-latex-cli
yarn add @unified-latex/unified-latex-cli
bun add @unified-latex/unified-latex-cli
```

Provides the command `unified-latex`.

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.8.4 |
| Published | 2026-04-03 |
| First published | 2022-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 25 |
| Unpacked size | 3.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 127 |
| Author | Jason Siefken |
| Maintainers | siefkenj |
| Keywords | pegjs, latex, parser, prettier, unified-latex, unified |

## Links

- npm: https://www.npmjs.com/package/@unified-latex/unified-latex-cli
- Repository: https://github.com/siefkenj/unified-latex
- Homepage: https://github.com/siefkenj/unified-latex#readme
- Issues: https://github.com/siefkenj/unified-latex/issues
- npm.io page: https://npm.io/package/@unified-latex/unified-latex-cli

## Dependencies (25)

- [chalk](https://npm.io/package/chalk.md) ^5.2.0
- [fault](https://npm.io/package/fault.md) ^2.0.1
- [json5](https://npm.io/package/json5.md) ^2.2.3
- [unified](https://npm.io/package/unified.md) ^10.1.2
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [minimist](https://npm.io/package/minimist.md) ^1.2.7
- [prettier](https://npm.io/package/prettier.md) ^2.8.8
- [camelcase](https://npm.io/package/camelcase.md) ^7.0.1
- [hastscript](https://npm.io/package/hastscript.md) ^7.2.0
- [text-table](https://npm.io/package/text-table.md) ^0.2.0
- [@types/hast](https://npm.io/package/@types/hast.md) ^2.3.9
- [unified-engine](https://npm.io/package/unified-engine.md) ^10.1.0
- [rehype-stringify](https://npm.io/package/rehype-stringify.md) ^9.0.4
- [remark-stringify](https://npm.io/package/remark-stringify.md) ^10.0.3
- [@unified-latex/unified-latex-lint](https://npm.io/package/@unified-latex/unified-latex-lint.md) ^1.8.4
- [@unified-latex/unified-latex-types](https://npm.io/package/@unified-latex/unified-latex-types.md) ^1.8.4
- [@unified-latex/unified-latex-to-hast](https://npm.io/package/@unified-latex/unified-latex-to-hast.md) ^1.8.4
- [@unified-latex/unified-latex-to-mdast](https://npm.io/package/@unified-latex/unified-latex-to-mdast.md) ^1.8.4
- [@unified-latex/unified-latex-to-pretext](https://npm.io/package/@unified-latex/unified-latex-to-pretext.md) ^1.8.4
- [@unified-latex/unified-latex-util-parse](https://npm.io/package/@unified-latex/unified-latex-util-parse.md) ^1.8.4
- [@unified-latex/unified-latex-util-macros](https://npm.io/package/@unified-latex/unified-latex-util-macros.md) ^1.8.4
- [@unified-latex/unified-latex-util-packages](https://npm.io/package/@unified-latex/unified-latex-util-packages.md) ^1.8.4
- [@unified-latex/unified-latex-util-arguments](https://npm.io/package/@unified-latex/unified-latex-util-arguments.md) ^1.8.4
- [@unified-latex/unified-latex-util-print-raw](https://npm.io/package/@unified-latex/unified-latex-util-print-raw.md) ^1.8.4
- [@unified-latex/unified-latex-util-to-string](https://npm.io/package/@unified-latex/unified-latex-util-to-string.md) ^1.8.4

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.8.4 (latest) — 2026-04-03
- 1.8.3 — 2025-06-16
- 1.8.2 — 2025-02-09
- 1.8.1 — 2024-10-21
- 1.8.0 — 2024-08-22
- 1.7.1 — 2024-03-19
- 1.7.0 — 2024-02-25
- 1.6.1 — 2024-02-18
- 1.6.0 — 2024-01-17
- 1.5.0 — 2023-10-02
- 1.4.2 — 2023-09-30
- 1.4.1 — 2023-09-02
- 1.4.0 — 2023-06-20
- 1.3.2 — 2023-04-26
- 1.3.1 — 2023-03-05
- … 9 more at https://npm.io/package/@unified-latex/unified-latex-cli/versions

## README

<!-- DO NOT MODIFY -->
<!-- This file was autogenerated by build-docs.ts -->
<!-- Edit the docstring in index.ts and regenerate -->
<!-- rather than editing this file directly. -->
# unified-latex-cli

## What is this?

Command line interface to common `unified-latex` functions.

## When should I use this?

If you want to reformat, process, or gather statistic on LaTeX files from the command line.

## Examples

Reformat and pretty-print a file

```bash
unified-latex input.tex -o output.tex
```

List all commands defined via `\newcommand` and friends (and hide the file output).

```bash
unified-latex input.tex --no-stdout --stats
```

Expand the definition of the macro `\foo{...}`, which takes one argument.

```bash
unified-latex input.tex -e "\\newcommand{foo}[1]{FOO(#1)}"
```

View the parsed AST.

```bash
unified-latex input.tex --inspect
```

Convert the file to HTML. (Note, you will need to include and configure a library like *MathJax* or *KaTeX* to render
any math in the resulting HTML. Warnings are provided for macros that aren't recognized by the converter.)

```bash
unified-latex input.tex -o output.html --html
```

Lint all tex files in the current directory and watch for changes.

```bash
unified-latex . --no-stdout --lint-all --watch
```

## Install

```bash
npm install @unified-latex/unified-latex-cli
```

This package contains both esm and commonjs exports. To explicitly access the esm export,
import the `.js` file. To explicitly access the commonjs export, import the `.cjs` file.

---
_Source: https://npm.io/package/@unified-latex/unified-latex-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
