@babelize/cli
v2.1.3
Published
Official CLI for the Babelize AI-powered i18n platform
Maintainers
Readme
@babelize/cli
Babelize CLI — AI-powered i18n platform for managing translations from your terminal.
Install
npm install -g @babelize/cliQuick Start
# Log in to your Babelize account
babelize auth login
# Initialize a new project
babelize init
# Start a translation run
babelize run startCommands
| Command | Description |
|---------|-------------|
| init | Initialize a new Babelize project |
| auth login / signup / logout / whoami | Authentication management |
| auth reset-password | Send a password reset email |
| auth provider-tokens | Manage OAuth provider tokens (GitHub, etc.) |
| status | Check API health and your account status |
| projects | CRUD, sync, insights, metadata, download, brand-voice, archive |
| run start / preview / status / analyze | Translation pipeline engine |
| babels | View translation job history |
| pr | GitHub PR integration |
| billing | Plans, usage, invoices |
| subscriptions | List, cancel, reactivate subscriptions |
| checkout | Purchase a plan |
| languages | System and project-level language management |
| members | Team member management |
| tm | Translation memory (view, update, clear) |
| glossary | Translation glossary (list, add, update, delete, import, export) |
| api-keys byok | BYOK provider keys (OpenAI, Anthropic, Groq, etc.) |
| api-keys babelize | Babelize API keys (bab_ prefix for MCP/external access) |
| comments | Translation comments and discussions |
| notifications | Notification inbox |
| analytics | Usage history, activity logs, audit logs |
| account | MFA, sessions, account deletion |
| privacy | GDPR data export and erasure |
| admin | Platform administration (owner only) |
| invitations | Team invitations |
| roles | Role management |
| users | User listing |
Run babelize <command> --help for subcommand details.
Shell Completion
Generate bash or zsh completion scripts:
babelize completion bash > /usr/local/etc/bash_completion.d/babelize
babelize completion zsh > /usr/local/share/zsh/site-functions/_babelizeThe script dynamically reflects all registered commands at generation time.
Configuration
Credentials and preferences are stored at:
- macOS:
~/Library/Preferences/babelize-nodejs/config.json - Linux:
~/.config/babelize-nodejs/config.json - Windows:
%APPDATA%/babelize-nodejs/config.json
The CLI auto-detects the API URL:
- Production:
https://api.babelize.co/api - Local dev:
http://localhost:3001/api - Override: Set
BABELIZE_API_URLenv var or use--api-url
Environment Variables
| Variable | Description |
|----------|-------------|
| BABELIZE_API_URL | Override API URL |
| BABELIZE_TOKEN | Auth token (alternative to babelize auth login or --token) |
| NO_COLOR | Disable colored output (any non-empty value) |
Exit Codes
| Code | Meaning | When it happens |
|------|---------|-----------------|
| 0 | Success | Command completed, or user cancelled |
| 1 | Internal error | Unexpected failure (catch-all) |
| 2 | Usage error | Invalid arguments, missing required flags |
| 3 | Auth error | Not logged in, session expired, login failed |
| 4 | Config error | Missing or invalid configuration file |
| 5 | Network error | Rate limited, DNS failure, timeout |
| 6 | API error | Server returned 4xx/5xx |
Scripts can use these codes for conditional logic:
babelize run start --no-poll || exit_code=$?
if [ $exit_code -eq 3 ]; then
babelize auth login
fiJSON Mode
Append --json to any command for machine-readable JSON output. All commands
return JSON when this flag is set.
Update Notifications
The CLI checks npm registry for new versions once per session (non-blocking). To update:
npm update -g @babelize/cliTroubleshooting
| Problem | Solution |
|---------|----------|
| Not authenticated | Run babelize auth login |
| EPERM on install | Use sudo npm install -g @babelize/cli |
| Completion not working | Ensure the script is sourced: source /usr/local/etc/bash_completion.d/babelize |
| Rate limited | Wait 60 seconds and retry |
| BABELIZE_API_URL not honored | Ensure the env var is set before running the command |
