Examples
Basic Text Extraction
Section titled “Basic Text Extraction”# Navigate to your Flutter projectcd my_flutter_app
# Extract text and generate translation filestransflow-cli extract
# Check the outputls transflow_output/# Output: translations.json app_en.arbAdvanced Usage
Section titled “Advanced Usage”# Extract from specific path with JSON output onlytransflow-cli extract -p ./lib/screens -f json
# Extract and replace text in files (with backup)transflow-cli extract -r
# List project structure firsttransflow-cli listTranslation Workflow
Section titled “Translation Workflow”# 1. Extract text from your Flutter projecttransflow-cli extract -p ./my_flutter_app
# 2. Check the generated ARB filecat transflow_output/app_en.arb
# 3. Save your API key (one-time setup)transflow-cli set-api-key -k your-api-key-here
# 4. Translate to French (uses saved API key)transflow-cli translate -f transflow_output/app_en.arb -t fr
# 5. Translate to Spanish (uses saved API key)transflow-cli translate -f transflow_output/app_en.arb -t es
# 6. Use the translated files in your Flutter app# app_fr.arb, app_es.arb are now ready for useAPI Key Management
Section titled “API Key Management”# Save your API key securely (one-time setup)transflow-cli set-api-key -k your-api-key-here
# Use translation without specifying API keytransflow-cli translate -f app_en.arb -t fr
# Override saved key for a specific commandtransflow-cli translate -f app_en.arb -t es --api-key different-key
# Test API connectiontransflow-cli translate -f app_en.arb -t fr --test-api