Skip to main content

Module config

Module config 

Source
Expand description

Comindly configuration — persistent defaults for the data location and model choices.

Precedence, highest first: CLI flag → environment variable → config.toml → built-in default. Secrets (OPENAI_API_KEY) are never read from the file; keep them in the environment.

Structs§

Config
Non-secret preferences, all optional. Read from config.toml if present.
RepoEntry

Enums§

Setting
A setting to write: a string, a flag or a number; Remove deletes the key.

Functions§

config_dir
comindly’s config folder.
config_path
$XDG_CONFIG_HOME/comindly/config.toml, else ~/.config/comindly/config.toml.
data_dir
$XDG_DATA_HOME/comindly, else ~/.local/share/comindly: the default index and managed clones.
default_index_dir
The default index location: the data folder itself.
env
An environment variable, if set.
expand_tilde
Expand a leading ~ to $HOME; leave URIs (s3://…) and absolute paths untouched.
init
Write a commented config.toml with the resolved defaults. Without force, errors if one already exists (the caller handles confirmation).
set_repos
Replace the repository list in config.toml.
ui_token
The web UI’s access token for browsers: created once, so bookmarks keep working.
update
Write changes into config.toml, keeping its comments and layout.