Setup
setup
Interactive credential setup — the axm-vault setup driver.
:func:run_setup walks the discovered credential catalog and, for every
spec, prompts the operator for a value and routes it to its store by
sensitivity: SECRET values go to the OS keyring (presence is derived by
probing the keyring, never recorded as a separate marker), CONFIG values go
to axm-config. NONSENSITIVE credentials are environment-only and are never
prompted nor stored — storing them would create a second, stale source of
truth.
The driver is a genuine process-lifecycle command (it reads from a TTY and
blocks on operator input), which is why it lives as a plain function behind
the cyclopts CLI rather than as an :class:~axm.tools.base.AXMTool. It
refuses to run without a TTY (no silent, non-interactive credential writes)
and is idempotent: a blank answer keeps any existing value untouched, so a
re-run only fills in what is still missing.
run_setup(only=None)
Prompt for and store every storable credential in the catalog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
only
|
str | None
|
When given, restrict setup to the single |
None
|
The function refuses to run without an interactive TTY (writes
:class:SystemExit 1 to stderr). NONSENSITIVE specs are skipped
(environment-only); SECRET specs are read with :func:getpass.getpass
and CONFIG specs with :func:input. A blank answer keeps the existing
value, making the driver idempotent across re-runs.