TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/mikronita/mikrom/llms.txt
Use this file to discover all available pages before exploring further.
mikrom CLI stores its settings in a TOML file on disk and optionally merges in environment variable overrides at startup. Understanding the configuration model is particularly important when pointing the CLI at a self-hosted Mikrom instance, switching between multiple projects, or setting up automation with Personal Access Tokens instead of interactive session credentials.
Config File Location
The configuration file is resolved in the following order of precedence:- The path in the
MIKROM_CONFIG_PATHenvironment variable (if set). - The platform default:
~/.config/mikrom/config.tomlon Linux and macOS (using thedirscrate convention). On macOS this resolves to~/Library/Application Support/mikrom/config.toml, and on Windows to%APPDATA%\mikrom\config.toml.
Config File Format
A fully populated configuration file looks like this:Configuration Keys
| Key | CLI name | Default | Description |
|---|---|---|---|
api_url | api-url | http://localhost:5001 | Base URL of the Mikrom API |
token | — | (none) | Session token written by mikrom auth login |
active_project_slug | active-project | (none) | 6-char project slug used as the active tenant context |
request_timeout_secs | — | 30 | HTTP request timeout in seconds |
delete_timeout_secs | — | 120 | Timeout for delete operations in seconds |
restore_timeout_secs | — | 60 | Timeout for snapshot restore operations in seconds |
long_timeout_secs | — | 30 | Timeout for long-polling operations in seconds |
The
active_project_slug field is also accepted under the legacy alias active_tenant_id for backwards compatibility with older config files.The mikrom config Commands
Display current settings
Set a configuration value
Environment Variable Overrides
The CLI loads a.env file from the working directory (via dotenvy) and then applies any MIKROM_*-prefixed environment variables (via envy). Environment variables take precedence over the config file.
| Environment variable | Config key | Description |
|---|---|---|
MIKROM_API_URL | api_url | Override the API base URL |
MIKROM_TOKEN | token | Override the authentication token |
MIKROM_ACTIVE_PROJECT_SLUG | active_project_slug | Override the active project slug |
MIKROM_REQUEST_TIMEOUT_SECS | request_timeout_secs | Override request timeout |
MIKROM_DELETE_TIMEOUT_SECS | delete_timeout_secs | Override delete timeout |
MIKROM_RESTORE_TIMEOUT_SECS | restore_timeout_secs | Override restore timeout |
MIKROM_LONG_TIMEOUT_SECS | long_timeout_secs | Override long-polling timeout |
MIKROM_CONFIG_PATH | — | Use a custom path for the config file |
Authentication Tokens
When you runmikrom auth login, the returned session token is written to the token field in the config file:
Personal Access Tokens (PATs)
For automation workflows — CI pipelines, scripts, or tooling that runs without an interactive session — use a Personal Access Token instead of a session credential.Project Context
All resource commands operate within the scope of the active project. There are two ways to switch context:mikrom project switch <tenant-id>— persists the change to the config file and updates the active project for all subsequent commands.mikrom config set active-project <tenant-id>— writes the slug directly to the config file with no additional API call.
The
active_project_slug is a 6-character slug, not a display name. Use mikrom project list to find the correct value.Configuring the CLI for a Self-Hosted Instance
Authenticate
Log in with your account credentials. The session token is saved to the config file automatically:Confirm the session is active:
Set the active project
List your projects to find the 6-char tenant slug, then set it as the active context: