Activation¶
Activation is intentionally explicit. The package prints a Bash snippet that bootstraps completion and lazily refreshes the cache when required.
Print the snippet¶
acs-refresh print-activation \
--factory mypackage.cli:build_parser \
--cli-name mycli \
--distribution mycli \
--entrypoint mycli
Load it in Bash¶
For a per-user setup, append the snippet to a completion file or source it from your shell startup:
eval "$(
acs-refresh print-activation \
--factory mypackage.cli:build_parser \
--cli-name mycli \
--distribution mycli \
--entrypoint mycli
)"
What the snippet does¶
The generated code:
- computes a runtime signature for the installed executable
- decides whether artifacts need refresh
- runs
acs-refresh refreshonly when needed - sources the generated
completion-v1.bash - registers the completion function for your CLI
Entry points¶
Set --entrypoint when the executable name differs from --cli-name or when you want refresh checks tied to a specific command on PATH.
If omitted, the runtime falls back to the CLI name.
Operational advice¶
- keep the activation snippet stable
- let the generated cache refresh lazily
- avoid rebuilding completion on every shell startup unless you have a strong reason