Skip to main content

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.

Version

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.

CommandWhat it doesAPI key scope
loginLog this machine in from the browser, for 30 days.None
logoutSign this machine out.None
whoamiShow the login, its expiry and its workspaces.None
initSet up a project: write easyi18n.yaml and wire the stack.None offline; the login to link or create the project
doctorCheck the integration.read for the server checks
extractScan the code for tr() strings, offline.None
pushRegister tr() strings and translate them.translate
syncUpload a catalog file, translate, publish and write it back.translate, publish, read
pullDownload published files.read
statusCompare the last pull with the published version.read
applyRewrite tr() literals that source review corrected.read
rollbackRestore an earlier published version.publish
formats addEnable an output format.write
languages addAdd a target language.write
mcpRun 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.

OptionDefaultDescription
--config <path>easyi18n.yamlPath to the config file.
--jsonEmit structured JSON output when the command supports it.
--versionPrint the CLI version. It cannot be combined with a command.
-h, --helpPrint 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.

OptionDefaultDescription
--no-browserPrint 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.

OptionDefaultDescription
--stack <name>Detected, else flutterStack 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.comBackend origin.
--format <id>arbOutput format. The xcode, web, android and angular stacks pick their own when you leave it out.
--output <dir>lib/l10nDirectory to write files into.
--catalog <path>DetectedThe catalog file easyi18n sync uploads and writes back, for the xcode and web stacks.
--mode <a|b>Detected from l10n.yamla keeps your gen_l10n setup and writes only the config and .gitignore. b wires the Flutter SDK.
-f, --forceRewrite an existing easyi18n.yaml from the options.
--[no-]agentsOnWrite the easyi18n block into AGENTS.md, for coding agents without MCP. It never touches CLAUDE.md or .cursorrules.
--dry-runReport what would change without writing anything.
--createWith 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.
--ciWith 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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI 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>libDirectory 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.

OptionDefaultDescription
--source-dir <dir>libDirectory to scan, relative to the config file.
--fail-on-orphansExit 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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI 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>libDirectory to scan, relative to the config file.
--lang <code>All project languagesRestrict to these target languages. Repeat the option for several.
--max-credits <n>Stop if the estimate exceeds this many credits. Decimals are allowed.
--dry-runEstimate the cost without registering or translating anything.
-y, --yesSkip the confirmation prompt, for CI.
--pruneDrop orphaned strings from the lockfile. It never deletes translations.
--publishAfter pushing, wait for the AI translation to finish and publish a new version.
--approved-onlyWith --publish: treat unapproved translations as missing.
--require-completeWith --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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the translate, publish and read scopes.
--dry-runClassify and price the sync without writing anything.
-y, --yesSkip the confirmation prompt, for CI.
--max-credits <n>Stop if the estimated cost exceeds this many credits.
--no-publishUpload and translate, but do not publish or write the result back.
--require-completeFail when any key and language pair could not be translated.
--on-conflict <server|file>serverWhat 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.
--forceReplace 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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the read scope. Adopting a missing output format also needs write.
--version <id>LatestPublished version to pull, in the form YYYY.MM.DD.N.
--lang <code>All localesPull one locale only, for example es.
--require-completeExit with code 1 when any target language of the pulled version is missing translations. It needs mode: a in the config.
--dry-runList the files that would be written without writing them.
--watchKeep running and pull again whenever a new version is published. Stop it with Ctrl-C.
--interval <seconds>30Seconds between version checks with --watch. The minimum is 5.
--forceReplace 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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the read scope.

apply​

easyi18n apply [arguments]

Rewrites the tr() literals that source review corrected. Without --write it only previews the changes.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the read scope.
--source-dir <dir>libDirectory to scan and rewrite, relative to the config file.
--writeApply 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.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the publish scope.

formats add​

easyi18n formats add <id>

Enables an output format on the project without removing the others.

OptionDefaultDescription
--token <key>$EASYI18N_TOKENAPI key with the write scope.

See Enable output formats.

languages add​

easyi18n languages add <code>

Adds a target language to the project, or brings back one that was removed.

OptionDefaultDescription
--fill-mode <ai|manual>A new language gets ai; an existing one keeps its modeWhether AI translates the language. With manual, AI runs skip it and its translations come from the dashboard or your files.
--token <key>$EASYI18N_TOKENAPI 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.

OptionDescription
--require-agent-keyRequire 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.

OptionValuesDescription
--client <name>claude-code, claude-desktop, cursor, vscode, codex, gemini, windsurf, zed, genericThe MCP client to print the snippet for.
--runner <name>npx (default), dartHow 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-keyPrint 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.