JSPM

rejexai-cli

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q72685F
  • License MIT

RejexAI CLI for CI/CD integration - App store compliance checks

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rejexai-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    RejexAI CLI

    Command-line interface for RejexAI app store compliance checking. Integrate RejexAI into your CI/CD pipeline to catch rejection issues before submission.

    Installation

    npm install -g @rejexai/cli

    Quick Start

    1. Initialize Configuration

    rejexai init

    This creates .rejexai.json in your project directory. Add your API key from https://rejexai.com/settings

    2. Run Compliance Check

    rejexai compliance \
      --store apple \
      --app-name "My App" \
      --privacy-url "https://myapp.com/privacy" \
      --category "Education" \
      --age-rating "4+"

    3. Analyze Binary File

    rejexai analyze \
      --file ./app-release.apk \
      --store google

    4. Pre-Submission Check

    rejexai precheck \
      --store apple \
      --app-name "My App" \
      --privacy-url "https://myapp.com/privacy" \
      --screenshots 5

    Commands

    rejexai init

    Initialize configuration file

    rejexai compliance

    Run compliance check for app store submission

    Options:

    • --store <type> - Store type: apple or google (required)
    • --app-name <name> - App name (required)
    • --privacy-url <url> - Privacy policy URL (required)
    • --category <category> - App category (optional)
    • --age-rating <rating> - Age rating (optional)
    • --description <text> - App description (optional)
    • --fail-on-warnings - Exit with error code on warnings (optional)

    Example:

    rejexai compliance \
      --store google \
      --app-name "My Awesome App" \
      --privacy-url "https://myapp.com/privacy" \
      --category "Education" \
      --age-rating "Everyone"

    rejexai analyze

    Analyze APK/IPA binary file (Pro feature)

    Options:

    • --file <path> - Path to APK or IPA file (required)
    • --store <type> - Store type: apple or google (required)
    • --output <format> - Output format: json or text (default: text)

    Example:

    rejexai analyze \
      --file ./build/app-release.apk \
      --store google \
      --output json > analysis.json

    rejexai precheck

    Run pre-submission validation

    Options:

    • --store <type> - Store type: apple or google (required)
    • --app-name <name> - App name (required)
    • --privacy-url <url> - Privacy policy URL (required)
    • --screenshots <count> - Number of screenshots (default: 3)

    Example:

    rejexai precheck \
      --store apple \
      --app-name "My App" \
      --privacy-url "https://myapp.com/privacy" \
      --screenshots 5

    CI/CD Integration

    GitHub Actions

    Create .github/workflows/rejexai.yml:

    name: App Store Compliance
    
    on: [push, pull_request]
    
    jobs:
      compliance:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          
          - name: Install RejexAI CLI
            run: npm install -g @rejexai/cli
          
          - name: Run compliance check
            env:
              REJEXAI_API_KEY: ${{ secrets.REJEXAI_API_KEY }}
            run: |
              rejexai compliance \
                --store google \
                --app-name "My App" \
                --privacy-url "https://myapp.com/privacy"

    Setup:

    1. Go to GitHub repo → Settings → Secrets
    2. Add REJEXAI_API_KEY with your API key from https://rejexai.com/settings

    GitLab CI

    Add to .gitlab-ci.yml:

    rejexai_check:
      stage: test
      image: node:18
      script:
        - npm install -g @rejexai/cli
        - rejexai compliance --store google --app-name "My App" --privacy-url "$PRIVACY_URL"
      variables:
        REJEXAI_API_KEY: $REJEXAI_API_KEY

    Bitrise

    Add a Script step:

    #!/bin/bash
    set -e
    
    npm install -g @rejexai/cli
    
    rejexai analyze \
      --file $BITRISE_APK_PATH \
      --store google

    Configuration

    Environment Variables

    • REJEXAI_API_KEY - Your API key (required)
    • REJEXAI_API_URL - API URL (default: https://rejex-production.up.railway.app)

    Config File

    Create .rejexai.json in your project root:

    {
      "apiUrl": "https://rejex-production.up.railway.app",
      "apiKey": "rjx_your_api_key_here"
    }

    Important: Add .rejexai.json to .gitignore!

    Exit Codes

    • 0 - Success (no critical issues)
    • 1 - Failure (critical issues found or errors)

    Use --fail-on-warnings to exit with code 1 on warnings too.

    Output Formats

    Text (default)

    Human-readable output with colors and icons

    JSON

    Machine-readable output for parsing:

    rejexai analyze --file app.apk --store google --output json > results.json

    Examples

    Automated Release Workflow

    name: Release to Play Store
    
    on:
      push:
        tags: ['v*']
    
    jobs:
      validate-and-release:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          
          - name: Build APK
            run: ./gradlew assembleRelease
          
          - name: Analyze with RejexAI
            env:
              REJEXAI_API_KEY: ${{ secrets.REJEXAI_API_KEY }}
            run: |
              npm install -g @rejexai/cli
              rejexai analyze \
                --file app/build/outputs/apk/release/app-release.apk \
                --store google \
                --output json > analysis.json
          
          - name: Check for critical vulnerabilities
            run: |
              CRITICAL=$(jq '.critical_vulnerabilities' analysis.json)
              if [ "$CRITICAL" -gt 0 ]; then
                echo "❌ Cannot release: $CRITICAL critical vulnerabilities"
                exit 1
              fi
          
          - name: Upload to Play Store
            if: success()
            uses: r0adkll/upload-google-play@v1
            with:
              serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
              packageName: com.myapp
              releaseFiles: app/build/outputs/apk/release/app-release.apk
              track: production

    Troubleshooting

    "API key not configured"

    "File not found"

    • Check file path is correct
    • Use absolute path or relative to current directory

    "Request timeout"

    • Binary analysis can take 2-5 minutes for large files
    • Check your internet connection
    • Verify API URL is correct

    "Binary analysis requires Pro subscription"

    Support

    License

    MIT