About locli
locli is a localization CLI for coding agents that manages user-facing text across iOS, Android, web, and backend projects. It supports submitting new text, approving releases, and pulling approved translations, and includes an MCP server.
Key features
- 01Detect catalogs and create configuration
- 02Push missing text without overwriting existing content
- 03Pull approved translation releases
- 04Check missing translations and glossary issues
- 05Expose text-management MCP tools
Use cases
- 01Initialize localization for a multi-platform app
- 02Submit new text for translation and approval
- 03Sync approved translations into project files
MCP support
locli can run an MCP server over stdio, exposing tools for status, text search and addition, push, and pull.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @locli/cliLOCLI_TOKENSecretlocli API token (CI). Locally, run `npx @locli/cli login` instead.LOCLI_CONFIGPath to locli.json (default: nearest locli.json from the working directory).LOCLI_API_URLlocli server (default: https://locli.dev).Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
7Saved tool list · updated 1d ago
This tool takes no parameters.
Details
From the project README@locli/cli
Put your app's user-facing texts into locli: push new texts,
let a project owner approve a release, pull the approved translations. Built for
coding agents, works for any stack: iOS String Catalogs, Android strings.xml, and
JSON for web and backend. Node 18+, no dependencies.
npx @locli/cli init
init detects your text files and writes:
locli.jsonwith the project slug, source language and one target per catalog- a locli block in
AGENTS.md(and@AGENTS.mdin an existingCLAUDE.md) - the locli agent skill in
.agents/skills/locli/(linked from.claude/skills/locli/)
When you are logged in, init also creates the project with its languages and
platforms. It is safe to rerun.
Login
npx @locli/cli login
login opens the browser. You sign in, or create a free account, and approve the CLI.
The token is stored per server in ~/.config/locli/credentials.json, readable only by
you. In CI, set LOCLI_TOKEN instead. whoami shows the account; logout revokes the
token.
Workflow
- Add new keys to the source-language file, e.g.
receipt_import_titlewith a comment. npx @locli/cli pushuploads only what locli lacks. It never overwrites existing texts. New keys from a Git feature branch are grouped as a feature.- A project owner approves a release in the locli web app.
npx @locli/cli pullwrites the latest approved release into your files.
locli.json
{
"project": "example-app",
"sourceLanguage": "en",
"targets": [
{ "platform": "ios", "format": "xcstrings", "path": "App/Localizable.xcstrings" },
{ "platform": "android", "format": "android-xml", "path": "app/src/main/res" },
{ "platform": "web", "format": "json", "path": "messages/{locale}.json" }
]
}
Every target has platform (ios, android, web or backend), format and
path. Paths are relative to locli.json.
- Android targets take an optional
file; the default isstrings.xml. - JSON targets need
{locale}in the path and take an optionalkeyPrefix. apiURLis optional; the default ishttps://locli.dev.
The JSON schema is shipped as @locli/cli/schema/locli.json.
Commands
| Command | Effect |
|---|---|
login [--no-browser] / logout / whoami [--json] | Approve the CLI in the browser; revoke the token; show the account |
init [--name] [--slug] [--source LANG] [--target platform:format:path]… [--yes] [--no-agent-files] | Detect catalogs, write the config and agent files, create the project |
push [--dry-run] [--branch B] [--target platform] | Upload missing keys and values; never overwrites |
pull [--draft] [--release NAME] [--target platform] | Write the latest approved (or named) release |
status [--json] | Show languages, missing translations, open features, unreleased changes and glossary issues |
areas [--feature NAME] [--json] | List feature areas, or find the area a new feature's texts belong to |
guide [--json] [--set FILE] | Show the translation guide (tone, glossary) and the texts that break it; --set replaces it |
mcp | Start the MCP server on stdio |
Every command takes --api-url, --config and --help. Exit codes: 0 ok, 1 error,
2 usage error.
Environment variables:
LOCLI_TOKEN: the API token in CI.LOCLI_API_URL: the server.LOCLI_CONFIG: the path tolocli.json.LOCLI_BRANCH: overrides the detected branch.
MCP server
The MCP server provides seven tools:
locli_statuslocli_areaslocli_guidelocli_find_textslocli_add_textslocli_pushlocli_pull
Claude Code: install the plugin (skill and MCP server in one), or add only the MCP server:
/plugin marketplace add mariohahn/locli
/plugin install locli@locli
claude mcp add --scope project locli -- npx -y @locli/cli mcp
Cursor (.cursor/mcp.json) and other clients that use mcpServers:
{ "mcpServers": { "locli": { "command": "npx", "args": ["-y", "@locli/cli", "mcp"] } } }
Codex (~/.codex/config.toml):
[mcp_servers.locli]
command = "npx"
args = ["-y", "@locli/cli", "mcp"]
Known limits
- Android strings with markup (
<b>,<a>…) are skipped on push and left alone on pull. - JSON: only a top-level ICU plural on
countorargNbecomes a plural key. Other ICU messages are pushed as plain text. - JSON: non-string values are skipped with a warning.
Agent guide: https://locli.dev/docs/agents.md · License: MIT
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.