@api18n/cli
Translations live in your repo. Edits land as PRs.
A CLI for developer teams. Pull dashboard translations into JSON files; push local edits back as reviewable proposals.
npm install --save-dev @api18n/cli$ npx @api18n/cli init✓ Created api18n.config.ts$ npx api18n login✓ Signed in as you@example.com$ npx api18n pull✓ Wrote messages/en.json, messages/pt.json✓ Wrote types for 142 keys → messages/messages.d.ts$ npx api18n push -m "Refresh copy"✓ Proposal #42 opened for review
What it does
Pull to source control
`api18n pull` writes `messages/{locale}.json` files in the format `next-intl` / `i18next` / `react-intl` already use.
Push as a proposal
`api18n push` diffs local vs server, opens a proposal for dashboard review. No more silent overwrites from a stale CI run.
Typed keys
Every `pull` writes a `messages.d.ts` declaring `Messages` for the SDK. Typos in `t('button.cancl')` fail at compile time.
Personal access tokens
Long-lived `a18n_live_…` tokens, scoped to read/propose/approve, revocable from the dashboard with one click.
Where it fits
The CLI is the bridge between the dashboard and your codebase. It never edits the database directly — every push is a proposal.