For the complete documentation index, see llms.txt. This page is also available as Markdown.

Global Configuration

Set and remove user-wide mirrord CLI defaults

mirrord stores user-wide configuration in ~/.mirrord/mirrord.json. Use it for a preference you want to keep across projects, rather than adding the same setting to every project's config file. The CLI creates the file as an empty JSON object when it is missing.

Set a default

Run mirrord config set <PATH> <VALUE> to save a value in the global file. For example, to require the mirrord Operator by default:

mirrord config set operator true

Use false to disable it by default:

mirrord config set operator false

If mirrord successfully starts a session using the Operator, it also remembers operator: true in this file for future sessions. An explicit project config value (including false) or the MIRRORD_OPERATOR_ENABLE environment variable takes precedence over the global default.

To point mirrord at one cluster without changing your kubeconfig's current context, set kube_context:

mirrord config set kube_context staging

Every mirrord command then uses that context, including mirrord up, mirrord ui and the mirrord operator commands. A --context flag, a kube_context in the project config, or the MIRRORD_KUBE_CONTEXT environment variable takes precedence over the global default. Without any of those, mirrord uses the global default if set, otherwise the kubeconfig's current context. If mirrord ui is already running, run mirrord ui stop and start it again so it picks up the change.

PATH is a dot-separated config field name, such as operator or agent.image. VALUE is parsed as JSON when possible (for example, true, 42, or a JSON object); otherwise it is stored as a string. To force a string that looks like JSON, include JSON double quotes in the value, for example mirrord config set agent.image '"true"'. Fields and values must match the mirrord configuration schema. Setting a field within an array by index is not supported.

Remove a default

Run mirrord config unset <PATH> to remove a value from the global file:

mirrord config unset operator

Removing operator restores the usual behavior: mirrord tries the Operator first and can continue without it if unavailable. Removing kube_context makes mirrord follow the kubeconfig's current context again. Unsetting a field that is not present returns an error. Both commands reject invalid config changes rather than saving an invalid file.

You can inspect or edit ~/.mirrord/mirrord.json directly as JSON. The set and unset commands require an existing file to be valid, untemplated JSON; a templated config file can be read during session setup but cannot be updated by these commands.

Last updated

Was this helpful?