cli

module
v0.0.0-...-1a703b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2023 License: Apache-2.0

README

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

Directories

Path Synopsis
cmd
pkg
client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL