{"id":13902572,"url":"https://github.com/robrechtme/loco-cli","last_synced_at":"2026-02-05T12:12:51.541Z","repository":{"id":37981084,"uuid":"432979747","full_name":"robrechtme/loco-cli","owner":"robrechtme","description":"🌍 CLI tool for uploading/downloading assets from Loco.","archived":false,"fork":false,"pushed_at":"2024-11-13T16:42:57.000Z","size":304,"stargazers_count":19,"open_issues_count":3,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-28T21:49:12.108Z","etag":null,"topics":["i18n","localize","loco"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robrechtme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-29T09:29:19.000Z","updated_at":"2025-01-07T11:10:44.000Z","dependencies_parsed_at":"2024-05-07T13:27:43.330Z","dependency_job_id":"e391874c-895e-4865-a656-9938fbae6cfc","html_url":"https://github.com/robrechtme/loco-cli","commit_stats":{"total_commits":73,"total_committers":11,"mean_commits":6.636363636363637,"dds":"0.23287671232876717","last_synced_commit":"7cad3b52f340b7669360940e194542e0df4e39f5"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/robrechtme/loco-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrechtme%2Floco-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrechtme%2Floco-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrechtme%2Floco-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrechtme%2Floco-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robrechtme","download_url":"https://codeload.github.com/robrechtme/loco-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robrechtme%2Floco-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29121685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T10:47:47.471Z","status":"ssl_error","status_checked_at":"2026-02-05T10:45:08.119Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["i18n","localize","loco"],"created_at":"2024-08-06T22:01:13.375Z","updated_at":"2026-02-05T12:12:51.532Z","avatar_url":"https://github.com/robrechtme.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cbr /\u003e\n  \u003cimg src=\"logo.svg\" height=\"70\"\u003e\n  \u003cbr /\u003e\n  \u003cbr /\u003e\n  \u003ch3 align=\"center\"\u003eloco-cli\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n\nAutomatically sync your project translations with [Loco](https://localise.biz).\n\n[![npm](https://img.shields.io/npm/v/loco-cli)](https://www.npmjs.com/package/loco-cli)\n![Dependencies](https://img.shields.io/librariesio/release/npm/loco-cli)\n[![GitHub Issues](https://img.shields.io/github/issues/robrechtme/loco-cli.svg)](https://github.com/robrechtme/loco-cli/issues)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://github.com/robrechtme/loco-cli/issues\"\u003eReport Bug\u003c/a\u003e\n·\n\u003ca href=\"https://github.com/robrechtme/loco-cli/issues\"\u003eRequest Feature\u003c/a\u003e\n\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## About\n\nThe **Loco CLI** helps you keep your translations bundled in your app/website in sync with [Loco](https://localise.biz).\n\n\u003e Looking for a Python alternative? Try [marten-cz/loco-cli](https://github.com/marten-cz/loco-cli)!\n\n## Getting Started\n\n```\nnpx loco-cli --help\n```\n\nLoco CLI currently has three methods, which are very similar to git commands:\n\n- `loco-cli push`: push translations to Loco.\n- `loco-cli pull`: download all translations.\n- `loco-cli status`: see which translations are not yet uploaded/downloaded.\n\nThe Loco CLI assumes your translations are stored as **JSON** files, one for each language.\n\n```\n[locales folder]\n ├── en.json\n ├── es.json\n └── fr.json\n```\n\nThe keys in the files are asset ID's, and the values are translations. Nested JSON structures produce dottet asset ID's:\n\n```jsonc\n{\n  \"home\": {\n    \"title\": \"Welcome back, {{name}}\" // Asset ID: `home.title`\n  }\n}\n```\n\n### Configuration\n\nGlobal options are passed as options in the terminal or read from a `loco.config.js` file (recommended) or a `.locorc.{yaml,json,js}` file:\n\n```js\n// loco.config.js\n/** @type {import('loco-cli/types').Config} */\nmodule.exports = {\n  accessKey: '\u003cloco-full-access-key\u003e',\n  localesDir: 'src/app/i18n/locales',\n  namespaces: false,\n  push: {\n    'flag-new': 'provisional',\n    'tag-new': process.env.npm_package_version,\n    'delete-absent': false\n  }\n};\n```\n\n| Config key | CLI flag                     | Type          | Description                                                                                                                                                                                                                        |\n| ---------- | ---------------------------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| accessKey  | `-a`, `--access-key \u003ckey\u003e`   | `string`      | The API key of the Loco project you wish to sync to/from. You can find this in the Loco project under `Developer Tools › API Keys › Full Access Key` (if you do not intend to use `loco-cli push`, an `Export key` will work too). |\n| localesDir | `-d`, `--locales-dir \u003cpath\u003e` | `string`      | The folder in which the JSON translation files are stored (defaults to current working dir).                                                                                                                                       |\n| namespaces | `-N`, `--namespaces`         | `boolean`     | Organize translations into namespaces (default: `false`). Set this flag to `true` when dividing translations into multiple files. The uploaded asset ID's will be prefixed with `\u003cnamespace\u003e:`.                                    |\n| maxFiles   | `-m`, `--max-files \u003cnumber\u003e` | `number`      | Maximum number of modified files to display in diff outputs (default: `20`).                                                                                                                                                       |\n| push       | -                            | `PushOptions` | Loco API options used for `loco-cli push`. (https://localise.biz/api/docs/import/import)                                                                                                                                           |\n| pull       | -                            | `PullOptions` | Loco API options used for `loco-cli pull`. (https://localise.biz/api/docs/export/exportall)                                                                                                                                        |\n\n\u003cdetails\u003e\n\u003csummary\u003ePushOptions\u003c/summary\u003e\n\u003cbr\u003e\n\n- `ignore-new`: Specify that new assets will NOT be added to the project.\n- `ignore-existing`: Specify that existing assets encountered in the file will NOT be updated.\n- `tag-new`: Tag any NEW assets added during the import with the given tags (comma separated).\n- `tag-all`: Tag ALL assets in the file with the given tags (comma separated).\n- `untag-all`: Remove existing tags from any assets matched in the imported file (comma separated).\n- `tag-updated`: Tag existing assets that are MODIFIED by this import.\n- `untag-updated`: Remove existing tags from assets that are MODIFIED during import.\n- `tag-absent`: Tag existing assets in the project that are NOT found in the imported file.\n- `untag-absent`: Remove existing tags from assets NOT found in the imported file.\n- `delete-absent`: Permanently DELETES project assets NOT found in the file (use with extreme caution).\n- `flag-new`: Set this flag on any NEW (non-empty) translations imported into the current locale.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePullOptions\n\u003c/summary\u003e\n\u003cbr\u003e\n\n- `filter`: Filter assets by comma-separated tag names. Match any tag with `*` and negate tags by prefixing with `!`.\n- `fallback`: Fallback locale for untranslated assets, specified as short code. e.g. en or en_GB.\n- `order`: Export translations according to asset order.\n- `status`: Export translations with a specific status or flag. Negate values by prefixing with !. e.g. \"translated\", or \"!fuzzy\".\n- `charset`: Specify preferred character encoding. Alternative to Accept-Charset header but accepts a single value which must be valid.\n- `breaks`: Force platform-specific line-endings. Default is Unix (LF) breaks.\n\u003c/details\u003e\n\n## Usage\n\n### `loco-cli status`\n\nCheck the diff between local and remote translations.\n\n#### Options\n\n- `--direction [remote|local|both]`: Direction to diff the translations to\n  - `remote`: Only check for local translations that are missing remotely\n  - `local`: Only check for remote translations that are missing locally\n  - `both`: Check both directions\n\n### `loco-cli pull`\n\nDownload all translations from Loco. This command will **overwrite** the JSON files in `localesDir` with the assets found in Loco.\n\n#### Options\n\n- `-y, --yes`: Automatically answer yes to all confirmation prompts (default: false)\n\n### `loco-cli push`\n\nPush changes to the translation files to Loco. Depending on the `push` options, this will only add new translations, modify existing translations or even delete translations from Loco that are not present in the local file.\n\n#### Options\n\n- `-y, --yes`: Automatically answer yes to all confirmation prompts (default: false)\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue.\nDon't forget to give the project a star! Thanks again!\n\n## License\n\nDistributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrechtme%2Floco-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobrechtme%2Floco-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobrechtme%2Floco-cli/lists"}