# @lingui/cli

> Lingui CLI: extracts i18n messages from source code into catalogs and compiles the translated catalogs for the runtime

Latest version **6.7.0** (published 2026-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lingui/cli
pnpm add @lingui/cli
yarn add @lingui/cli
bun add @lingui/cli
```

Provides the command `lingui`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 6.7.0 |
| Published | 2026-09-11 |
| First published | 2018-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=22.19.0 |
| Dependencies | 21 |
| Unpacked size | 142.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5883 |
| Author | Tomáš Ehrlich |
| Maintainers | andrii.bodnar, serhiydmytryshyn |
| Keywords | lingui, linguijs, cli, i18n, extract, compile, catalog, gettext, translation, localization |

## Links

- npm: https://www.npmjs.com/package/@lingui/cli
- Repository: https://github.com/lingui/js-lingui
- Homepage: https://lingui.dev
- Issues: https://github.com/lingui/js-lingui/issues
- npm.io page: https://npm.io/package/@lingui/cli

## Dependencies (21)

- [ms](https://npm.io/package/ms.md) ^2.1.3
- [ora](https://npm.io/package/ora.md) ^9.1.0
- [jiti](https://npm.io/package/jiti.md) ^2.6.1
- [chokidar](https://npm.io/package/chokidar.md) 5.0.0
- [tinypool](https://npm.io/package/tinypool.md) ^2.1.0
- [commander](https://npm.io/package/commander.md) ^14.0.2
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.5
- [micromatch](https://npm.io/package/micromatch.md) ^4.0.7
- [source-map](https://npm.io/package/source-map.md) ^0.7.6
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.21.0
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.21.2
- [@lingui/conf](https://npm.io/package/@lingui/conf.md) 6.7.0
- [@lingui/core](https://npm.io/package/@lingui/core.md) 6.7.0
- [pseudolocale](https://npm.io/package/pseudolocale.md) ^3.1.0
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.22.0
- [normalize-path](https://npm.io/package/normalize-path.md) ^3.0.0
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.28.5
- [@lingui/format-po](https://npm.io/package/@lingui/format-po.md) 6.7.0
- [@lingui/message-utils](https://npm.io/package/@lingui/message-utils.md) 6.7.0
- [@lingui/babel-plugin-lingui-macro](https://npm.io/package/@lingui/babel-plugin-lingui-macro.md) 6.7.0
- [@lingui/babel-plugin-extract-messages](https://npm.io/package/@lingui/babel-plugin-extract-messages.md) 6.7.0

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 6.7.0 (latest) — 2026-09-11
- 6.0.0-next.4 (next) — 2026-04-17
- 5.1.2 (canary) — 2024-12-16
- 6.6.0 — 2026-07-24
- 6.5.0 — 2026-07-06
- 6.4.0 — 2026-06-16
- 6.3.0 — 2026-06-10
- 6.2.0 — 2026-06-01
- 6.1.0 — 2026-05-21
- 6.0.1 — 2026-04-30
- 6.0.0 — 2026-04-22
- 5.9.5 — 2026-04-06
- 6.0.0-next.3 — 2026-04-02
- 6.0.0-next.2 — 2026-03-27
- 5.9.4 — 2026-03-27
- … 176 more at https://npm.io/package/@lingui/cli/versions

## README

[![License][badge-license]][license]
[![Version][badge-version]][package]
[![Downloads][badge-downloads]][package]

# @lingui/cli

> Lingui CLI: extracts i18n messages from source code into catalogs and compiles the translated catalogs for the runtime

`@lingui/cli` is part of [Lingui][documentation]. Lingui is a lightweight, open-source internationalization (i18n) library for JavaScript and TypeScript. It brings compile-time macros and a CLI for message extraction to React, React Native, Vue, SolidJS, Astro, Svelte, and Node.js.

The `lingui` command reads `lingui.config.js` (or `.ts`) from the project root: the source locale, the target locales and where the catalogs live. The [installation guide][installation] shows the minimal file and the [configuration reference][conf] lists every option.

## Installation

```sh
npm install --save-dev @lingui/cli
```

## Usage

- `lingui extract` finds the messages in the source, merges them into one catalog per locale, keeps existing translations and marks removed messages as obsolete.
- `lingui compile` compiles the translated catalogs into JavaScript modules for the runtime and reports messages with invalid ICU syntax.
- `lingui extract-template` writes a single `.pot` template with the source messages, for translation platforms that create the locale files themselves.
- `lingui extract-experimental` follows the imports from each entry point instead of a glob, so a multi-page app gets one catalog per page.

Extraction parses JavaScript and TypeScript out of the box; Vue single-file components need [`@lingui/extractor-vue`][extractor-vue]. Catalogs are PO files by default, with [other formats][catalog-formats] available as separate packages. To let the bundler compile catalogs instead of running `lingui compile`, use [`@lingui/vite-plugin`][vite-plugin], [`@lingui/loader`][loader] or [`@lingui/metro-transformer`][metro-transformer].

See the [CLI reference][reference] for all commands and options.

## License

This package is licensed under the [MIT][license] license.

[license]: https://github.com/lingui/js-lingui/blob/main/LICENSE
[documentation]: https://lingui.dev
[installation]: https://lingui.dev/installation
[conf]: https://lingui.dev/ref/conf
[reference]: https://lingui.dev/ref/cli
[catalog-formats]: https://lingui.dev/ref/catalog-formats
[extractor-vue]: https://lingui.dev/ref/extractor-vue
[vite-plugin]: https://lingui.dev/ref/vite-plugin
[loader]: https://lingui.dev/ref/loader
[metro-transformer]: https://lingui.dev/ref/metro-transformer
[package]: https://www.npmjs.com/package/@lingui/cli
[badge-downloads]: https://img.shields.io/npm/dw/@lingui/cli.svg
[badge-version]: https://img.shields.io/npm/v/@lingui/cli.svg
[badge-license]: https://img.shields.io/npm/l/@lingui/cli.svg

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