
Lokalise CLI v2
CLILokalise 官方命令行(lokalise2),覆盖 Lokalise API v2:上传和下载语言文件,管理词条、译文、截图、翻译任务与贡献者,方便把翻译进度同步到项目里。需要 Lokalise 账号(付费服务,可免费试用 14 天),在个人资料页生成 API Token 后用 --token 传入。
Lokalise CLI v2
Getting started
Lokalise CLI v2 allows you to manipulate any object or data in your Lokalise workspace, which includes files, projects, keys, translations, comments, contributors, teams and more.
Whats new in v2?
This version of CLI tool has been completely rebuilt from scratch and is not compatible with the v1 CLI command syntax. Instead of being just an upload/download tool this release supports all Lokalise API v2 endpoints.
Installation
Get the binaries for your platform, unarchive and put into any executable folder. All set!
MacOS
Install using Homebrew:
brew tap lokalise/cli-2
brew install lokalise2
Direct download:
Linux
Get the binaries (including for Raspberry Pi) using our installer script:
curl -sfL https://raw.githubusercontent.com/lokalise/lokalise-cli-2-go/master/install.sh | sh
Direct download:
FreeBSD
Windows
Install using scoop:
scoop bucket add extras
scoop install lokalise2
Direct download:
Docker
Docker image could be downloaded from the following registries:
Tokens
All endpoints require the --token parameter. You can generate your API token in Personal profile. Note, the token is personal and mimics your access level on team and project level. If you require a user-independent API token, create a separate user in your team (e.g. API user), set proper access rights and use this user's token.
Passing the flags
Boolean
All boolean flags must be passed via the = sign, i.e. --original-filenames=false.
Strings
Flags of type strings should be comma-delimited, i.e. --include-tags=one,two.
JSON objects
Some flags require a JSON-encoded object passed as string, i.e. --languages='[{"lang_iso":"en","custom_iso":"en-us"},{"lang_iso":"en_GB","custom_iso":"en-gb"}]'. There is an online tool to help you with the escaping.
Usage
Run lokalise2 --help from the terminal to see the list of commands and subcommands. Run lokalise2 command subcommand --help to see the help page.
Commands
- lokalise2 branch - Manage branches
- lokalise2 comment - Manage key comments
- lokalise2 contributor - Manage project contributors
- lokalise2 file - Upload and download files
- lokalise2 key - Manage keys
- lokalise2 language - Manage languages
- lokalise2 order - Manage orders
- lokalise2 payment-card - Manage payment cards
- lokalise2 project - Manage projects
- lokalise2 queued-process - Manage queued processes
- lokalise2 screenshot - Manage screenshots
- lokalise2 snapshot - Manage snapshots
- lokalise2 task - Manage tasks
- lokalise2 team - List teams
- lokalise2 team-user - Manage team users
- lokalise2 team-user-group - Manage team user groups
- lokalise2 translation - Manage translations
- lokalise2 translation-provider - List translation providers
- lokalise2 translation-status - Manage custom translation statuses
- lokalise2 webhook - Manage webhooks
Examples
Download files from Lokalise
lokalise2 \
--token <token> \
--project-id <project_id> \
file download \
--format json \
--unzip-to ./locales
Upload a file to Lokalise
lokalise2 \
--token <token> \
--project-id <project_id> \
file upload \
--file /tmp/en.json \
--lang-iso en
Branches
If you are using project branching feature in Lokalise, simply add branch name separated by semicolon to the project ID in any command to access the branch, i.e. 3002780358964f9bab5a92.87762498:feature/new-release.
Config file
Optionally, you may rename included config-example.yml to config.yml and set various CLI tool parameters like token or timeouts. You can specify a config file location using --config parameter.
Output and sensitive data
file download never prints the bundle URL: the URL is pre-signed, so anyone who holds it can download your files while it is valid. Use --json-only if you need the URL; it prints the API response, which includes bundle_url. Make sure that output does not end up in shared or retained logs.
Use the global --quiet (-q) flag, or quiet: true in the config file, to suppress progress messages such as Downloading bundle.... Command results (JSON) and errors are still printed.
The debug config option logs full API requests and responses. The X-Api-Token header is redacted, but responses are logged as-is, including pre-signed bundle URLs. Treat debug output as sensitive and do not enable it in CI or anywhere logs are retained or shared.
Rate limits
Access to all endpoints is limited to 6 requests per second from 14 September, 2021. This limit is applied per API token and per IP address. If you exceed the limit, a 429 HTTP status code will be returned and the corresponding exception will be raised that you should handle properly. To handle such errors, we recommend an exponential backoff mechanism with a limited number of retries.
Only one concurrent request per token is allowed.
How to bump go-lokalise-api version?
- modify
go.modfile around linegithub.com/lokalise/go-lokalise-api/v4 v4.1.6by changing version on the end - use
go mod tidycommand to updatego.sumwith new version - remember to commit
go.modandgo.sumtogether
Release new version
- if you updated
go-lokalise-apias well, follow steps from above - update version number in
root.go - update
README.mdchangelog - merge changes to
mainbranch - release should happen automatically
Changes
3.2.0 (Unreleased)
- Breaking (output):
file downloadno longer prints the pre-signed bundle URL. TheDownloading <url>...(sync) andDownloading file: <url>(async) lines are replaced byDownloading bundle (<size>).... Scripts that parse those lines to get the URL will break: use--json-onlyto get the API response withbundle_urlinstead. - Added the global
--quiet(-q) flag (orquiet: truein the config) to suppress progress messages file downloadnow fails with a clear error when the bundle request returns a non-2xx status, instead of trying to unzip the error response- Bundle download errors no longer include the bundle URL
- Documented that
debugoutput is sensitive - Bumped
go-lokalise-apito v5.1.1: theX-Api-Tokenheader is now redacted indebugoutput
3.1.5 (Jul 13, 2026)
- Fixed
detailsobject empty when retrieving a process for an uploaded file - Bumped
go-lokalise-apito v5.1.0
3.1.4 (May 13, 2025)
- Improved speed for async export status check
3.1.3 (Apr 16, 2025)
- Fixed empty object returned with key/translation lists endpoint
3.1.2 (Mar 26, 2025)
- Added warning for
file downloadsync command when 'X-Response-Too-Big' header is present - Added error message from process when
file download --asyncfails
3.1.1 (Mar 13, 2025)
- Fixed issue with too long filename during async download.
3.1.0 (Mar 12, 2025)
- Added support for async file download.
3.0.0 (Jun 04, 2024)
- Upgraded lokalise-go-api to v4, which includes breaking changes
- Added support for cursor based pagination for Keys and Translations endpoints
2.6.14 (May 29, 2024)
- Fix module versioning
2.6.13 (May 29, 2024)
- Add GH action for automated full gorelease process
2.6.12 (May 22, 2024)
- Add GH action automated release process
2.6.11 (May 21, 2024)
- Fix versioning issues
2.6.10 (Oct 03, 2023)
- Fix binary paths for goreleaser
2.6.9 (Oct 03, 2023)
- Updated Lokalise GO SDK to v3.4.0
- Upgraded Go to v1.21
- Upgraded Docker images to Alpine 3.18
- Multi arch Docker images
2.6.8 (Oct 21, 2021)
- Updated Lokalise GO SDK to v3.2.0
2.6.7 (Jul 27, 2021)
- Added binaries for Apple M1
- Fixed release automation configuration
- Upgraded Go to v1.16
2.6.6 (Jul 12, 2021)
- Fixed
--key-nameparameter being optional for key update - Updated documentation link to supported file formats
2.6.5 (Jul 12, 2021)
- Added note for file download
--disable-referencesflag
2.6.4 (Mar 15, 2021)
- Fixed file upload poll for project branch
2.6.3 (Dec 21, 2020)
- Added
--branchflag for webhook create and update actions
2.6.2 (Nov 23, 2020)
- Added
--use-automationsflag to file upload, create keys and bulk update
2.6.1 (October 28, 2020)
- Fixed file path detection for file upload action
2.6.0 (August 5, 2020)
- Added BSD-Clause-3 license
2.5.2 (July 28, 2020)
- Added
--skip-detect-lang-isoflag for file upload action
2.5.1 (May 28, 2020)
- Fix flag naming typo for file upload
- Changed
--poolto--poll - Changed
--pool-timeoutto--poll
- Changed
2.5.0 (May 28, 2020)
- Added queued process commands
- Changed file upload to use queued processing
- Added
--poolflag to obtain the upload result - Added
--pool-timeoutflag to configure the upload pooling maximum duration - Changed
--convert-placeholdersdefault value totrue
- Added
2.3.1 (April 30, 2020)
Added --custom-translation-status-ids flag for file upload action, along with --custom-translation-status-inserted-keys, --custom-translation-status-skipped-keys and --custom-translation-status-updated-keys flags
2.3.0 (February 26, 2020)
Added --hidden-from-contributors flag for file upload action
2.2.3 (February 7, 2020)
Added better description for boolean flags
2.2.2 (January 27, 2020)
Changed upper case in archive names. Removed README.md from binary archives
2.2.1 (January 17, 2020)
Fixes:
--project-idhasn't been processed correctly
2.2.0 (January 16, 2020)
Added possibility to specify a configuration file with a --config flag
2.1.0 (November 25, 2019)
Updated go-lokalise-api library version, bug fixes, switched binary building to goreleaser
2.03 (October 22, 2019)
Endpoint parameter fixes.
2.00 (October 15, 2019)
Initial release.
相關資源

Lingo.dev CLI
CLILingo.dev 官方命令行:lingo push 把仓库里的 JSON、YAML、Markdown、PO、XLIFF、Android/Xcode 字符串等文件发给平台上的大模型本地化引擎翻译,lingo pull 取回译文,可接入 CI。需 Lingo.dev 账号,按量计费,有免费沙箱。
lingodotdev/lingo.dev5.4k
Languine
CLIAI 本地化工具:先把服务端一键部署到自己的 Vercel 账号(自动配好 Postgres 与 AI Gateway,部署后需开启部署保护),再在项目里运行 npx languine@selfhosted translate,用大模型把应用的语言文件翻译成多个语种,也提供自动提 PR 的 GitHub Action。需要 Vercel 账号与 Node.js。
languine-ai/languine2k
attranslate
CLI面向编码 agent 的离线翻译同步工具:只把 JSON、YAML、PO、CSV 等多语言文件里新增的文案交给 agent 翻译,不覆盖人工改过的译文,省 token。适合译员与开发协作维护软件译文;需要 Node.js,本身不调用翻译 API。
fkirc/attranslate353
Crowdin CLI
CLICrowdin 官方命令行:把待翻译的源文件上传到 Crowdin,再把译文下载回原位置,还能查看翻译进度、管理术语表与翻译记忆、触发机器或 AI 预翻译,支持 JSON 输出便于 agent 解析。需要 Crowdin 账号(可免费试用,开源项目可申请免费授权)与个人访问令牌,crowdin init 会引导生成配置文件。
crowdin/crowdin-cli325
SimpleLocalize CLI
CLISimpleLocalize 官方命令行:上传、下载多语言翻译文件,一键发起机器翻译与 AI 自动翻译,把译文发布到 CDN 托管,还能从源码中抽取待翻译的文案键,适合放进 CI 自动跑本地化流程。需要 SimpleLocalize 账号与项目 API Key,平台为付费服务,可免费试用 14 天。
simplelocalize/simplelocalize-cli81
locize-cli
CLILocize 官方命令行:在本地多语言文件与 Locize 翻译平台之间同步,增删查翻译条目、下载已发布译文、管理版本与分支,可导出 JSON、XLIFF、PO、CSV、Excel 等格式交给译员处理。需要 Locize 账号、项目 ID 与 API Key,有免费套餐。
locize/locize-cli71