Add TOML config file support to mcrctl

Loads defaults from ~/.config/mcrctl.toml (or XDG_CONFIG_HOME).
Resolution order: flag > env (MCR_TOKEN) > config file.
Adds --config flag to specify an explicit path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-01 17:02:23 -07:00
parent bf206ae67c
commit 0fe52afbb2
4 changed files with 188 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
# mcrctl — Metacircular Container Registry CLI configuration.
# Copy to ~/.config/mcrctl.toml and edit.
server = "https://registry.example.com:8443" # REST API base URL
grpc = "registry.example.com:9443" # gRPC server address (optional)
token = "" # bearer token (MCR_TOKEN env overrides)
ca_cert = "" # custom CA certificate PEM file