Architecture
There is one engine. Everything else is a way of reaching it.
One Engine, Five Surfaces
| Surface | Package | Who invokes it |
|---|---|---|
| CLI | @the-i18n-kit/cli | You, in a terminal |
| MCP server | @the-i18n-kit/mcp | Your AI agent, over the Model Context Protocol |
| Nuxt module | @the-i18n-kit/nuxt | Nuxt, at prepare / dev / build |
| ESLint plugin | @the-i18n-kit/eslint-plugin-vue | ESLint, in your editor and in lint runs |
| CI integrations | GitHub Action, GitLab CI templates | Your pipeline |
The engine lives in @the-i18n-kit/cli, which ships both the the-i18n-cli
binary and the library behind it. Before any command or tool runs, every surface
resolves the same project model: an adapter
detects the framework, reads the locales and locale
directories your project already declares, and builds the layer graph from them.
@the-i18n-kit/mcp depends on @the-i18n-kit/cli and calls the same functions
the commands call, so a count your agent reports and a count you get in the
terminal are the same number.
@the-i18n-kit/mcp and @the-i18n-kit/cli to matching versions, or install
neither globally. A globally installed CLI of another version puts two engine
versions on one machine.Command and Tool Names
A command you learn in the terminal tells you what to ask your agent for, and a tool your agent used tells you what to type.
| Operation | CLI command | MCP tool |
|---|---|---|
| Project setup, layers and layer graph | discover | discover |
| Read specific keys | get | get_translations |
| Write exact values | write | write_translations |
| Missing translations | missing | get_missing_translations |
| Coverage per locale and layer, and empty values | status (--listEmpty) | get_translation_status (listEmpty) |
| Search keys and values | search | search_translations |
| Delete keys | remove | remove_translations |
| Move a key to another layer, another path, or both | move | move_translation_key |
| Fill missing locales | translate | translate_missing |
| Refresh one key | translate-key | translate_key |
| Orphan keys, and where keys are used | orphans (--remove, --usages) | find_orphan_keys (remove) |
| Used but undefined | check | find_undefined_keys |
| Shadowed keys across layers | find-duplicates | find_duplicate_keys |
| Add a locale | scaffold | scaffold_locale |
The MCP tool translate_missing pairs with the CLI command translate: one
operation, named for what it does on each surface.
The pairing is nearly total. One command is terminal-side only — init, which
writes a .i18n-mcp.json from framework detection, and has no agent that needs
it. One tool has no command — list_namespaces, which browses the key tree an
agent cannot see. Everything else pairs, and where the names differ the table
above is the mapping.
The Other Surfaces
@the-i18n-kit/nuxt writes the layer graph and locale
table Nuxt resolved to .nuxt/i18n-kit.json, and the CLI reads that in
preference to hand-written config. The GitHub Action and
the GitLab CI templates run the same binary you run locally
and decide job outcomes from its
exit code, never by parsing counts out of the
JSON result.