init
Creates i18nprune.config.ts (or .mts / .js / .mjs) when missing — interactive unless --yes (global).
Scaffolded files import defineConfig and I18nPruneConfig from i18nprune/core/config and end with satisfies Partial<I18nPruneConfig> so the editor type-checks your object literal against the same shape the CLI validates (after load, the loader still merges defaults and runs Zod).
If a config file is already present (any supported name), the command prints an info line and does not overwrite anything.
--rich: expanded starter:patching,scanner,output,policies,reference,localeLeaves,missing,translate(Google row live; other backends commented withcontactEmail,baseUrl,apiKey, LLM triple + env patterns;policy+ examplerateLimiton Google), etc. (i18nprune validateis flag-driven — there is noconfig.validatenamespace today; see config.)- Global flags:
--yeswrites minimal config:translate= Google + commented stubs for other backends,policy,workers: 1. Combine--yes --richfor the annotatedrateLimittemplate. - Config must be TypeScript or JavaScript (
.ts,.mts,.js,.mjs,.cjssupported for discovery); JSON config files are not supported. - See also config.
Examples
bash
i18nprune init
i18nprune init --yes
i18nprune init --yes --richbash
# confirm resolved config path
i18nprune config --json | jq '.data.resolvedConfigPath'