polycli init

Initialise a PolyCLI configuration file in your project root.

Usage

bash
npx @polycli/cli init

Runs an interactive prompt and writes a buildtranslator.json file in the current working directory. Safe to re-run — re-running updates the config without affecting existing lockfiles or translated output files.

Interactive prompts

PromptDefaultConfig field
Source language (e.g. "en" or "it")itsourceLanguage
Target languages, comma-separateden,estargetLanguages
JSON locales folder path./localeslocalesPath
Translate Markdown files? (y/N)N
Markdown files folder path./docsmarkdownPath (optional)

Output

buildtranslator.json
{
  "sourceLanguage": "en",
  "targetLanguages": ["it", "es", "fr"],
  "localesPath": "./locales",
  "markdownPath": "./docs"
}

The markdownPath field is only written when you answer y to the Markdown prompt. See the buildtranslator.json reference for a full description of each field.

You can edit buildtranslator.json manually at any time. Re-running npx @polycli/cli init will overwrite it, so make sure your changes are committed first.