Skip to main content

Module config

Module config 

Source
Expand description

Project and global configuration.

Configuration is stored in .mana/config.yaml (project-level) and ~/.config/mana/config.yaml (global/user-level).

§Loading config

use mana_core::config::Config;
use std::path::Path;

let mana_dir = Path::new("/project/.mana");

// Load project config only
let config = Config::load(mana_dir).unwrap();

// Load with inheritance from `extends` paths (recommended)
let config = Config::load_with_extends(mana_dir).unwrap();
println!("Project: {}", config.project);
println!("Max concurrent agents: {}", config.max_concurrent);

§Config inheritance

A project config can extend shared configs via the extends field:

project: my-project
next_id: 42
extends:
  - ~/shared/mana-config.yaml
  - ../team-defaults.yaml

Extended configs are merged with the local config taking precedence. The project, next_id, and extends fields are never inherited.

Structs§

Config
Project-level mana configuration, loaded from .mana/config.yaml.
GlobalConfig
Minimal global config stored at ~/.config/mana/config.yaml. Only holds user identity fields — project-level config has everything else.
NotifyConfig
Notification configuration for human-facing alerts.
ReviewConfig
Configuration for the adversarial review feature (mana review / mana run --review).

Constants§

DEFAULT_COMMIT_TEMPLATE

Functions§

resolve_identity
Resolve the current user identity using a priority chain: