@intlpullhq/cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +765 -0
- package/dist/api-D35M5BOX.js +29 -0
- package/dist/chunk-2T7ERBDS.js +394 -0
- package/dist/chunk-S3EWA4QD.js +995 -0
- package/dist/config-HHJ7OBGT.js +46 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +10737 -0
- package/package.json +86 -0
package/README.md
ADDED
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
# IntlPull CLI
|
|
2
|
+
|
|
3
|
+
The official CLI for [IntlPull](https://intlpull.com) - intelligent i18n for modern apps. Transform code, manage translations, and sync with IntlPull cloud.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Parallel Downloads** - Fetch translations by namespace concurrently for blazing fast syncs
|
|
8
|
+
- **Real-time Sync** - Watch for changes and auto-update local files
|
|
9
|
+
- **Auto-detect Project** - Automatically finds `.intlpull.json` in parent directories
|
|
10
|
+
- **Multiple Output Formats** - JSON, YAML, TypeScript, Android XML, iOS Strings
|
|
11
|
+
- **CI/CD Ready** - Non-interactive mode for automation pipelines
|
|
12
|
+
- **OTA Releases** - Publish over-the-air updates for mobile/web SDKs
|
|
13
|
+
- **Enterprise Workflows** - Approval workflows for translation review
|
|
14
|
+
- **Migration Tools** - Migrate from Lokalise, Crowdin, Phrase, or local files
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Use with npx (recommended)
|
|
20
|
+
npx @intlpullhq/cli <command>
|
|
21
|
+
|
|
22
|
+
# Or install globally
|
|
23
|
+
npm install -g @intlpullhq/cli
|
|
24
|
+
intlpull <command>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 1. Authenticate
|
|
31
|
+
npx @intlpullhq/cli login
|
|
32
|
+
|
|
33
|
+
# 2. Initialize project
|
|
34
|
+
npx @intlpullhq/cli init
|
|
35
|
+
|
|
36
|
+
# 3. Push your translation keys
|
|
37
|
+
npx @intlpullhq/cli upload
|
|
38
|
+
|
|
39
|
+
# 4. Pull translations
|
|
40
|
+
npx @intlpullhq/cli download
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Authentication
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Interactive login (prompts for token)
|
|
47
|
+
npx @intlpullhq/cli login
|
|
48
|
+
|
|
49
|
+
# With API token (warns about shell history)
|
|
50
|
+
npx @intlpullhq/cli login --token <your-api-key>
|
|
51
|
+
|
|
52
|
+
# Or use environment variable (recommended for CI/CD)
|
|
53
|
+
export INTLPULL_API_KEY=your-api-key
|
|
54
|
+
|
|
55
|
+
# Check current auth status
|
|
56
|
+
npx @intlpullhq/cli whoami
|
|
57
|
+
|
|
58
|
+
# Logout
|
|
59
|
+
npx @intlpullhq/cli logout
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Auth priority:** Environment variable (`INTLPULL_API_KEY`) > Config file (`~/.intlpull/auth.json`)
|
|
63
|
+
|
|
64
|
+
## Commands Reference
|
|
65
|
+
|
|
66
|
+
### Global Options
|
|
67
|
+
|
|
68
|
+
| Option | Description |
|
|
69
|
+
|--------|-------------|
|
|
70
|
+
| `--env-file <path>` | Path to custom env file (e.g., `.env.production`) |
|
|
71
|
+
| `-V, --version` | Output version number |
|
|
72
|
+
| `-h, --help` | Display help |
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Initialize Project
|
|
77
|
+
|
|
78
|
+
Set up IntlPull in your project with auto-detection.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Interactive setup
|
|
82
|
+
npx @intlpullhq/cli init
|
|
83
|
+
|
|
84
|
+
# With options
|
|
85
|
+
npx @intlpullhq/cli init --framework next --library next-intl --output ./messages
|
|
86
|
+
|
|
87
|
+
# Non-interactive (auto-detect everything)
|
|
88
|
+
npx @intlpullhq/cli init -y
|
|
89
|
+
|
|
90
|
+
# Link to existing project
|
|
91
|
+
npx @intlpullhq/cli init --project <project-id>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Options:**
|
|
95
|
+
| Option | Description |
|
|
96
|
+
|--------|-------------|
|
|
97
|
+
| `--framework <framework>` | Framework: `next`, `react`, `vue`, `svelte`, `astro` |
|
|
98
|
+
| `--library <library>` | i18n library: `next-intl`, `react-i18next`, `vue-i18n` |
|
|
99
|
+
| `--output <dir>` | Output directory for translation files |
|
|
100
|
+
| `--project <id>` | Project ID to link |
|
|
101
|
+
| `-y, --yes` | Auto-detect and initialize without prompts |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### Upload / Push
|
|
106
|
+
|
|
107
|
+
Upload translation keys to IntlPull. Automatically detects project, files, and git branch.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Auto-detect and upload
|
|
111
|
+
npx @intlpullhq/cli upload
|
|
112
|
+
|
|
113
|
+
# Upload specific file
|
|
114
|
+
npx @intlpullhq/cli upload --file messages/admin.json
|
|
115
|
+
|
|
116
|
+
# Upload only source language
|
|
117
|
+
npx @intlpullhq/cli upload --source-only
|
|
118
|
+
|
|
119
|
+
# Preview without uploading
|
|
120
|
+
npx @intlpullhq/cli upload --dry-run
|
|
121
|
+
|
|
122
|
+
# Also available as 'push'
|
|
123
|
+
npx @intlpullhq/cli push
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Options:**
|
|
127
|
+
| Option | Description |
|
|
128
|
+
|--------|-------------|
|
|
129
|
+
| `--project <id>` | Project ID (auto-detected with project-scoped API key) |
|
|
130
|
+
| `--file <path>` | Specific file to upload |
|
|
131
|
+
| `--branch <name>` | Branch name (auto-detected from git) |
|
|
132
|
+
| `--platform <platform>` | Platform to tag keys: `ios`, `android`, `web` |
|
|
133
|
+
| `--all-languages` | Upload ALL languages (default: true) |
|
|
134
|
+
| `--source-only` | Upload only source language keys |
|
|
135
|
+
| `--dry-run` | Preview without uploading |
|
|
136
|
+
| `-v, --verbose` | Show detailed detection info |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### Download / Pull
|
|
141
|
+
|
|
142
|
+
Download translations from IntlPull. Uses parallel fetching by default.
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Auto-detect and download
|
|
146
|
+
npx @intlpullhq/cli download
|
|
147
|
+
|
|
148
|
+
# Specify format and output
|
|
149
|
+
npx @intlpullhq/cli download --format json --output ./messages
|
|
150
|
+
|
|
151
|
+
# Download specific languages
|
|
152
|
+
npx @intlpullhq/cli download --languages en,es,fr
|
|
153
|
+
|
|
154
|
+
# Quiet mode for CI
|
|
155
|
+
npx @intlpullhq/cli download --quiet
|
|
156
|
+
|
|
157
|
+
# Also available as 'pull'
|
|
158
|
+
npx @intlpullhq/cli pull
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Options:**
|
|
162
|
+
| Option | Description |
|
|
163
|
+
|--------|-------------|
|
|
164
|
+
| `--project <id>` | Project ID (auto-detected) |
|
|
165
|
+
| `--format <format>` | Output format: `json`, `yaml`, `ts` (default: `json`) |
|
|
166
|
+
| `--output <dir>` | Output directory (auto-detected from framework) |
|
|
167
|
+
| `--languages <langs>` | Languages to download (comma-separated) |
|
|
168
|
+
| `--branch <branch>` | Translation branch to download from |
|
|
169
|
+
| `--platform <platform>` | Platform variant: `default`, `ios`, `android`, `web` |
|
|
170
|
+
| `--no-parallel` | Disable parallel fetching |
|
|
171
|
+
| `-i, --interactive` | Run in interactive mode |
|
|
172
|
+
| `-q, --quiet` | Suppress output except errors |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Sync
|
|
177
|
+
|
|
178
|
+
One-time sync (equivalent to `listen --once`). Perfect for CI/CD.
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Quick sync
|
|
182
|
+
npx @intlpullhq/cli sync
|
|
183
|
+
|
|
184
|
+
# With options
|
|
185
|
+
npx @intlpullhq/cli sync --output ./locales --format json --languages en,es
|
|
186
|
+
|
|
187
|
+
# Quiet mode for CI
|
|
188
|
+
npx @intlpullhq/cli sync --quiet
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Options:**
|
|
192
|
+
| Option | Description |
|
|
193
|
+
|--------|-------------|
|
|
194
|
+
| `--project <id>` | Project ID |
|
|
195
|
+
| `--output <dir>` | Output directory |
|
|
196
|
+
| `--format <format>` | Output format: `json`, `yaml`, `ts` |
|
|
197
|
+
| `--languages <langs>` | Languages to sync (comma-separated) |
|
|
198
|
+
| `--platform <platform>` | Platform variant |
|
|
199
|
+
| `--quiet` | Minimal output |
|
|
200
|
+
| `--no-parallel` | Disable parallel fetching |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### Listen / Watch
|
|
205
|
+
|
|
206
|
+
Watch for translation updates and auto-sync to local files. Great for development.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Start watching
|
|
210
|
+
npx @intlpullhq/cli listen
|
|
211
|
+
|
|
212
|
+
# Or use alias
|
|
213
|
+
npx @intlpullhq/cli watch
|
|
214
|
+
|
|
215
|
+
# With custom settings
|
|
216
|
+
npx @intlpullhq/cli listen \
|
|
217
|
+
--output ./messages \
|
|
218
|
+
--format json \
|
|
219
|
+
--interval 5 \
|
|
220
|
+
--timeout 300
|
|
221
|
+
|
|
222
|
+
# Sync once and exit
|
|
223
|
+
npx @intlpullhq/cli listen --once
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Options:**
|
|
227
|
+
| Option | Description |
|
|
228
|
+
|--------|-------------|
|
|
229
|
+
| `--project <id>` | Project ID |
|
|
230
|
+
| `--output <dir>` | Output directory |
|
|
231
|
+
| `--format <format>` | Output format: `json`, `yaml`, `ts` |
|
|
232
|
+
| `--languages <langs>` | Languages to sync (comma-separated) |
|
|
233
|
+
| `--branch <branch>` | Translation branch |
|
|
234
|
+
| `--platform <platform>` | Platform variant |
|
|
235
|
+
| `--interval <seconds>` | Polling interval in seconds (default: 5) |
|
|
236
|
+
| `--timeout <seconds>` | Auto-stop after N seconds (default: 300) |
|
|
237
|
+
| `--once` | Sync once and exit |
|
|
238
|
+
| `--quiet` | Minimal output |
|
|
239
|
+
| `--no-parallel` | Disable parallel fetching |
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### Status
|
|
244
|
+
|
|
245
|
+
Show project status and translation progress.
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
npx @intlpullhq/cli status
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### Check & Fix
|
|
254
|
+
|
|
255
|
+
Check for and fix missing translations.
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Check for missing translations
|
|
259
|
+
npx @intlpullhq/cli check --source en --target es,fr,de
|
|
260
|
+
|
|
261
|
+
# Output report to file
|
|
262
|
+
npx @intlpullhq/cli check --output report.json
|
|
263
|
+
|
|
264
|
+
# Check and auto-fix
|
|
265
|
+
npx @intlpullhq/cli check --fix
|
|
266
|
+
|
|
267
|
+
# Auto-fix with preview
|
|
268
|
+
npx @intlpullhq/cli fix --source en --dry-run
|
|
269
|
+
|
|
270
|
+
# Fix specific languages
|
|
271
|
+
npx @intlpullhq/cli fix --target es,fr
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Check Options:**
|
|
275
|
+
| Option | Description |
|
|
276
|
+
|--------|-------------|
|
|
277
|
+
| `--source <lang>` | Source language (default: `en`) |
|
|
278
|
+
| `--target <langs>` | Target languages (comma-separated) |
|
|
279
|
+
| `--output <file>` | Output report file |
|
|
280
|
+
| `--fix` | Auto-fix missing translations |
|
|
281
|
+
|
|
282
|
+
**Fix Options:**
|
|
283
|
+
| Option | Description |
|
|
284
|
+
|--------|-------------|
|
|
285
|
+
| `--source <lang>` | Source language (default: `en`) |
|
|
286
|
+
| `--target <langs>` | Target languages (comma-separated) |
|
|
287
|
+
| `--dry-run` | Preview without fixing |
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### Diff
|
|
292
|
+
|
|
293
|
+
Show what would change on push/pull.
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
npx @intlpullhq/cli diff --source en --target es
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
**Options:**
|
|
300
|
+
| Option | Description |
|
|
301
|
+
|--------|-------------|
|
|
302
|
+
| `--source <lang>` | Source language |
|
|
303
|
+
| `--target <lang>` | Target language to compare |
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
### Import
|
|
308
|
+
|
|
309
|
+
Import existing translation files into IntlPull.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
# Import from directory
|
|
313
|
+
npx @intlpullhq/cli import --path ./messages --format json
|
|
314
|
+
|
|
315
|
+
# Import with glob pattern
|
|
316
|
+
npx @intlpullhq/cli import --path ./locales --pattern "*.json"
|
|
317
|
+
|
|
318
|
+
# Preview import
|
|
319
|
+
npx @intlpullhq/cli import --path ./messages --dry-run
|
|
320
|
+
|
|
321
|
+
# Import to specific namespace
|
|
322
|
+
npx @intlpullhq/cli import --path ./messages --namespace admin
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
**Options:**
|
|
326
|
+
| Option | Description |
|
|
327
|
+
|--------|-------------|
|
|
328
|
+
| `--path <path>` | Path to file or directory |
|
|
329
|
+
| `--pattern <pattern>` | Glob pattern (e.g., `*.json`) |
|
|
330
|
+
| `--format <format>` | File format: `json`, `yaml` (default: `json`) |
|
|
331
|
+
| `--project <id>` | Project ID |
|
|
332
|
+
| `--language <code>` | Target language (auto-detect if omitted) |
|
|
333
|
+
| `--namespace <name>` | Target namespace (default: `common`) |
|
|
334
|
+
| `--branch <name>` | Branch to import to |
|
|
335
|
+
| `--platform <platform>` | Platform to tag keys: `ios`, `android`, `web` |
|
|
336
|
+
| `--dry-run` | Preview without importing |
|
|
337
|
+
| `--update-existing` | Update existing translations (default: true) |
|
|
338
|
+
| `--skip-existing` | Skip if key already exists |
|
|
339
|
+
| `--detect-icu-plurals` | Detect ICU plural syntax (default: true) |
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
### Export
|
|
344
|
+
|
|
345
|
+
Export translations as a ZIP archive.
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
# Export all as JSON
|
|
349
|
+
npx @intlpullhq/cli export --format json --output ./translations.zip
|
|
350
|
+
|
|
351
|
+
# Export specific languages
|
|
352
|
+
npx @intlpullhq/cli export --languages en,es,fr
|
|
353
|
+
|
|
354
|
+
# Export for mobile platforms
|
|
355
|
+
npx @intlpullhq/cli export --format android --output ./android-strings.zip
|
|
356
|
+
npx @intlpullhq/cli export --format ios --output ./ios-strings.zip
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Options:**
|
|
360
|
+
| Option | Description |
|
|
361
|
+
|--------|-------------|
|
|
362
|
+
| `--format <format>` | Format: `json`, `yaml`, `ts`, `android`, `ios` |
|
|
363
|
+
| `--languages <langs>` | Languages to export (comma-separated) |
|
|
364
|
+
| `--output <file>` | Output file path |
|
|
365
|
+
| `--version <version>` | Version to export |
|
|
366
|
+
| `--branch <branch>` | Translation branch |
|
|
367
|
+
| `--platform <platform>` | Platform variant |
|
|
368
|
+
| `--project <id>` | Project ID |
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
### OTA Releases
|
|
373
|
+
|
|
374
|
+
Publish and manage over-the-air releases for mobile/web SDKs.
|
|
375
|
+
|
|
376
|
+
```bash
|
|
377
|
+
# Publish new release
|
|
378
|
+
npx @intlpullhq/cli publish 1.2.0
|
|
379
|
+
|
|
380
|
+
# Auto-version
|
|
381
|
+
npx @intlpullhq/cli publish
|
|
382
|
+
|
|
383
|
+
# Preview without publishing
|
|
384
|
+
npx @intlpullhq/cli publish --dry-run
|
|
385
|
+
|
|
386
|
+
# List releases
|
|
387
|
+
npx @intlpullhq/cli releases list
|
|
388
|
+
|
|
389
|
+
# Delete a release
|
|
390
|
+
npx @intlpullhq/cli releases delete <releaseId>
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
**Publish Options:**
|
|
394
|
+
| Option | Description |
|
|
395
|
+
|--------|-------------|
|
|
396
|
+
| `--project <id>` | Project ID |
|
|
397
|
+
| `--branch <branch>` | Translation branch (auto-detected from git) |
|
|
398
|
+
| `--dry-run` | Preview without publishing |
|
|
399
|
+
| `-q, --quiet` | Only output version on success |
|
|
400
|
+
|
|
401
|
+
**Releases Options:**
|
|
402
|
+
| Option | Description |
|
|
403
|
+
|--------|-------------|
|
|
404
|
+
| `--project <id>` | Project ID |
|
|
405
|
+
| `--limit <n>` | Number of releases to show (default: 10) |
|
|
406
|
+
| `-q, --quiet` | Machine-readable output |
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
### Projects
|
|
411
|
+
|
|
412
|
+
Manage IntlPull projects.
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
# List all projects
|
|
416
|
+
npx @intlpullhq/cli projects list
|
|
417
|
+
|
|
418
|
+
# Create new project
|
|
419
|
+
npx @intlpullhq/cli projects create "My App" --languages en,es,fr
|
|
420
|
+
|
|
421
|
+
# Link directory to project
|
|
422
|
+
npx @intlpullhq/cli projects link <project-id>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**Create Options:**
|
|
426
|
+
| Option | Description |
|
|
427
|
+
|--------|-------------|
|
|
428
|
+
| `--source-language <lang>` | Source language (default: `en`) |
|
|
429
|
+
| `--languages <langs>` | Supported languages (comma-separated) |
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
### Migration
|
|
434
|
+
|
|
435
|
+
Migrate from other platforms or local files.
|
|
436
|
+
|
|
437
|
+
#### Migrate Local Files
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
# Migrate from current directory
|
|
441
|
+
npx @intlpullhq/cli migrate files
|
|
442
|
+
|
|
443
|
+
# Migrate from specific path
|
|
444
|
+
npx @intlpullhq/cli migrate files ./locales
|
|
445
|
+
|
|
446
|
+
# With options
|
|
447
|
+
npx @intlpullhq/cli migrate files ./messages \
|
|
448
|
+
--project "My App" \
|
|
449
|
+
--source en \
|
|
450
|
+
--pattern "*.json" \
|
|
451
|
+
--dry-run
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
**Options:**
|
|
455
|
+
| Option | Description |
|
|
456
|
+
|--------|-------------|
|
|
457
|
+
| `--project <name>` | Project name (prompts if not provided) |
|
|
458
|
+
| `--source <lang>` | Source/base language (default: `en`) |
|
|
459
|
+
| `--namespace <name>` | Namespace for keys (default: `common`) |
|
|
460
|
+
| `--pattern <glob>` | File pattern (default: `*.json`) |
|
|
461
|
+
| `--concurrency <n>` | Max parallel uploads (default: 5) |
|
|
462
|
+
| `--dry-run` | Preview without importing |
|
|
463
|
+
| `-y, --yes` | Skip confirmation prompts |
|
|
464
|
+
|
|
465
|
+
#### Migrate from Competitors
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
# Migrate from Lokalise
|
|
469
|
+
npx @intlpullhq/cli migrate from lokalise --api-key <key>
|
|
470
|
+
|
|
471
|
+
# Migrate from Crowdin
|
|
472
|
+
npx @intlpullhq/cli migrate from crowdin --api-key <key> --project-id <id>
|
|
473
|
+
|
|
474
|
+
# Migrate from Phrase
|
|
475
|
+
npx @intlpullhq/cli migrate from phrase --api-key <key>
|
|
476
|
+
|
|
477
|
+
# Preview migration
|
|
478
|
+
npx @intlpullhq/cli migrate from lokalise --api-key <key> --dry-run
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
**Options:**
|
|
482
|
+
| Option | Description |
|
|
483
|
+
|--------|-------------|
|
|
484
|
+
| `--api-key <key>` | API key for source platform |
|
|
485
|
+
| `--project-id <id>` | Specific project to migrate |
|
|
486
|
+
| `--to <id>` | Target IntlPull project ID |
|
|
487
|
+
| `--dry-run` | Preview without importing |
|
|
488
|
+
|
|
489
|
+
#### Compare Pricing
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
# Compare with all competitors
|
|
493
|
+
npx @intlpullhq/cli compare
|
|
494
|
+
|
|
495
|
+
# Compare specific competitor
|
|
496
|
+
npx @intlpullhq/cli compare --from lokalise
|
|
497
|
+
|
|
498
|
+
# Custom usage parameters
|
|
499
|
+
npx @intlpullhq/cli compare --keys 10000 --languages 5 --users 10
|
|
500
|
+
|
|
501
|
+
# JSON output
|
|
502
|
+
npx @intlpullhq/cli compare --json
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
**Options:**
|
|
506
|
+
| Option | Description |
|
|
507
|
+
|--------|-------------|
|
|
508
|
+
| `--from <provider>` | Specific competitor: `lokalise`, `crowdin`, `phrase` |
|
|
509
|
+
| `--keys <n>` | Number of translation keys (default: 5000) |
|
|
510
|
+
| `--languages <n>` | Number of languages (default: 3) |
|
|
511
|
+
| `--users <n>` | Number of team members (default: 5) |
|
|
512
|
+
| `--json` | Output as JSON |
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
### Workflows (Enterprise)
|
|
517
|
+
|
|
518
|
+
Manage approval workflows for translation review.
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
# Check workflow status
|
|
522
|
+
npx @intlpullhq/cli workflow status
|
|
523
|
+
|
|
524
|
+
# List pending approvals
|
|
525
|
+
npx @intlpullhq/cli workflow pending
|
|
526
|
+
|
|
527
|
+
# Approve a translation
|
|
528
|
+
npx @intlpullhq/cli workflow approve <translationId>
|
|
529
|
+
npx @intlpullhq/cli workflow approve <translationId> -m "Looks good!"
|
|
530
|
+
|
|
531
|
+
# Reject a translation (reason required)
|
|
532
|
+
npx @intlpullhq/cli workflow reject <translationId> -m "Needs revision"
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
**Options:**
|
|
536
|
+
| Command | Options |
|
|
537
|
+
|---------|---------|
|
|
538
|
+
| `status` | `--project <id>` |
|
|
539
|
+
| `pending` | `--project <id>` |
|
|
540
|
+
| `approve` | `--project <id>`, `-m, --comment <message>` |
|
|
541
|
+
| `reject` | `--project <id>`, `-m, --reason <message>` (required) |
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
### Email Templates
|
|
546
|
+
|
|
547
|
+
Manage React Email template translations.
|
|
548
|
+
|
|
549
|
+
```bash
|
|
550
|
+
# Push email templates
|
|
551
|
+
npx @intlpullhq/cli emails push --dir ./emails
|
|
552
|
+
|
|
553
|
+
# Pull email translations
|
|
554
|
+
npx @intlpullhq/cli emails pull --output ./emails/translations
|
|
555
|
+
|
|
556
|
+
# List templates
|
|
557
|
+
npx @intlpullhq/cli emails list
|
|
558
|
+
|
|
559
|
+
# Check status
|
|
560
|
+
npx @intlpullhq/cli emails status
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
**Push Options:**
|
|
564
|
+
| Option | Description |
|
|
565
|
+
|--------|-------------|
|
|
566
|
+
| `--project <id>` | Project ID |
|
|
567
|
+
| `-d, --dir <path>` | Emails directory (default: `./emails`) |
|
|
568
|
+
| `--dry-run` | Preview without pushing |
|
|
569
|
+
|
|
570
|
+
**Pull Options:**
|
|
571
|
+
| Option | Description |
|
|
572
|
+
|--------|-------------|
|
|
573
|
+
| `--project <id>` | Project ID |
|
|
574
|
+
| `-o, --output <dir>` | Output directory |
|
|
575
|
+
| `--languages <langs>` | Languages to pull (comma-separated) |
|
|
576
|
+
| `--format <format>` | Output format: `json`, `ts` |
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
### Documents
|
|
581
|
+
|
|
582
|
+
Manage document translations (PDF, DOCX, etc.).
|
|
583
|
+
|
|
584
|
+
```bash
|
|
585
|
+
# List documents
|
|
586
|
+
npx @intlpullhq/cli documents list
|
|
587
|
+
|
|
588
|
+
# Upload document for translation
|
|
589
|
+
npx @intlpullhq/cli documents upload --file ./manual.pdf --target es,fr,de
|
|
590
|
+
|
|
591
|
+
# Download translated document
|
|
592
|
+
npx @intlpullhq/cli documents download --id <docId> --lang es --output ./manual-es.pdf
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**Upload Options:**
|
|
596
|
+
| Option | Description |
|
|
597
|
+
|--------|-------------|
|
|
598
|
+
| `--file <path>` | Path to file (required) |
|
|
599
|
+
| `--project <id>` | Project ID |
|
|
600
|
+
| `--source <lang>` | Source language |
|
|
601
|
+
| `--target <langs>` | Target languages (comma-separated) |
|
|
602
|
+
|
|
603
|
+
**Download Options:**
|
|
604
|
+
| Option | Description |
|
|
605
|
+
|--------|-------------|
|
|
606
|
+
| `--id <docId>` | Document ID (required) |
|
|
607
|
+
| `--lang <lang>` | Target language (required) |
|
|
608
|
+
| `--project <id>` | Project ID |
|
|
609
|
+
| `--output <path>` | Output file path |
|
|
610
|
+
|
|
611
|
+
---
|
|
612
|
+
|
|
613
|
+
### Zendesk Integration
|
|
614
|
+
|
|
615
|
+
Sync Help Center articles with Zendesk.
|
|
616
|
+
|
|
617
|
+
```bash
|
|
618
|
+
# Check integration status
|
|
619
|
+
npx @intlpullhq/cli zendesk status
|
|
620
|
+
|
|
621
|
+
# Connect to Zendesk
|
|
622
|
+
npx @intlpullhq/cli zendesk connect \
|
|
623
|
+
--subdomain mycompany \
|
|
624
|
+
--email admin@example.com \
|
|
625
|
+
--token <api-token>
|
|
626
|
+
|
|
627
|
+
# Pull articles from Zendesk
|
|
628
|
+
npx @intlpullhq/cli zendesk sync --direction pull
|
|
629
|
+
|
|
630
|
+
# Push translations to Zendesk
|
|
631
|
+
npx @intlpullhq/cli zendesk sync --direction push --locale es
|
|
632
|
+
|
|
633
|
+
# Disconnect
|
|
634
|
+
npx @intlpullhq/cli zendesk disconnect
|
|
635
|
+
```
|
|
636
|
+
|
|
637
|
+
**Connect Options:**
|
|
638
|
+
| Option | Description |
|
|
639
|
+
|--------|-------------|
|
|
640
|
+
| `--subdomain <subdomain>` | Zendesk subdomain (required) |
|
|
641
|
+
| `--email <email>` | Admin email address (required) |
|
|
642
|
+
| `--token <token>` | Zendesk API token (required) |
|
|
643
|
+
|
|
644
|
+
**Sync Options:**
|
|
645
|
+
| Option | Description |
|
|
646
|
+
|--------|-------------|
|
|
647
|
+
| `--direction <direction>` | Sync direction: `pull`, `push` (default: `pull`) |
|
|
648
|
+
| `--locale <locale>` | Target locale (required for push) |
|
|
649
|
+
| `--dry-run` | Preview without syncing |
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
## CI/CD Integration
|
|
654
|
+
|
|
655
|
+
### GitHub Actions
|
|
656
|
+
|
|
657
|
+
```yaml
|
|
658
|
+
name: Sync Translations
|
|
659
|
+
|
|
660
|
+
on:
|
|
661
|
+
push:
|
|
662
|
+
branches: [main]
|
|
663
|
+
|
|
664
|
+
jobs:
|
|
665
|
+
sync:
|
|
666
|
+
runs-on: ubuntu-latest
|
|
667
|
+
steps:
|
|
668
|
+
- uses: actions/checkout@v4
|
|
669
|
+
|
|
670
|
+
- name: Setup Node.js
|
|
671
|
+
uses: actions/setup-node@v4
|
|
672
|
+
with:
|
|
673
|
+
node-version: '20'
|
|
674
|
+
|
|
675
|
+
- name: Sync Translations
|
|
676
|
+
env:
|
|
677
|
+
INTLPULL_API_KEY: ${{ secrets.INTLPULL_API_KEY }}
|
|
678
|
+
run: npx @intlpullhq/cli sync --quiet
|
|
679
|
+
|
|
680
|
+
- name: Commit changes
|
|
681
|
+
run: |
|
|
682
|
+
git config user.name "github-actions"
|
|
683
|
+
git config user.email "github-actions@github.com"
|
|
684
|
+
git add .
|
|
685
|
+
git diff --staged --quiet || git commit -m "chore: sync translations"
|
|
686
|
+
git push
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
### GitLab CI
|
|
690
|
+
|
|
691
|
+
```yaml
|
|
692
|
+
sync-translations:
|
|
693
|
+
stage: build
|
|
694
|
+
image: node:20
|
|
695
|
+
script:
|
|
696
|
+
- npx @intlpullhq/cli sync --quiet
|
|
697
|
+
variables:
|
|
698
|
+
INTLPULL_API_KEY: $INTLPULL_API_KEY
|
|
699
|
+
only:
|
|
700
|
+
- main
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
### Vercel / Netlify
|
|
704
|
+
|
|
705
|
+
Add `INTLPULL_API_KEY` to your environment variables and update your build command:
|
|
706
|
+
|
|
707
|
+
```bash
|
|
708
|
+
# Build command
|
|
709
|
+
npx @intlpullhq/cli sync --quiet && next build
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
### Pre-commit Hook
|
|
713
|
+
|
|
714
|
+
```bash
|
|
715
|
+
# .husky/pre-commit
|
|
716
|
+
npx @intlpullhq/cli check --source en
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
---
|
|
720
|
+
|
|
721
|
+
## Configuration
|
|
722
|
+
|
|
723
|
+
### Project Configuration (`.intlpull.json`)
|
|
724
|
+
|
|
725
|
+
Created by `intlpull init`, this file configures your project:
|
|
726
|
+
|
|
727
|
+
```json
|
|
728
|
+
{
|
|
729
|
+
"projectId": "proj_xxxx",
|
|
730
|
+
"framework": "next",
|
|
731
|
+
"library": "next-intl",
|
|
732
|
+
"outputDir": "./messages",
|
|
733
|
+
"sourceLanguage": "en",
|
|
734
|
+
"namespaces": ["common", "admin"]
|
|
735
|
+
}
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### Environment Variables
|
|
739
|
+
|
|
740
|
+
| Variable | Description |
|
|
741
|
+
|----------|-------------|
|
|
742
|
+
| `INTLPULL_API_KEY` | API key for authentication |
|
|
743
|
+
| `INTLPULL_DEBUG` | Enable debug logging |
|
|
744
|
+
|
|
745
|
+
---
|
|
746
|
+
|
|
747
|
+
## Tips & Best Practices
|
|
748
|
+
|
|
749
|
+
1. **Use project-scoped API keys** - Auto-detects project ID, no need to specify `--project`
|
|
750
|
+
2. **Enable parallel mode** (default) - Downloads namespaces concurrently for faster syncs
|
|
751
|
+
3. **Use `--quiet` in CI** - Minimal output, machine-friendly
|
|
752
|
+
4. **Use `--dry-run`** - Preview changes before applying
|
|
753
|
+
5. **Set up Git branch detection** - CLI auto-detects git branch for branch workflows
|
|
754
|
+
|
|
755
|
+
---
|
|
756
|
+
|
|
757
|
+
## Support
|
|
758
|
+
|
|
759
|
+
- Documentation: [docs.intlpull.com](https://docs.intlpull.com)
|
|
760
|
+
- Issues: [GitHub Issues](https://github.com/intlpull/intlpull/issues)
|
|
761
|
+
- Email: support@intlpull.com
|
|
762
|
+
|
|
763
|
+
## License
|
|
764
|
+
|
|
765
|
+
MIT © [IntlPull](https://intlpull.com)
|