emusoi

Configuration

Three TOML files, all optional, later files taking precedence:

  1. ~/.config/mia/config.toml: yours, for every repository.
  2. .mia.toml in the main checkout: committed project configuration, shared by every worktree and by everyone who clones the repository.
  3. .git/mia/config.toml: this repository's local overrides; mia config opens it. It is never committed.

Inspect the merged result with mia config show (TOML) or mia config show --json. mia config validate checks all three files and the service declarations. Unknown keys are an error. examples/config.toml shows common keys; examples/compose.toml configures a Compose project. Copy them to .mia.toml for project settings or .git/mia/config.toml for local ones. Keep credentials out of the committed file.

Worktrees

keymeaning
basethe branch new branches start from; unset, the branch the main checkout is on. mia config base <branch> sets it
prefixadded to new branch names, like "you/"
setupa command run in each new worktree
clonefiles copied from the main checkout into new worktrees
commit_timesdate files by their last commit
editoryour editor; otherwise $EDITOR
keepprograms mia resurrect starts again even if they had ended, by their first words: ["tail -f"]. Agents, nvim, vim, hx and the usual dev servers (npm run dev, pnpm dev, …) are kept already. Never one that finishes, like a build
namesplaces to name worktrees after, used before mia's own
[launch]named windows: logs = "tail -f log/dev.log"

[env]

keymeaning
imagethe container image
image_setupbaked into the image
setuprun in each new container
portsports the app serves
pagethe port mia env browse opens
host_portsports on your computer the container can reach
pass_hostsend the original Host header
container_onlypaths kept inside the container, like node_modules
sync_ignorepaths the mirror to another machine leaves out, beyond the built-in ones
cachecontainer paths shared by the repository's environments
passenvironment variables passed from your shell
session"runtime" (default) runs shells on the environment's machine; "local" keeps worktree shells and agents in the local checkout
sync_ignoreadditional relative paths or globs excluded from remote sync
sync_secretsallow .env*, private keys and credential files to sync; false by default

[env.compose]

Use an existing Compose project instead of one container:

[env.compose]
file = "compose.yaml"
service = "app"       # optional; "app" by default

file is relative to the worktree. The selected service is where setup, shells, exec and [[service]] processes run, and the container the gateway reaches. Compose owns images, service environment and volumes, so env.image, env.image_setup, env.pass, env.container_only and env.cache cannot be combined with it. env.setup, env.ports, env.page, env.host_ports, dotfiles and services remain available.

Every Compose service must use an isolated network and leave host ports unpublished; use expose instead. The Compose plugin must support config --format json and ps -q. mia doctor checks it.

[[service]]

id, run, health, autostart, restart ("on-failure" or "on-unhealthy"), grace (seconds).

[tools] and [dotfiles]

keymeaning
[tools] copyfiles copied into environments
[tools] credentialscopied only with mia env tools --credentials
[dotfiles] envfiles for every environment's home
[dotfiles] shellthe shell in environments
[dotfiles] packagespackages installed in environments
[dotfiles] setuprun in every environment
[dotfiles] machinefiles for other machines' home

Plugins

plugins = ["gh"]
menu = ["type", "quiz"]     # the verbs prefix m offers

[plugin.gh]
# that plugin's own settings

mia config <key> [<value>] says or sets one of these without an editor — mia config --global plugin.gh.token … — editing that line only and refusing what mia would not load.

[keys] and [popup] set the old dashboard's keys and popup size. The radar does not read them; they are still loaded, so a config that has them loads.

Edit this page

    ↑↓ choose ⏎ open esc close