Command reference
Every command of the easyi18n CLI with its options, as --help prints
them. For the workflows these commands belong to, start with the
CLI overview.
This reference comes from the --help output of CLI 1.2.0. CLI 1.1.0 and
earlier have no login, logout or whoami, no init --create,
--languages, --base or --ci, no mcp config --agent-key and no
mcp --require-agent-key; their other commands and options are the same.
Run easyi18n <command> --help to see what your installed version accepts.
| Command | What it does | API key scope |
|---|---|---|
login | Log this machine in from the browser, for 30 days. | None |
logout | Sign this machine out. | None |
whoami | Show the login, its expiry and its workspaces. | None |
init | Set up a project: write easyi18n.yaml and wire the stack. | None offline; the login to link or create the project |
doctor | Check the integration. | read for the server checks |
extract | Scan the code for tr() strings, offline. | None |
push | Register tr() strings and translate them. | translate |
sync | Upload a catalog file, translate, publish and write it back. | translate, publish, read |
pull | Download published files. | read |
status | Compare the last pull with the published version. | read |
apply | Rewrite tr() literals that source review corrected. | read |
rollback | Restore an earlier published version. | publish |
formats add | Enable an output format. | write |
languages add | Add a target language. | write |
mcp | Run the MCP server for an AI agent. | Depends on the tools the agent calls |
Commands that call the server read the credential from --token, else from
the EASYI18N_TOKEN environment variable, else from the login that
easyi18n login stored for the base URL of the call. A login works
as you, with your role in each workspace, so the scopes in the table apply to
API keys only.
Global options
Global options go before the command: easyi18n --json status.
| Option | Default | Description |
|---|---|---|
--config <path> | easyi18n.yaml | Path to the config file. |
--json | Emit structured JSON output when the command supports it. | |
--version | Print the CLI version. It cannot be combined with a command. | |
-h, --help | Print usage. easyi18n help <command> and easyi18n <command> --help print the same text. |
--json is supported by every command on this page except a bare
easyi18n mcp, which is a server and not a batch command. pull --watch
refuses it. An unknown option or a refused value exits with code 64; with
--json the error is a JSON record whose code is usage_error. Structured output describes
the error record.
login
easyi18n login [arguments]
Logs this machine in as you. It opens the approval page in your browser with
a code in the URL; you confirm the device there, and the CLI keeps the login
for 30 days in credentials.json, readable by you alone, under
$XDG_CONFIG_HOME/easyi18n/, else ~/.config/easyi18n/, and
%APPDATA%\easyi18n\ on Windows. Every command then sends that login when
neither --token nor EASYI18N_TOKEN names a credential. An account holds
up to 10 logins; a second login on the same machine replaces the first.
| Option | Default | Description |
|---|---|---|
--no-browser | Print the page and the code instead of opening a browser, for a machine without one. |
--json prints {email, base_url, expires_at}, never the token. The login
is tied to the base URL the other commands call: production, a loopback
address or exactly EASYI18N_BASE_URL.
logout
easyi18n logout
Signs the login of this base URL out on the server and forgets it on this
machine, also when the server cannot be reached. It says which base URL it
signed out of, and whether there was a login to remove. --json prints
{base_url, removed, revoked}.
whoami
easyi18n whoami
Shows who this machine is logged in as, until when, and the workspaces the
login can reach, with your role in each and their projects. It asks the server
whether the login still works: a login the server refuses exits with 1. A
server it cannot reach leaves what this machine stored, with a warning and
exit 0. When EASYI18N_TOKEN is set it says so, since the variable wins over
the login. With no login it exits with 1 and not_logged_in; with an expired
one, login_expired.
--json prints {logged_in, email, base_url, expires_at, uses_env_token, valid, workspaces}. valid is null when the server could not be asked.
init
easyi18n init [arguments]
Sets up the project in the current directory for easyi18n. With
--workspace and --project, --project-id, or EASYI18N_TOKEN set, it
needs no credential and does not call the server. With your login and no
project ref, it sets the project up on the server first: it lists your
workspaces, links a project or creates one, adds the target languages the
project lacks, enables the output format of the stack, then writes
easyi18n.yaml. In a terminal it asks; without one, the options below make
the same choices. On a Free workspace that already has 3 projects it shows the
server's message, names Workspace > Billing and offers to link a project
instead.
| Option | Default | Description |
|---|---|---|
--stack <name> | Detected, else flutter | Stack adapter: flutter, xcode, web, android or angular, or auto to detect it and refuse a project it does not recognize. Left out, init sets up the stack doctor checks: the one it detects, else the one an existing easyi18n.yaml declares, else flutter. CLI 1.1.0 and earlier set up flutter whenever --stack was left out. android needs CLI 1.0.0 or later, and angular CLI 1.2.0 or later. |
--workspace <handle> | The workspace handle, the @handle segment of your project URL. Use with --project. | |
--project <slug> | The project slug. Use with --workspace. | |
--project-id <id> | The project ID, instead of --workspace and --project. | |
--base-url <url> | https://api.easyi18n.com | Backend origin. |
--format <id> | arb | Output format. The xcode, web, android and angular stacks pick their own when you leave it out. |
--output <dir> | lib/l10n | Directory to write files into. |
--catalog <path> | Detected | The catalog file easyi18n sync uploads and writes back, for the xcode and web stacks. |
--mode <a|b> | Detected from l10n.yaml | a keeps your gen_l10n setup and writes only the config and .gitignore. b wires the Flutter SDK. |
-f, --force | Rewrite an existing easyi18n.yaml from the options. | |
--[no-]agents | On | Write the easyi18n block into AGENTS.md, for coding agents without MCP. It never touches CLAUDE.md or .cursorrules. |
--dry-run | Report what would change without writing anything. | |
--create | With your login: create the project --project names, or one named after the directory, when it does not exist. | |
--languages <codes> | With your login: target languages to add, comma-separated (es,fr). | |
--base <code> | The base language of a project init creates, when the tree does not declare one. | |
--ci | With your login: mint an API key for CI on this project, print it once with the gh secret set EASYI18N_TOKEN line. |
See Configure a project.
doctor
easyi18n doctor [arguments]
Checks the config, the platform wiring, the ICU syntax of your strings and
the published translations against your tr() calls. It spends no credits
and exits with code 1 when it finds a blocking problem.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the read scope. Reads the published coverage of a Mode A project and the project languages of a web project. |
--source-dir <dir> | lib | Directory to scan for tr() calls, relative to the config file. |
See Diagnose and maintain an integration.
extract
easyi18n extract [arguments]
Scans the source tree for tr() strings and reports them against
easyi18n.lock. It works offline and needs no API key.
| Option | Default | Description |
|---|---|---|
--source-dir <dir> | lib | Directory to scan, relative to the config file. |
--fail-on-orphans | Exit with code 1 if the lockfile has strings that are no longer in the code. |
push
easyi18n push [arguments]
Extracts tr() strings, registers them and starts their translation.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the translate scope. --publish also needs publish. In Mode A, --publish needs read too, and write to adopt a missing output format. |
--source-dir <dir> | lib | Directory to scan, relative to the config file. |
--lang <code> | All project languages | Restrict to these target languages. Repeat the option for several. |
--max-credits <n> | Stop if the estimate exceeds this many credits. Decimals are allowed. | |
--dry-run | Estimate the cost without registering or translating anything. | |
-y, --yes | Skip the confirmation prompt, for CI. | |
--prune | Drop orphaned strings from the lockfile. It never deletes translations. | |
--publish | After pushing, wait for the AI translation to finish and publish a new version. | |
--approved-only | With --publish: treat unapproved translations as missing. | |
--require-complete | With --publish: fail before publishing when extracted strings remain untranslated after the retries, or when the scan finds no strings. |
See Push strings from the Flutter runtime SDK.
sync
easyi18n sync [arguments]
Syncs the local translation catalog: uploads it, translates what changed, publishes and writes the result back.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the translate, publish and read scopes. |
--dry-run | Classify and price the sync without writing anything. | |
-y, --yes | Skip the confirmation prompt, for CI. | |
--max-credits <n> | Stop if the estimated cost exceeds this many credits. | |
--no-publish | Upload and translate, but do not publish or write the result back. | |
--require-complete | Fail when any key and language pair could not be translated. | |
--on-conflict <server|file> | server | What to do when the catalog carries an older text than the project. server keeps the project's text and reports the row. file imports the catalog's text over it, including over a corrected source. |
--force | Replace a locale file that changed since the pull that wrote it. Without it, such a file stops the sync before it uploads. |
See Sync an Xcode String Catalog, Sync a web project with JSON catalogs, Sync an Angular app and Sync an Android app.
pull
easyi18n pull [arguments]
Downloads the translated files of a published version and writes them to disk.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the read scope. Adopting a missing output format also needs write. |
--version <id> | Latest | Published version to pull, in the form YYYY.MM.DD.N. |
--lang <code> | All locales | Pull one locale only, for example es. |
--require-complete | Exit with code 1 when any target language of the pulled version is missing translations. It needs mode: a in the config. | |
--dry-run | List the files that would be written without writing them. | |
--watch | Keep running and pull again whenever a new version is published. Stop it with Ctrl-C. | |
--interval <seconds> | 30 | Seconds between version checks with --watch. The minimum is 5. |
--force | Replace a file that changed since the pull that wrote it. Without it, such a file stops the pull before anything is written. |
See Pull published files and Check completeness in CI.
status
easyi18n status [arguments]
Shows whether the local translations are up to date with the server. It exits with code 1 when the project has never been published, has never been pulled, or is behind.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the read scope. |
apply
easyi18n apply [arguments]
Rewrites the tr() literals that source review corrected. Without
--write it only previews the changes.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the read scope. |
--source-dir <dir> | lib | Directory to scan and rewrite, relative to the config file. |
--write | Apply the rewrites to disk. |
rollback
easyi18n rollback [version]
Restores an earlier published version as a new version. Without an argument it restores the one before the current version.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the publish scope. |
formats add
easyi18n formats add <id>
Enables an output format on the project without removing the others.
| Option | Default | Description |
|---|---|---|
--token <key> | $EASYI18N_TOKEN | API key with the write scope. |
languages add
easyi18n languages add <code>
Adds a target language to the project, or brings back one that was removed.
| Option | Default | Description |
|---|---|---|
--fill-mode <ai|manual> | A new language gets ai; an existing one keeps its mode | Whether AI translates the language. With manual, AI runs skip it and its translations come from the dashboard or your files. |
--token <key> | $EASYI18N_TOKEN | API key with the write scope. |
mcp
easyi18n mcp [arguments]
easyi18n mcp config [arguments]
easyi18n mcp runs the MCP server on standard input and output, for an AI
agent to drive. An MCP client starts it; you do not run it by hand.
AI agents covers the tools it exposes. The server sends
the login of this machine when EASYI18N_TOKEN is unset, blank or the
eik_YOUR_AGENT_KEY placeholder, and reads it on every call, so a login or
logout in another terminal needs no restart of the client.
| Option | Description |
|---|---|
--require-agent-key | Require an API key in EASYI18N_TOKEN and disable the login. The server refuses to start with a missing key or the placeholder. For CI, or an agent whose spending should wait for an approval. |
easyi18n mcp config prints the snippet that registers the server in an AI
client.
| Option | Values | Description |
|---|---|---|
--client <name> | claude-code, claude-desktop, cursor, vscode, codex, gemini, windsurf, zed, generic | The MCP client to print the snippet for. |
--runner <name> | npx (default), dart | How the client starts the CLI. npx uses the npm package @easyi18n.com/cli and needs Node, not Dart. dart uses the package installed with dart pub global activate easyi18n_cli. |
--agent-key | Print the form that sends an agent key (eik_) from EASYI18N_TOKEN, with mcp --require-agent-key. Left out, the snippet carries no key and the server sends your login. |