Configuration
Markdownidx works without configuration. To change defaults, use the config file, environment variables or flags. When they disagree, the first one wins:
- command-line flags
- environment variables
- the config file
- built-in defaults
Config file
Section titled “Config file”~/.config/idx/config.toml (or $XDG_CONFIG_HOME/idx/config.toml):
idx config init # write the defaults belowidx config set general.output jsonidx config get cache.quote_ttlidx config pathidx config prints plain text, even when piped, so $(idx config path) works
in scripts. Ask for JSON with -o json, IDX_OUTPUT=json, or
output = "json".
[general]provider = "msn" # msn | yahoo | stockbithistory_provider = "auto" # auto | yahoo | msn | stockbitexchange = "JK"output = "auto" # auto | table | json | jsonlcolor = true
[cache]quote_ttl = 300 # secondsfundamental_ttl = 3600
[ownership]# db_path = "/path/to/ownership.db"# snapshot_manifest = "https://..."Environment variables
Section titled “Environment variables”| Variable | Overrides |
|---|---|
IDX_PROVIDER |
general.provider |
IDX_HISTORY_PROVIDER |
general.history_provider |
IDX_EXCHANGE |
general.exchange |
IDX_OUTPUT |
general.output |
IDX_NO_COLOR |
general.color (1 or true disables colour) |
IDX_CACHE_QUOTE_TTL |
cache.quote_ttl |
IDX_CACHE_FUNDAMENTAL_TTL |
cache.fundamental_ttl |
IDX_OWNERSHIP_SNAPSHOT_MANIFEST |
ownership.snapshot_manifest |
IDX_CURL_IMPERSONATE_BIN |
path to a curl_chrome* binary |
IDX_STOCKBIT_REFRESH_TOKEN |
seeds a Stockbit session when none is stored |
IDX_STOCKBIT_ACCESS_TOKEN |
seeds the session’s access token |
Files idx keeps
Section titled “Files idx keeps”| What | Where |
|---|---|
| Config | ~/.config/idx/config.toml |
| Cache | ~/.cache/idx/ (idx cache info, idx cache clear) |
| Ownership database | ~/.local/share/idx/ownership.db |
Stockbit session (after idx stockbit login) |
~/.config/idx/stockbit-session.json, owner-only |
The MCP server reads the same config, cache and database.
Offline and caching
Section titled “Offline and caching”Quotes are cached for quote_ttl seconds and fundamentals for
fundamental_ttl. --offline makes no network requests and serves cached
data, even when stale; --no-cache always fetches.