Download the PHP package owowagency/wordsmith-cli without Composer
On this page you can find all versions of the php package owowagency/wordsmith-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package wordsmith-cli
Wordsmith CLI
- Usage
- NPM
- Composer
- Github actions
- Commands
- List projects
- Pull
- Push
- Configuration
- Top level
- Targets
- Supported formats
- Example configuration
Usage
NPM
You can use the CLI using npx
or by installing it with your preferred package manager:
You can also install it per project and use it as a script:
Then add the following to your package.json
:
Composer
To use the CLI using composer, install it using:
Then add the following to your composer.json
:
Github actions
To use the CLI in Github actions, use the wordsmith-action
Commands
List Projects
Lists all projects in the scope of the access token, which can be configured in wordsmith.yml
, see Configuration
short | long | type | default | description |
---|---|---|---|---|
-e |
--env |
String |
wordsmith.yml |
Path to the configuration file |
--access-token |
String |
wordsmith.yml |
Access token | |
--verbose |
Bool |
false |
Enables verbose logging |
Pull
Pulls translation files from the API, translation files can be configured in wordsmith.yml
, see Configuration
short | long | type | default | description |
---|---|---|---|---|
-e |
--env |
String |
wordsmith.yml |
Path to the configuration file |
--access-token |
String |
wordsmith.yml |
Access token | |
--verbose |
Bool |
false |
Enables verbose logging |
Push
Pushes translation files to the API, translation files can be configured in wordsmith.yml
, see Configuration
short | long | type | default | description |
---|---|---|---|---|
-e |
--env |
String |
wordsmith.yml |
Path to the configuration file |
--access-token |
String |
wordsmith.yml |
Access token | |
-f |
--force |
Bool |
false |
Overwrite existing translations |
-v |
--verify |
Bool |
false |
Verify pushed translations |
--verbose |
Bool |
false |
Enables verbose logging |
Configuration
Wordsmith CLI accepts YAML configuration files, the default configuration file is wordsmith.yml
but can be overwritten using the --env
flag on push and pull commands
Top level
name | type | description |
---|---|---|
project-id |
Number |
ID of the project |
token |
String |
Access token or environment variable for access token, default: ${{ WORDMSMITH_ACCESS_TOKEN }} |
targets |
Target[] |
See Targets |
Targets
Any remaining properties will be passed on to the API when pushing or pulling.
name | type | description |
---|---|---|
file |
String |
Path to the translation file, {locale} will be replaced with the locale e.g. values-{locale}/strings.xml will become values-en/strings.xml |
default-locale-override |
String? |
Path override for the default locale, this may be useful on Android where the default strings are stored in values/ instead of values-{locale}/ |
locales |
String[] |
Locales to pull/push, defaults to existing project locales |
types |
(pull \| push)[] |
Enables push and/or pull for this target |
file-type |
String |
The file format of the translation file, see Supported formats |
tags |
String[] |
Pull only translations with given tags or attach tags to pushed translations, defaults to [] |
Supported formats
apple-strings
(iOS)android-strings
(Android xml)json
csv
i18next
(i18next)po
(Gettext)apple-xliff
angular-xliff
symfony-xliff