CLI Installation
@shipi18n/cli translates locale files from your terminal using your own LLM key.
Install
# as a dev dependency (recommended — pins the version for your team) npm install -D @shipi18n/cli # or run it without installing npx @shipi18n/cli --help
Install a provider SDK
Pick the one matching your provider — they are optional peer dependencies:
npm install -D @anthropic-ai/sdk # default provider # or npm install -D openai
Set your key
export ANTHROPIC_API_KEY=your-key-here # or, with --provider openai export OPENAI_API_KEY=your-key-here
The CLI does not read .env files by itself. Use your shell, direnv, or dotenv -- shipi18n … if you keep keys in a file.
Verify
npx @shipi18n/cli --version npx @shipi18n/cli translate locales/en.json --target es
Requirements
- Node.js 18 or newer
- An Anthropic or OpenAI API key of your own