Skip to main content
Version: 0.20.0

Configuration Overview

Invowk™ uses a CUE-based configuration file to customize its behavior. This is where you set your preferences for container engines, includes, runtime defaults, and more.

Configuration File Location​

The configuration file lives in your OS-specific config directory:

PlatformLocation
Linux/other Unix-like$XDG_CONFIG_HOME/invowk/config.cue when set, otherwise ~/.config/invowk/config.cue
macOS~/Library/Application Support/invowk/config.cue
Windows%APPDATA%\invowk\config.cue

These base directories must be absolute. A relative XDG_CONFIG_HOME or APPDATA is ignored and the next base is used (~/.config, or %USERPROFILE%\AppData\Roaming); a relative home directory or USERPROFILE is an error. The user config file and ~/.invowk/cmds therefore never resolve under the current directory.

Every other per-user location follows the same principle and never resolves under the current directory. INVOWK_MODULES_PATH must be absolute (a relative value is an error). The module and provisioning caches derive only from an absolute home or base. A relative SSH_KNOWN_HOSTS entry, or a relative home when SSH keys are needed, makes a non-HTTPS module fetch fail. Other relative XDG_*/LOCALAPPDATA bases are ignored.

Running with HOME unset (services and timers)​

systemd system units without User= run with HOME unset (see systemd.exec(5)); user units inherit it from the user manager. With HOME (or USERPROFILE) unset:

  • the virtual-runtime anchor @home is unavailable, and so are @config, @data, @cache and @state unless the matching XDG_* or AppData variable is set; their INVOWK_ANCHOR_* variables are empty, and a virtual.filesystem.paths mapping on them fails;
  • module fetches over anything but https:// are refused;
  • module commands need INVOWK_MODULES_PATH set to an absolute path, because the default module cache lives under the home directory;
  • container provisioning builds in a temporary directory.

Commands that use no home-derived anchor, no provisioning cache and no SSH fetch run as before. To run the rest, add Environment=HOME=/root (or another absolute directory) or SetLoginEnvironment=yes to the unit, set INVOWK_MODULES_PATH and the XDG_* variables you need to absolute paths, or fetch modules over HTTPS with GITHUB_TOKEN, GITLAB_TOKEN or GIT_TOKEN.

Which Config File Is Used​

Invowk reads exactly one config source, picked in this order:

  1. --ivk-config <path> (-c). The path may be relative to the current directory, since you typed it on that command line.
  2. The INVOWK_CONFIG environment variable. It must be an absolute path; an empty value counts as unset.
  3. The user config file from the table above.
  4. Built-in defaults.

The chosen source is used on its own: values from lower-precedence sources are never merged in, and a lower source is not even read. The current directory is never a config source, so a repository you cd into cannot change your includes, LLM endpoint or container provisioning.

# Select the config file for every invowk call in this shell.
# The path must be absolute; an empty value counts as unset.
export INVOWK_CONFIG=/etc/acme/invowk/config.cue
invowk config show

# --ivk-config still wins over INVOWK_CONFIG
invowk --ivk-config ./ci/config.cue cmd build

A file you name explicitly must work. If --ivk-config or INVOWK_CONFIG points to a missing or invalid file, or INVOWK_CONFIG is relative, invowk stops with exit code 1 before discovering or running any command, and the error names the source and the path. (invowk audit reports it with its scan-error code, 2; invowk agent follows the general contract and exits 1.) An invalid user config file is handled as before: invowk cmd and the other discovery commands report a config-load error and continue with the defaults, while config show and config dump report the error.

config show, config dump and config path honour --ivk-config and INVOWK_CONFIG. config set and config init only touch the user config file, and config set refuses (exit 2) while --ivk-config or INVOWK_CONFIG is active, so it never copies an explicit file's values into your user config.

:::warning Migrating from a current-directory config.cue Earlier versions also read a config.cue from the current directory when no user config existed. That fallback is gone, and nothing warns you: invowk silently uses the defaults. Move the file to the user config path (see invowk config path), or point --ivk-config / INVOWK_CONFIG at it. Scripts that passed -c missing.cue and relied on the old fall-back-to-defaults behaviour now fail. :::

Ignoring the Current Directory's Commands​

--ivk-no-cwd (or INVOWK_NO_CWD=1) stops command discovery from loading the current directory's invowkfile.cue and its sibling *.invowkmod modules, including bypassing fail-closed errors if a current-directory file or module is broken. Configured includes, ~/.invowk/cmds and provisioned modules still apply. It affects invowk cmd (listing, running, @source, --ivk-dry-run, --ivk-watch), completion, workspace invowk validate and invowk module list; explicit targets such as invowk validate <path> and invowk audit <path> are unaffected, and invowk agent cmd create|change --verify is rejected while the switch is on.

INVOWK_NO_CWD accepts 1, t, true, 0, f, false (any case Go's strconv.ParseBool accepts); any other non-empty value is an error. An explicit --ivk-no-cwd or --ivk-no-cwd=false wins over the variable.

# Ignore the current directory's invowkfile.cue and *.invowkmod modules
invowk --ivk-no-cwd cmd

# Wrappers whose commands call invowk again: use the env forms,
# which nested invocations inherit (flags do not)
INVOWK_CONFIG=/etc/acme/invowk/config.cue INVOWK_NO_CWD=1 invowk cmd deploy

Invowk does not translate the flags into environment variables for child processes. If your commands call invowk again, set the env forms in the caller's environment: nested invocations inherit them under the command's normal env_inherit_mode rules.

Creating a Configuration File​

The easiest way to create a configuration file is to use the config init command:

invowk config init

This creates a default configuration file with sensible defaults. If a config file already exists, it won't be overwritten (safety first!).

Viewing Your Configuration​

There are several ways to inspect your current configuration:

Show Human-Readable Config​

invowk config show

This displays your configuration in a friendly, readable format.

Show Raw CUE​

invowk config dump

This outputs the raw CUE configuration, useful for debugging or copying to another machine.

Find the Config File​

invowk config path

This prints your configuration paths (config directory, config file, commands directory, and SSH host key). When --ivk-config or INVOWK_CONFIG selects a file, it also prints that Effective config file: with its source, marked [missing] or [invalid: must be absolute] when it would not load. Handy when you want to find and edit your config directly.

:::info SSH host key When a command uses enable_host_ssh (container-to-host callbacks), invowk generates a private SSH host key at <config-dir>/ssh/host_ed25519 on first use and reuses it afterwards, so the built-in server keeps a stable host identity. Keep this file private — treat it like any other private key when backing up or syncing your config directory. :::

Setting Configuration Values​

You can modify configuration values from the command line:

# Set the container engine
invowk config set container_engine podman

# Set the default runtime
invowk config set default_runtime virtual-sh

# Set the color scheme
invowk config set ui.color_scheme dark

Or just open the config file in your favorite editor:

# Linux
$EDITOR ~/.config/invowk/config.cue

# macOS
$EDITOR ~/Library/Application Support/invowk/config.cue

# Windows PowerShell
notepad "$env:APPDATAinvowkconfig.cue"

Example Configuration​

Here's what a typical configuration file looks like:

// ~/.config/invowk/config.cue

// Container engine: "podman" or "docker"
container_engine: "podman"

// Additional modules to include in discovery
includes: [
{path: "/home/user/.invowk/modules/tools.invowkmod"},
{path: "/home/user/projects/shared.invowkmod", alias: "shared"},
]

// Default runtime for commands that don't specify one
default_runtime: "native"

// Virtual runtime family configuration
virtual: {
utilities: {
enabled: true
}
}

// UI preferences
ui: {
color_scheme: "auto" // "auto", "dark", or "light"
verbose: false
interactive: false // Enable alternate screen buffer mode
}

// Example LLM backend override for invowk agent and audit --llm.
// Default config uses llm: {} until a provider or API is configured.
llm: {
provider: "codex"
model: "gpt-5.1-codex"
timeout: "2m"
concurrency: 2
}

// Container provisioning
container: {
auto_provision: {
enabled: true
strict: false
binary_path: ""
includes: []
inherit_includes: true
cache_dir: ""
}
tui_server_bind: "restricted"
selinux_labeling: "enabled"
}

What's Next?​

Head over to Configuration Options for a complete reference of all available settings.