Docs
Cli
CLIConfiguration

Configuration

Where the CLI stores its configuration, and how environments and monorepos are handled.

Configuration files

The CLI keeps per-project configuration in one of two places:

  1. Local config - a .localesy.json file committed alongside your project. This is the recommended approach for teams, since the configuration travels with the repository.
  2. Global config - stored per directory under ~/.localesy/projects/<dir>. Useful when you don't want to add a file to the repository.

You create this configuration with localesy init and inspect it with localesy config.

Note: translation file path patterns are stored without the file extension. The CLI builds the correct file path for each locale automatically - you don't need to manage them by hand.

Credentials

Authentication is stored separately from project configuration, at ~/.localesy/auth.json. It is created by localesy login and removed by localesy logout. Keep this file private.

Environments

If you work against more than one Localesy environment, target a specific one with the --env flag, which is available on most commands:

localesy sync --env production

Multiple projects & monorepos

Each project directory gets its own configuration, so a monorepo can contain several Localesy projects side by side. Run CLI commands from within the relevant directory and the CLI uses that directory's configuration.

Next, authenticate with localesy login.

Was this helpful?
Docs
Copyright © Localesy. All rights reserved.