Expand description
LC (LLM Client) Library
This library provides the core functionality for the LC CLI tool, including configuration management, provider handling, and chat functionality.
§Platform Differences
This crate includes platform-specific features that are only available on certain operating systems:
§Unix Socket Support
Unix socket functionality is only available on Unix-like systems (Linux, macOS, BSD, WSL2) and requires
the unix-sockets feature to be enabled.
§MCP Daemon
The MCP (Model Context Protocol) daemon functionality uses Unix domain sockets for inter-process communication and is therefore only available on Unix systems:
- Unix systems (Linux, macOS, WSL2): Full MCP daemon support with persistent connections
- Windows: MCP daemon is not supported; direct MCP connections work on all platforms
§Usage Statistics
Usage statistics functionality works on all platforms (Windows, macOS, Linux, WSL2). It uses SQLite database which has full cross-platform support.
§Feature Flags
unix-sockets: Enables Unix socket functionality (default on Unix systems)pdf: Enables PDF processing support (default)
To build without Unix socket support:
cargo build --no-default-features --features pdfTo build with all features:
cargo build --features "unix-sockets,pdf"Re-exports§
pub use config::CachedToken;pub use config::Config;pub use config::ProviderConfig;pub use provider::ChatRequest;pub use provider::Message;pub use provider::OpenAIClient;
Modules§
- chat
- cli
- completion
- Shell completion support for the lc CLI
- config
- Configuration management for the lc CLI tool
- database
- dump_
metadata - error
- http_
client - image_
utils - input
- mcp
- Model Context Protocol (MCP) client implementation using the official Anthropic Rust SDK
- mcp_
daemon - MCP Daemon Service for persistent MCP connections across CLI invocations
- model_
metadata - models_
cache - provider
- proxy
- readers
- search
- sync
- Configuration synchronization module
- template_
processor - test_
utils - Test utilities for managing test providers and cleanup
- token_
utils - unified_
cache - usage_
stats - vector_
db - webchatproxy
Macros§
- debug_
log - test_
with_ cleanup - Macro to wrap test functions with automatic setup and cleanup