@intlpullhq/cli 0.1.2 → 0.1.4

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.
Files changed (3) hide show
  1. package/README.md +50 -32
  2. package/dist/index.js +584 -537
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  - **Real-time Sync** - Watch for changes and auto-update local files
26
26
  - **Auto-detect Project** - Automatically finds `.intlpull.json` in parent directories
27
27
  - **Multiple Output Formats** - JSON, YAML, TypeScript, Android XML, iOS Strings
28
- - **CI/CD Ready** - Non-interactive mode for automation pipelines
28
+ - **CI/CD Ready** - Full non-interactive mode support for automation pipelines (no TTY required)
29
29
  - **OTA Releases** - Publish over-the-air updates for mobile/web SDKs
30
30
  - **Enterprise Workflows** - Approval workflows for translation review
31
31
  - **Migration Tools** - Migrate from Lokalise, Crowdin, Phrase, or local files
@@ -498,37 +498,12 @@ npx @intlpullhq/cli migrate from lokalise --api-key <key> --dry-run
498
498
  **Options:**
499
499
  | Option | Description |
500
500
  |--------|-------------|
501
- | `--api-key <key>` | API key for source platform |
501
+ | `--api-key <key>` | API key for source platform (required in CI/CD) |
502
502
  | `--project-id <id>` | Specific project to migrate |
503
503
  | `--to <id>` | Target IntlPull project ID |
504
504
  | `--dry-run` | Preview without importing |
505
505
 
506
- #### Compare Pricing
507
-
508
- ```bash
509
- # Compare with all competitors
510
- npx @intlpullhq/cli compare
511
-
512
- # Compare specific competitor
513
- npx @intlpullhq/cli compare --from lokalise
514
-
515
- # Custom usage parameters
516
- npx @intlpullhq/cli compare --keys 10000 --languages 5 --users 10
517
-
518
- # JSON output
519
- npx @intlpullhq/cli compare --json
520
- ```
521
-
522
- **Options:**
523
- | Option | Description |
524
- |--------|-------------|
525
- | `--from <provider>` | Specific competitor: `lokalise`, `crowdin`, `phrase` |
526
- | `--keys <n>` | Number of translation keys (default: 5000) |
527
- | `--languages <n>` | Number of languages (default: 3) |
528
- | `--users <n>` | Number of team members (default: 5) |
529
- | `--json` | Output as JSON |
530
-
531
- ---
506
+ > **Note:** In non-interactive environments (CI/CD), the `--api-key` flag is required.
532
507
 
533
508
  ### Workflows (Enterprise)
534
509
 
@@ -669,10 +644,27 @@ npx @intlpullhq/cli zendesk disconnect
669
644
 
670
645
  ## CI/CD Integration
671
646
 
647
+ All CLI commands support **non-interactive mode** and work without a TTY. The CLI automatically detects when running in a non-interactive environment (CI/CD pipelines, Docker, scripts) and adjusts its behavior accordingly.
648
+
649
+ ### Non-Interactive Mode
650
+
651
+ Commands automatically work in non-interactive environments:
652
+
653
+ | Command | Non-Interactive Behavior |
654
+ |---------|-------------------------|
655
+ | `upload` / `push` | Auto-confirms plan limit warnings |
656
+ | `download` / `pull` | Works with `--quiet` flag |
657
+ | `init` | Auto-detects framework (use `-y` for explicit) |
658
+ | `sync` | Full support |
659
+ | `check` / `fix` | Full support |
660
+ | `diff` | Full support |
661
+ | `import` / `export` | Full support |
662
+ | `migrate files` | Use `--yes` flag to skip prompts |
663
+ | `migrate from` | Requires `--api-key` flag |
664
+
672
665
  ### Docker
673
666
 
674
667
  ```dockerfile
675
- # Dockerfile
676
668
  FROM node:20-alpine
677
669
 
678
670
  WORKDIR /app
@@ -682,6 +674,25 @@ RUN npx @intlpullhq/cli sync --quiet
682
674
  RUN npm run build
683
675
  ```
684
676
 
677
+ ### GitHub Actions
678
+
679
+ ```yaml
680
+ name: Sync Translations
681
+ on: [push]
682
+ jobs:
683
+ sync:
684
+ runs-on: ubuntu-latest
685
+ steps:
686
+ - uses: actions/checkout@v4
687
+ - uses: actions/setup-node@v4
688
+ with:
689
+ node-version: '20'
690
+ - name: Sync translations
691
+ env:
692
+ INTLPULL_API_KEY: ${{ secrets.INTLPULL_API_KEY }}
693
+ run: npx @intlpullhq/cli sync --quiet
694
+ ```
695
+
685
696
  ### GitLab CI
686
697
 
687
698
  ```yaml
@@ -701,17 +712,24 @@ sync-translations:
701
712
  Add `INTLPULL_API_KEY` to your environment variables and update your build command:
702
713
 
703
714
  ```bash
704
- # Build command
705
715
  npx @intlpullhq/cli sync --quiet && next build
706
716
  ```
707
717
 
708
- ### Pre-commit Hook
718
+ ### Pre-commit Hook (`.husky/pre-commit`)
709
719
 
710
720
  ```bash
711
- # .husky/pre-commit
712
721
  npx @intlpullhq/cli check --source en
713
722
  ```
714
723
 
724
+ ### Recommended CI/CD Flags
725
+
726
+ | Flag | Description |
727
+ |------|-------------|
728
+ | `--quiet` or `-q` | Suppress output except errors |
729
+ | `--dry-run` | Preview changes without applying |
730
+ | `--yes` or `-y` | Skip confirmation prompts |
731
+ | `--no-parallel` | Disable parallel fetching (if rate limited) |
732
+
715
733
  ---
716
734
 
717
735
  ## Configuration