Localization
Language, region, timezone, and model reply-language settings via nikcli locale. Source: packages/nikcli/src/cli/cmd/locale.ts.
Overview
The locale command controls the language and regional settings used by nikcli
and, optionally, the language in which the underlying model replies. Settings are stored in
the global nikcli config by default (--global is true). Pass
--global false to write to the project-level nikcli.json instead.
When no overrides are set, nikcli auto-detects locale from the environment
(LANG, LC_ALL, system timezone, etc.). Auto-detection can be
disabled permanently with --no-auto-detect in a set call, or
overridden for a single invocation with the environment variables described below.
nikcli locale # show resolved locale (same as "locale show")
nikcli locale show # print current language, region, timezone, currency, reply language
nikcli locale set ... # apply one or more overrides
nikcli locale reset # clear all overrides and return to auto-detect Actions
| Action | Description |
|---|---|
show (default) | Print the fully resolved locale fields: locale tag, language name, region, timezone, currency, reply language, and source (auto-detect, config, or override). |
set | Apply one or more locale overrides. Any flags that are not supplied are left unchanged. |
reset | Delete all stored locale overrides and revert to auto-detection from the environment. |
Flags
All flags apply to the set action. Unrecognised values are stored as-is and resolved at runtime.
| Flag | Format | Description |
|---|---|---|
--language | BCP-47 language subtag (e.g. it, ja, ar) | Sets the primary language for display and model interaction. |
--region | ISO-3166 country code (e.g. IT, JP, US) | Sets the regional variant used for formatting numbers, dates, and currency. |
--locale | BCP-47 full tag (e.g. it-IT, ja-JP) | Sets both language and region in a single value. Overrides --language and --region when all three are supplied. |
--timezone | IANA timezone (e.g. Europe/Rome, Asia/Tokyo, America/New_York) | Sets the timezone used in timestamps and date formatting. |
--currency | ISO-4217 code (e.g. EUR, JPY, USD) | Sets the currency used in cost and usage displays. |
--reply-language | true | false | BCP-47 tag (e.g. fr, de) | Steers the model's answer language independently of the CLI display language. See Reply Language below. |
--no-auto-detect | boolean | Disables automatic locale detection from the environment. Only the stored config values are used. |
--global | boolean (default true) | Write to the global config file. Pass --global false to write to the project-level nikcli.json instead. |
Environment Variable Overrides
Three environment variables override the stored config for a single invocation. They take
effect even if auto-detection is disabled. The resolved locale source shows override
when any of these is set.
| Variable | Description |
|---|---|
NIKCLI_LOCALE | Full BCP-47 locale tag, e.g. it-IT. Overrides both language and region. |
NIKCLI_LANGUAGE | Language subtag only, e.g. ja. |
NIKCLI_REGION | ISO-3166 country code only, e.g. DE. |
# One-off run in Italian, regardless of stored config
NIKCLI_LOCALE=it-IT nikcli run "spiega questo codice"
# Override just the language
NIKCLI_LANGUAGE=de nikcli run "erkläre diesen Code" Examples
# Show the current resolved locale
nikcli locale
# Set Italian locale with Rome timezone and Euro currency
nikcli locale set --language it --region IT --timezone Europe/Rome --currency EUR
# Use the combined BCP-47 tag instead
nikcli locale set --locale it-IT --timezone Europe/Rome --currency EUR
# Ask the model to always reply in Japanese (CLI remains in English)
nikcli locale set --reply-language ja
# Set a project-level override (does not touch global config)
nikcli locale set --language fr --global false
# Disable auto-detection globally
nikcli locale set --no-auto-detect
# Reset all overrides and return to auto-detect
nikcli locale reset