Recontent.app CLI
Ship localized content faster without loosing engineers time
Installation
Recontent CLI, or recontent
, is a command-line interface to Recontent for use in your terminal or your scripts.
It can be installed through Homebrew
:
brew tap recontentapp/recontent
brew install recontent
Or using one of the binaries published on the Releases page.
Configuration
Define an environment variable named RECONTENT_API_KEY
to authenticate with your Recontent workspace.
An API key can be generated from your workspace settings.
Using the CLI
# List projects
recontent get projects
# List languages
recontent get languages
# List languages within a project
recontent get languages -p <project_id>
# Export phrases & translations in all languages as JSON files
# Possible outputs include json|json_nested|yaml|yaml_nested
recontent export phrases -p <project_id> -o json
# Export phrases & translations for a specific language within a revision
recontent export phrases -p <project_id> -l <language_id> -r <revision_id>
# Export phrases & translations in all languages with a custom file structure
# Possible format variables include LanguageLocale|LanguageName|FormatExtension
recontent export phrases -p <project_id> -f "i18n/{{.LanguageLocale}}.{{.FormatExtension}}"
# Export links
recontent export links -p <project_id> -f "constants/links.{{.FormatExtension}}"
Contributing
When pulling updates, make sure to include ones from submodules using:
git pull --recurse-submodules
# Update submodules
git submodule update --remote
Build the client
Prerequisites:
make build-client