Writes a ct.yml in the current folder. It does not need an API key, and it fails when a ct.yml already exists.
SH
ct init --project 0197a3c2-5b1e-7c4a-9d2f-3e8b6a1f0c55 --source locales/en.json --pattern "locales/{lang}.json"| Option | Required | Effect |
|---|---|---|
--project <uuid> | yes | The id of the project, shown in the Use the CLI card under Project settings → API keys |
--source <file> | yes | The file with your source strings |
--pattern <path> | yes | Where translations are written. It must contain {lang} |
--format <format> | no | The file format, json by default. See File formats |
--source-language <code> | no | Language code of the source file, en by default |
--default-branch <name> | no | The Git branch that maps to main, main by default |
For the settings in the file, see Configuration.