@dittowords/cli
TypeScript icon, indicating that this package has built-in type declarations

4.5.0 • Public • Published

Ditto CLI

The Ditto CLI enables developers to access the Ditto API directly from the command line.

NPM version

Documentation

The official documentation can be found here.

Support

Installation

npm install --save-dev @dittowords/cli

It's recommended to install the CLI as a development dependency to ensure your whole team is on the same version.

Authentication

The first time you run the CLI, you’ll be asked to provide an API key. You can generate an API key from your developer integrations settings.

See the Authentication page for more information on API keys.

Configuration

By default, the CLI operates against a ditto/ folder relative to the current working directory.

The first time you run the CLI, a ditto/ folder will be created if it doesn't already exist. The folder will also be populated with a default config.yml file, which is used to control the CLI's behavior.

The default file looks like this:

sources:
  components: true
variants: true
format: flat

For more information on configuring the CLI, see http://developer.dittowords.com/cli-reference/configuration.

Usage

npx @dittowords/cli

Run the CLI to pull string data from Ditto and write it to disk.

String files are written to the ditto folder in a format that corresponds to your configuration. After integrating these files into development, you can execute the CLI at any time to fetch the latest strings from Ditto and update them in your application.

For more information on how files written to disk, see http://developer.dittowords.com/cli-reference/files.

See our demo projects for examples of how to integrate the Ditto CLI in different environments:

Feedback

Have feedback? We’d love to hear it! Message us at support@dittowords.com.

Package Sidebar

Install

npm i @dittowords/cli

Weekly Downloads

8,857

Version

4.5.0

License

MIT

Unpacked Size

556 kB

Total Files

172

Last publish

Collaborators

  • kadenbarlow
  • azjgard
  • ashditto
  • jrod95
  • ouyangatang
  • jo_m