@qalsync/client
v0.2.0
Published
Lightweight client for the QalSync translation API
Readme
@qalsync/client
Official CLI & TypeScript client for QalSync — zero-friction localization toolchain for React and Next.js, specialized in East African languages (Amharic, Afaan Oromo, Tigrinya, and Somali).
⚡ Features
- Deep AST Scanning: Automatically extracts user-facing UI text, labels, placeholders, titles, and data constants across components and data files.
- BYOK (Bring Your Own Key): Fast translations via Google Gemini AI using your free Gemini key.
- 2-Level Caching: Incremental caching ensures you never translate the same string twice.
- Multi-Directory Support: Scans
app/,src/,data/,constants/,components/, andpages/. - CI/CD Guard: Built-in
--checkcommand for automated CI build verification. - Human Review Ready: Fully compatible with the QalSync Review Dashboard.
📦 Quick Start
1. Install & Initialize
npm install @qalsync/client
npx qalsync initThis interactively prompts for target languages and creates qalsync.config.json.
2. Set Your Gemini API Key
Add your Gemini API key (free at Google AI Studio) to your project's .env:
GEMINI_API_KEY=AIzaSy...3. Scan & Sync Translations
npx qalsync syncScans your codebase, translates new strings via Gemini AI, and generates messages/*.json files ready for next-intl or react-i18next.
🛠️ CLI Commands
| Command | Description |
|---|---|
| npx qalsync init | Generate qalsync.config.json with target language selection. |
| npx qalsync sync | Scan codebase, translate untranslated strings, and merge locale JSONs. |
| npx qalsync sync --check | CI mode: exits with code 1 if any untranslated strings exist. |
| npx qalsync review | Opens the QalSync Human Review Dashboard in your browser. |
🌐 Supported Languages
- Amharic (
am) — አማርኛ - Afaan Oromo (
om) — Oromiffa - Tigrinya (
ti) — ትግርኛ - Somali (
so) — Af Soomaali
📄 License
MIT © QalSync
