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
| Module | Responsibility |
|---|---|
errors | Structured error types (errors::Context7Error) |
i18n | Bilingual i18n (EN/PT) — i18n::Message variants and i18n::t lookup |
storage | XDG config storage, four-layer key hierarchy, keys subcommand operations |
api | HTTP client, retry-with-rotation, Context7 API calls and response types |
output | All terminal output — the only module allowed to use println! |
cli | Clap 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
WorkerGuardfromtracing-appender.
Functions§
- init_
logging - Initialises dual logging: terminal (stderr with ANSI) and log file.
- run
- Main library entry point called from
src/main.rs.