UI
The x18n UI shows every key of a project across all locales, in one table. Translators and reviewers can edit values there, see where each key is used and copy translate prompts. The same UI runs in three ways:
| Mode | Started by | Writes files |
|---|---|---|
| Local server | x18n ui | Yes |
| Static report | x18n build | No |
| VS Code panel | "x18n: Open UI" in VS Code | Yes |
Start the local server
Run this command in the root of the project:
x18n uix18n UI at http://localhost:9999/
auth code 123456
or open http://localhost:9999/#devframe_otp=123456
MCP http://localhost:9999/__mcp
MCP token Authorization: Bearer <token>The command opens the browser with the auth link, so you are signed in with one click. A browser without the link asks for the 6-digit auth code from the terminal. The server keeps running until you stop it with Ctrl+C. It watches the files, so edits from the editor or the CLI show in the UI at once.
The last two lines are for agents: the server also serves MCP over HTTP at /__mcp.
| Option | Effect |
|---|---|
--port <port> | The port. The default is the first free port from 9999. |
--host <host> | The host to bind to. The default is localhost. |
--no-open | Do not open the browser. |
--no-auth | Turn authentication off. |
Do not use --no-auth on your computer. Anything that reaches the port can then edit your files. The option is for CI and end-to-end tests only, and the command prints a warning.
To open files from the UI in your editor, set LAUNCH_EDITOR, VISUAL or EDITOR before you start the server.
Pages
- Overview: the counts of keys, resources, usages and locales, the coverage per locale, the diagnostics per check, the detected presets and the recent changes.
- Keys: a table with one row per key and one column per locale. Search keys and values, and filter by namespace, by a locale that lacks the key, by unused keys or by keys with problems. Select a cell and press Enter to edit it. Use the arrow keys or
jandkto move, Esc to cancel,oto open the key, and/to search. - Key: the values of one key, its problems, and its usages with a few lines of code. "Open in editor" opens a usage in your editor. Each target locale has a button that copies a translate prompt for the key.
- Locale: the progress of one locale, its missing and empty keys, its placeholder and syntax problems, and a button that copies a translate prompt.
- Usages: keys used in code but not defined, unused keys, usages with a computed key, and every usage.
- Extract: the hard strings with a proposed key each. Edit the keys, untick the strings to skip, and extract the rest.
- Project: the presets, locale finders, formats and scanners, the problems x18n found, and the config with the origin of each value.
If an edit drops or adds a placeholder compared to the source value, the UI does not save it. It shows the problem, and you can save the value anyway.
Publish a static report
x18n build writes a static, read-only copy of the UI:
x18n build --out-dir dist/i18n-reportThe default output directory is .x18n/report. The report holds the state of the project at build time. Edit controls, prompts and "Open in editor" are not there.
The files use relative paths. Serve the directory from any static host and any path, for example GitHub Pages or the artifacts of a CI job. See CI.