Shell tab completion¶
loki-cli logs <TAB> completes with the live list of targets from your
active Loki profile. The list is cached at
~/.cache/loki-cli/targets.txt for 60 seconds so repeated TABs are instant.
Completion is silent on any failure so it never breaks your prompt.
Install once per shell:
Then try:
loki-cli logs <TAB><TAB> # lists all targets
loki-cli logs my-host<TAB> # completes the unique match
All subcommands, options, and choice values also get completion for free — Click handles those without a network round-trip.