AI agents
An AI coding agent can set up easyi18n in your repository, translate your
strings and publish them. With your login it spends and publishes as you;
with an agent key you approve every spend and every publish in the easyi18n
dashboard. The agent talks to easyi18n mcp, an MCP server that
ships inside the easyi18n CLI. Any client that can launch
a stdio MCP server works: Claude Code, Codex CLI, Cursor, VS Code, Gemini CLI,
Windsurf, Zed, Claude Desktop and others.
The CLI is published on npm as @easyi18n.com/cli, on
pub.dev and as prebuilt binaries;
Install the CLI compares them. In Claude Code, the
plugin installs the CLI for you.
Supported stacks
easyi18n splits each workflow into a core that works the same for every stack and one adapter per stack. What an agent can do depends on where your project keeps the truth about its strings.
| Family | Stack | Source of truth | Agent tools | Status |
|---|---|---|---|---|
| Code-first | Dart and Flutter with context.tr() | The tr() calls in your code | extract, push_preview, push, apply | CLI 0.12.0 |
| File-first | Xcode String Catalogs (.xcstrings) | The catalog file | sync_preview, sync | CLI 1.0.0 |
| File-first | Web apps with one JSON file per locale: Transloco, ngx-translate, i18next | The base-language file | sync_preview, sync | CLI 1.0.0 |
| File-first | Android apps with res/values/strings.xml | The base-language strings.xml | sync_preview, sync | CLI 1.0.0 |
| File-first | Angular apps with @angular/localize | The messages.json that ng extract-i18n writes | sync_preview, sync | CLI 1.2.0 |
| Pull-only | Flutter ARB (Mode A), and any app that reads flat or nested JSON, iOS .strings or gettext .po files | The easyi18n project | pull | CLI 0.12.0 |
A pull-only project gets its strings into easyi18n through the dashboard
import, and the agent downloads published versions with pull. The agent
cannot extract strings from JavaScript, TypeScript or gettext sources yet: in
a web app it moves them into the base-language file by hand, and gettext needs
its own adapter and is on the roadmap. An Android app keeps its strings in
res/values/strings.xml already, so there is nothing to extract. The setup
prompt stops on an unsupported stack instead of improvising one.
Three ways to connect an agent
| Layer | For | Page |
|---|---|---|
MCP server, easyi18n mcp | Any MCP client. Tools with typed results, the setup and translate prompts, and approval links | MCP server, Connect your AI |
AGENTS.md block written by init | Agents that read AGENTS.md and run shell commands, with or without MCP | AGENTS.md |
CLI with --json | Scripts, CI, and agents that call the CLI directly | CLI structured output |
Claude Code users can install the Claude Code plugin, which bundles the server, two skills and a setting for an agent key.
How an agent translates
Every stack runs the same loop:
preview -> authorize -> push | sync -> fill_status -> authorize -> publish -> pull
- The preview (
push_previeworsync_preview) is free. It reports how many strings need translation and the estimated credits. authorizeasks the easyi18n server for an operation with a credit maximum and returns anapproval_url. The agent shows it to you.- You open the link, check the scope and the maximum, and approve. The agent sees your answer within seconds, so you do not need to tell it in the chat. After 10 minutes without an answer it stops waiting and says so.
pushorsyncregisters the strings and queues the translation. The server never charges more than the approved maximum.fill_statuspolls until the translation is complete.- Publishing asks for a second approval, then
pullwrites the published files or catalog into your repository. In a web, Android or Angular project it writes the other languages and leaves the base-language file as it is.
A push or sync that costs nothing needs no approval.
Your login
On your own machine, the server works as you: run easyi18n login once in a
terminal and approve the code in your browser. The login lasts 30 days and
the server reads it on every call, so the agent spends credits, publishes and
rolls back as you would, without the approvals above. authorize answers
that no approval is needed and the agent goes on. easyi18n whoami shows the
login; easyi18n logout signs it out. The MCP server sends the login when
EASYI18N_TOKEN is unset, so the snippets in
Connect your AI carry no key by default.
Approvals and the agent key
For CI, or for an agent whose spending should wait for a person, give the
agent its own key and start the server with --require-agent-key. In the
dashboard, open your project's Settings → API keys → New API key, choose
the scopes, and set Used by to AI agent; easyi18n init --ci mints
one with your login. An agent key cannot spend credits, publish or roll back
without an operation that a person approved in the dashboard. The rule is
enforced by the server for the key itself, so it holds whether the key is
used by an MCP client, the CLI or a direct API call.
| The agent will | Scope |
|---|---|
| Read status, pull and run doctor | read |
| Preview and translate | translate |
| Publish and roll back | publish |
| Add languages | write |
A project owner or editor can approve a translation. A publish or rollback needs the owner, or an editor with publish permission. A viewer cannot approve. A pending approval expires after 30 minutes, and an approved publish or rollback must be used within 30 minutes.
The key goes in the MCP client's configuration as EASYI18N_TOKEN. Never paste
it into a chat: the server never takes it as a tool argument, and it redacts
key-shaped values from the text it returns.