BabelizeBabelize
CLI

Babelize CLI

The Babelize CLI (@babelize/cli) manages i18n projects, starts translation runs, and raises GitHub PRs with locale files, all from your terminal.

The Babelize CLI (babelize) gives you full access to the Babelize platform from your terminal. Run translations, manage projects, raise PRs, and inspect billing — without ever opening a browser.

Quick start: one command

In your project's folder, run:

npx babelize

That's it. (npx babelize and npx @babelize/cli are the same CLI; use whichever you like.) Babelize walks you through the rest:

  1. Git. It checks your project is in git so every change can be reviewed and undone. If it isn't, it offers to run git init and make a first commit of your files. If you have uncommitted changes, it warns you first, so its edits don't mix with yours.
  2. Your app. It finds the framework (and any i18n library you already use) and the language your app is written in. This runs on your machine; nothing is uploaded.
  3. Sign in. If you aren't signed in, pick GitHub or Google and your browser opens to sign in, or enter your email and password. No API key is needed: translation uses your plan's credits.
  4. Languages. Pick the languages to translate into. Babelize remembers them in .babelize/config.json.
  5. Translate. Locale files and i18n code are written into your project. The summary shows the credits used. Review the changes with git diff, then commit.

Your locales and i18n setup are then done. Add a language switcher so people can pick a language: grab a ready-made one at elements.babelize.co, or build your own.

Run npx babelize again whenever your app changes: only new or changed text is translated. Prefer pull requests? Connect the repo at app.babelize.co, or use babelize run start.

Without a terminal to answer questions (CI, scripts), pass the languages: babelize start --to fr,de --yes. The old interactive command menu is babelize shell.

Quick start (your own LLM key)

Prefer your own key? Set it, and Babelize uses it instead of your credits (no account needed):

export ANTHROPIC_API_KEY=sk-ant-...   # or OPENAI_, GEMINI_, GROQ_, OPENROUTER_API_KEY
npx babelize translate --to fr,de
git diff

In CI, use a Babelize API key from app.babelize.co/api-keys (export BABELIZE_API_KEY=bblz_sk_...) and npx babelize start --to fr,de --yes.

React, Next.js, Django and static HTML are supported; Vue and React Native are in beta. See Translate Locally.

Quick Start (platform)

For GitHub pull requests and the dashboard, sign in and create a project:

# Install globally (or prefix each command with npx)
npm install -g @babelize/cli

babelize auth login    # GitHub, Google or email
babelize init          # create a project for this repo
babelize run start     # translate it and open a PR

Commands Overview

Global Flags

Every command supports these flags:

FlagDescription
--jsonOutput raw JSON where the subcommand supports it (see note below)
--api-url <url>Connect to a different API (default: the URL saved by auth login, else https://api.babelize.co/api; or set BABELIZE_API_URL)
--token <token>Pass an explicit auth token instead of using stored credentials (or set BABELIZE_TOKEN)
--verbose / -vShow full request/response details
--yes / -yNever prompt, and answer yes to confirmations (e.g. deletes)
--non-interactiveNever prompt; fail when a required value is missing (also BABELIZE_NON_INTERACTIVE=1 or CI)
--no-colorDisable ANSI colors
--version / -VPrint CLI version
--help / -hShow help for any command

--json is accepted everywhere but only implemented per subcommand — where a subcommand doesn't produce JSON it falls back to the normal human-readable output. Check the command's page in this section for its --json support.

Last updated: 2026-10-18

How is this guide?

On this page