@crowdin/serverless-apps-cli
v0.20.0
Published
Command-line tool for serverless Crowdin apps: create, develop, preview, and publish apps from your terminal.
Readme
Crowdin Serverless Apps CLI
Command-line tool for serverless Crowdin apps: create, develop, preview, and publish apps from your terminal.
The CLI is a zero-config toolchain — React, Tailwind CSS, and Lingui i18n work out of the box, with Vite powering the dev server and the production build. One binary scaffolds an app, runs it live inside Crowdin with hot reload, extracts and compiles translations, lints and formats your code, and publishes the result.
:bookmark: See the documentation for more information.
Requirements
- Node.js
^22.19 || ^24— 22.19 or newer within the 22.x line, or any 24.x - A Crowdin or Crowdin Enterprise account
Installation
npm install --global @crowdin/serverless-apps-cliOr run it ad hoc with npx @crowdin/serverless-apps-cli <command>.
Quick start
crowdin-serverless-apps login # browser sign-in with your Crowdin account
crowdin-serverless-apps create my-app # scaffold from a starter template and register the app
cd my-app
pnpm install
crowdin-serverless-apps dev # local dev server — the app runs live inside Crowdin
crowdin-serverless-apps publish # build, upload, and serve the app from CrowdinCommands
Develop:
| Command | Description |
|---------|-------------|
| create [name] [--template <t>] [--yes] | Create a new serverless app from a starter template (projects-dashboard-cli or projects-dashboard-standalone), register it in Crowdin, and link the folder to it |
| dev [--port <n>] [--yes] [--no-manifest-sync] | Start a local dev server with hot reload; while it runs, your app inside Crowdin loads straight from your machine |
| preview [--module <key>] [--project <id\|identifier>] | Open the app's page in Crowdin in the browser (does not start a server); project modules need a project, and without --project a non-interactive run uses the first one you can access |
Build & publish:
| Command | Description |
|---------|-------------|
| build [--no-extract] [--no-bundle] | Build the app and package it for publishing (dist/bundle.zip) |
| extract | Scan the source for translatable text and update the locales/*.po catalogs |
| publish [--no-build] [--yes] [--no-manifest-sync] | Build, upload the bundle to Crowdin, and switch the app to serve it |
Quality:
| Command | Description |
|---------|-------------|
| lint | Check the app's code for problems (Biome, no configuration needed) |
| format | Auto-format the app's code |
Manage apps:
| Command | Description |
|---------|-------------|
| list (ls) [--print] [--json] | List your serverless apps |
| link [--app-id <id>] | Link the local project to an existing app |
| manifest status | pull | push | Diff, pull, or push manifest.json against Crowdin |
Account:
| Command | Description |
|---------|-------------|
| login [--file-storage] [--port <n>] | Sign in via the browser; tokens are stored in the OS keychain, or in an encrypted file with --file-storage |
| logout | Log out and remove the stored token |
Run crowdin-serverless-apps <command> --help for all options and examples.
How dev and publish work
The manifest declares where Crowdin loads the app's bundle from: bundle.mode is either internal (Crowdin serves the bundle you uploaded) or external (Crowdin loads it from a URL).
devoffers to point your app athttp://localhost:<port>/, so everything you edit shows up inside Crowdin instantly, hot module replacement included.publishuploadsdist/bundle.zipand offers to switch the app back to the Crowdin-served bundle.
Both update the app in Crowdin and your local manifest.json. Pass --yes to apply without prompts (e.g. in scripts) or --no-manifest-sync to leave the bundle mode untouched.
Customization
The build needs no configuration: the entry is src/index.tsx (or .ts/.jsx/.js), the output is dist/app.js. To customize the build, add a regular vite.config.ts to the app — the CLI picks it up and merges it with the settings the platform requires. Advanced i18n setups can add their own lingui.config.ts, which replaces the zero-config defaults — keep the PO format and the locales/{locale} catalog layout so the CLI can compile the catalogs.
Translations (i18n)
Write UI strings with Lingui macros, then:
extractcollects them intolocales/<locale>.po;buildanddevcompile the catalogs todist/locales/<locale>.json, which the SDK'sAppI18nProviderloads at runtime.
Name catalogs after full Crowdin locale codes (uk-UA.po, pt-BR.po) — the CLI warns about names Crowdin will never request (such as uk.po).
Configuration
| Variable | Purpose |
|----------|---------|
| CROWDIN_APP_ID | Identifies the app this folder is linked to; written to the app's .env by create and link |
| CROWDIN_PERSONAL_TOKEN | Authenticate with a personal access token instead of login — useful in CI |
| CROWDIN_BASE_URL | Crowdin API base URL, e.g. https://<org>.api.crowdin.com — set it when using a personal token with Crowdin Enterprise |
| PORT | Port dev starts from (8080 when unset) - if it is taken, dev moves to the next free one, while --port is exact |
| CROWDIN_DEV_CORS_ORIGIN | Extra origins allowed to fetch from the dev server |
login detects your Crowdin Enterprise organization automatically — no extra configuration needed.
CI and non-interactive use
When stdout is not a terminal (or the CI environment variable is set), the CLI prints plain text and never prompts. Combine:
CROWDIN_PERSONAL_TOKENfor authentication,--yesto confirm actions (e.g.publish --yes),--json/--printfor machine-readablelistoutput.
The --lite global flag forces the same minimal output in a regular terminal (accessibility mode).
Seeking Assistance
Found a bug, need help, or have a question? Please contact Customer Success Service.
License
MIT
