Skip to main content

Crate context7_cli

Crate context7_cli 

Source
Expand description

context7-cli library crate.

Exposes the public module hierarchy and the top-level run entry point used by the binary crate in src/main.rs.

§Module overview

ModuleResponsibility
errorsStructured error types (errors::Context7Error)
i18nBilingual i18n (EN/PT) — i18n::Message variants and i18n::t lookup
storageXDG config storage, four-layer key hierarchy, keys subcommand operations
apiHTTP client, retry-with-rotation, Context7 API calls and response types
outputAll terminal output — the only module allowed to use println!
cliClap structs, subcommand dispatchers

Modules§

api
HTTP client, retry logic, and Context7 API calls.
cli
CLI argument definitions and command dispatchers.
errors
Error types for the context7-cli library.
health
Health check subcommand implementation.
i18n
Bilingual internationalisation (EN/PT-BR) for user-facing messages.
output
Terminal output formatting.
platform
Platform-specific initialisation (Windows UTF-8 + ANSI). Platform-specific initialization for console encoding and ANSI support.
storage
XDG storage backend for API keys (four-layer hierarchy).

Structs§

LogGuard
Wraps the WorkerGuard from tracing-appender.

Functions§

init_logging
Initialises dual logging: terminal (stderr with ANSI) and log file.
run
Main library entry point called from src/main.rs.