Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

The MADO_* variables mado reads, found by grepping the crates and verified at their read sites. Only the four in the first table are ordinary user-facing configuration.

User-facing

VariableRead byMeaning
MADO_REMOTE_ADDRcrates/mado/src/bin/mado.rs (remote_addr)Server address (e.g. http://server:50051). Set = the workspace’s object reads/writes go to a mado serve server over the cached client stack; unset/empty = a local on-disk store under .jj/repo/store. A remote-inited workspace that is loaded with this unset errors clearly.
MADO_TOKENcrates/mado-client/src/auth.rs (token_from_env)Client bearer token attached as authorization: Bearer <token> to every RPC. Must match the server’s --auth-token. Unset or empty = no auth header (matches a server started without --auth-token).
MADO_REMOTE_PREFIXcrates/mado/src/bin/mado.rs (remote_prefix)The client’s repo prefix (blob namespace) for per-repo ACL authorization of op-heads / lease requests. Unset or empty = the default namespace (""), matching a single-tenant mado serve.
MADO_DISK_CACHE_MAX_BYTEScrates/mado/src/lib.rs (with_disk_cache)Byte cap on the persistent disk blob cache. Set = the tier evicts least-recently-used blobs to stay at or below the cap. Unset, empty, 0, or unparseable = unbounded (the default). Read once at client-stack construction, so it applies uniformly to the mount daemon, serve-virtiofs, and the CLI.

Internal / not user-set

These appear in the codebase but are not ordinary configuration knobs:

VariableWhereWhy it is not a config knob
MADO_GIT_TOKEN, MADO_GIT_USERNAMEcrates/mado/src/git_credential.rsmado sets these itself in the child git process’s environment to feed a server-held credential to interop git over the GIT_ASKPASS pattern. You configure the credential with mado serve --git-credential-file (etc.), not by exporting these.
MADO_BENCH_Ncrates/mado-index/src/store.rs, crates/mado-index/src/tests.rsSizes the N of #[ignore]d benchmark tests only. No effect on the shipped binary.
MADO_REAL_TREEcrates/mado/src/real_tree_study.rsPoints the env-gated real-tree study bench at a directory. Test-only; unset skips the bench cleanly.

Note. MADO_INDEX_TYPE shows up as a re-export alias in crates/mado-index/src/lib.rs (pub use store::INDEX_TYPE as MADO_INDEX_TYPE) for a compile-time constant string ("mado", the jj index type name). It is not read from the environment and is not a configuration variable — it is named here only because a MADO_ grep surfaces it.