test / test (push) Failing after 2s
release / validate (push) Successful in 2s
release / build (linux-amd64, linux-amd64) (push) Successful in 38s
release / build (macos-arm64, macos-arm64) (push) Successful in 45s
release / build (linux-arm64, linux-arm64) (push) Successful in 1m19s
release / release (push) Successful in 15s
Single-binary CLI that injects environment variables from an OpenBao server into the shell via eval "$(envbao)". - Strict permission policy for ~/.envbao (exits 78 if unsafe) - KV v1/v2 engine with auto-detection, pluggable engine registry - Safe quoting for bash/zsh/sh/fish, protected-variable denylist - Audit logging (stderr, private rotating file, syslog); no secrets logged - Gitea pipelines for tests and SemVer-tag releases - PyInstaller spec, docs, BSD-3-Clause licence Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
Configuration reference
File: ~/.envbao/config.toml. Unknown keys and wrong types are rejected, so typos fail loudly.
[server]
| Key | Type | Default | Description |
|---|---|---|---|
address |
string | required | Base URL, e.g. https://bao.example.com:8200. No credentials in the URL. |
token |
string | OpenBao token. Exactly one of token / token_file is required. |
|
token_file |
string | Path (~ expanded) to a file containing the token. Must pass the same permission policy (owner only, not a symlink). |
|
namespace |
string | Sent as X-Vault-Namespace. |
|
ca_cert |
string | system store | PEM CA bundle used to verify the server. |
timeout |
number | 5 |
Per-request timeout in seconds. |
allow_insecure_http |
bool | false |
Permit http:// to a non-loopback host. Loopback (127.0.0.1, ::1, localhost) is always allowed over HTTP. Not recommended: the token travels in clear. |
[security]
| Key | Type | Default | Description |
|---|---|---|---|
allow_protected |
list of strings | [] |
Protected variable names (see security.md) that secrets may set, e.g. ["PATH"]. |
[[query]]
One table per secret source. Queries run in order; later ones override earlier ones.
Common keys:
| Key | Type | Default | Description |
|---|---|---|---|
engine |
string | "kv" |
Secret engine. Currently only kv. |
keys |
list of strings | all | Only export these keys from the secret. |
rename |
table | {} |
Map secret key → variable name. Applied before prefix. |
prefix |
string | "" |
Prepended to every variable name. |
on_missing |
"warn" | "error" |
"warn" |
What to do if the secret or a listed key does not exist. error aborts the whole run. |
engine = "kv"
| Key | Type | Default | Description |
|---|---|---|---|
mount |
string | required | KV mount path, e.g. secret. |
path |
string | required | Secret path within the mount. |
kv_version |
1 | 2 | "auto" |
"auto" |
auto queries sys/internal/ui/mounts/<mount>; set explicitly if the token cannot read that endpoint. |
Names that are not valid variable names ([A-Za-z_][A-Za-z0-9_]*) are skipped with a warning.
Adding an engine
Implement envbao.engines.Engine (validate and fetch) in a new module under
src/envbao/engines/, register it in ENGINES, and document its options here. Filtering,
renaming, prefixing, name validation and rendering are shared.