-
Notifications
You must be signed in to change notification settings - Fork 9
Home
A powerful command-line interface for the Smartling Translation Management Platform built in Go. Automate translation workflows, manage files, and leverage machine translation capabilities directly from your terminal.
- Install the CLI for your platform
-
Configure your credentials:
smartling-cli init -
Upload your first file:
smartling-cli files push my-file.txt --job "My First Job"
- File Management: Upload, download, list, and organize translation files
- Job-Based Workflows: Automatic job creation and management for translation projects
- Machine Translation: Detect languages and translate content using Smartling's MT engine
- Bulk Operations: Process multiple files with pattern matching and wildcards
- Project Management: View project details, locales, and translation status
- Flexible Configuration: Command-line flags, config files, and environment variables
The Smartling CLI continues to evolve with new features and improvements. For the latest release information, including new features, bug fixes, and breaking changes, see our GitHub Releases.
Key capabilities include:
- Job-based file uploads for better organization and workflow management
- Machine translation commands for language detection and translation
- Enhanced configuration management with clear value hierarchy
- File type override support for flexible file handling
- Comprehensive command documentation optimized for automation
Choose your platform:
- Windows, macOS, Linux - Binary downloads
- From Source - Build with Go
- Getting Started - First-time setup
- Commands documentation - Documentation for commands
- Command Examples - Common usage patterns
- Migration Guide - Upgrading from older versions
- Breaking Changes - Important compatibility notes
Access comprehensive help for any command:
smartling-cli --help
smartling-cli files push --help
smartling-cli mt translate --helpCreate a configuration file with your Smartling API credentials:
smartling-cli initThis creates a smartling.yml file in your current directory with your project settings. Note: Running init again will overwrite the existing configuration file.
The CLI uses the following priority order for configuration values:
- Command-line flags (highest priority)
- Configuration file values
- Environment variables
- Default values (fallback)
# Upload files to a translation job
smartling-cli files push my-file.txt --job "Website Update" --authorize
# Upload multiple files with pattern matching
smartling-cli files push "src/**/*.json" --job "App Localization"
# Download translated files
smartling-cli files pull "**/*.json" --locale fr-FR --locale de-DE
# List project files
smartling-cli files list
# Check file status across locales
smartling-cli files status# Detect file language
smartling-cli mt detect document.txt
# Translate with automatic language detection
smartling-cli mt translate document.txt --target-locale es-ES
# Translate with explicit source language
smartling-cli mt translate document.txt --source-locale en --target-locale fr-FR# View project information
smartling-cli projects info
# List all target locales
smartling-cli projects locales
# List all projects in your account
smartling-cli projects listOverride configuration values with command-line flags:
smartling-cli files list \
--project "PROJECT_ID" \
--account "ACCOUNT_ID" \
--config "/path/to/config.yml"Organize files with branch prefixes:
# Manual branch naming
smartling-cli files push "**/*.txt" --branch "feature-branch"
# Automatic Git branch detection
smartling-cli files push "**/*.txt" --branch "@auto"Use powerful glob patterns for bulk operations:
# All JSON files in subdirectories
smartling-cli files push "**/*.json"
# Specific file types
smartling-cli files push "**/*.{json,xml,properties}"
# Files matching naming convention
smartling-cli files push "**/messages_*.properties"Job-Based File Uploads: The files push command now creates translation jobs by default.
- New behavior: All files upload to a Smartling job
- Default job name: "CLI uploads" (if not specified)
-
Authorization: Jobs remain unauthorized unless
--authorizeflag is used -
Locale targeting: Files added to all project locales unless
--localespecified
Updated Command Format:
# New recommended format
smartling-cli files push <file> <uri> --job <job_name> [--authorize] [--locale <locale>]
# Legacy format still works but creates "CLI uploads" job
smartling-cli files push <file> <uri>Directory Flag Change: Global flag -d, --directory replaced with --operation-directory.
# Before (v2.0 and earlier)
smartling-cli -d /path/to/project [command]
# After (v2.1+)
smartling-cli --operation-directory /path/to/project [command]Update file upload commands to use the new job-based workflow:
-
Add job specification:
# Before smartling-cli files push my-file.txt # After smartling-cli files push my-file.txt --job "My Translation Job"
-
Review locale targeting:
# Target specific locales only smartling-cli files push my-file.txt --job "My Job" --locale fr-FR --locale de-DE
-
Enable automatic authorization if needed:
smartling-cli files push my-file.txt --job "My Job" --authorize
Job reuse: CLI automatically reuses existing jobs with the same name. If a job is Canceled or Closed, a new job is created with a timestamp suffix.
Update directory flags in scripts and automation:
# Replace all instances of -d or --directory
sed 's/--directory/--operation-directory/g' your-script.sh
sed 's/-d /--operation-directory /g' your-script.sh- Review command syntax - Major architectural changes in 2.0+
- Test existing workflows for compatibility
- Update configuration files to new YAML format if needed
- Check authentication setup with new credential hierarchy
For detailed compatibility information, see our GitHub releases.
Find comprehensive examples for common use cases:
- File Management - Upload, download, organize files
- Machine Translation - Language detection and translation
- Project Operations - Project and locale management
The CLI uses standard output streams:
- stdout: Normal operation results and data
- stderr: Error messages and diagnostic information
For troubleshooting, check our Breaking Changes section or review the GitHub issues.
- API Documentation - Smartling REST API reference
- GitHub Repository - Source code and issue tracking
- Release Notes - Detailed version history
- Support Portal - Smartling platform documentation