Expand description
Terminal output formatting.
This is the only module allowed to call println! or eprintln!.
Functions§
- confirm_
clear - Asks for interactive confirmation before clearing all keys.
- emit_
ndjson - Emits an NDJSON event (one JSON line) to stdout.
- format_
added_ at_ display - Formats an RFC3339 string for compact display:
YYYY-MM-DD HH:MM:SS. - health_
symbol - Returns a colored check/cross symbol for health check results.
- print_
config_ path - Prints a file path to stdout.
- print_
documentation_ formatted - Prints structured documentation from the docs endpoint.
- print_
empty_ json_ array - Prints an empty JSON array
[]to stdout. - print_
exported_ key - Prints a key in
CONTEXT7_API=<value>format to stdout. - print_
health_ line - Prints a health check status line to stdout, respecting
--quiet. - print_
import_ completed - Prints the success message for
keys import. - print_
invalid_ empty_ key - Displays an error when the user tries to add an empty API key.
- print_
invalid_ index - Prints an invalid index error.
- print_
json_ results - Prints raw JSON results to stdout (used by Library and Docs JSON mode).
- print_
key_ added - Prints the success message for
keys add. - print_
key_ already_ existed - Prints the warning message when a key already exists (dedupe).
- print_
key_ format_ warning - Displays a warning when the key does not match the expected
ctx7sk-format. - print_
key_ removed - Prints the success message for
keys remove. - print_
keys_ removed - Prints the success message for
keys clear. - print_
libraries_ formatted - Prints the list of libraries returned by the search endpoint.
- print_
library_ not_ found_ hint - Prints a user-friendly hint when the requested library was not found.
- print_
masked_ keys - Prints all stored keys with 1-based indices and masked values.
- print_
no_ keys - Prints the “no keys stored” hint message.
- print_
no_ keys_ to_ remove - Prints the “no keys to remove” message.
- print_
operation_ cancelled - Prints the cancellation message for
keys clear. - print_
plain_ text - Prints plain text to stdout (used by Docs text mode).
- print_
raw_ json - Prints a raw JSON string to stdout.
- print_
xdg_ unsupported - Prints an “XDG not supported” error for
keys path. - set_
quiet - Enables or disables stdout suppression (
--quietflag).