Skip to main content

limit_cli/
lib.rs

1//! # limit-cli
2//!
3//! AI-powered terminal coding assistant with REPL and TUI interfaces.
4//!
5//! This crate provides the main entry point for the Limit AI coding assistant.
6//! It includes session management, tool execution, markdown rendering, and
7//! both TUI and REPL interfaces.
8//!
9//! ## Features
10//!
11//! - **Multi-provider LLM**: Anthropic Claude, OpenAI GPT, z.ai GLM, and local models
12//! - **18 built-in tools**: File I/O, bash execution, git operations, code analysis
13//! - **Session persistence**: Auto-save and restore conversations
14//! - **Markdown rendering**: Rich formatting with syntax highlighting
15//! - **File autocomplete**: Type `@` to quickly reference files
16//!
17//! ## Usage
18//!
19//! ```bash
20//! # TUI mode (default)
21//! lim
22//!
23//! # REPL mode
24//! lim --no-tui
25//! ```
26//!
27//! ## Modules
28//!
29//! | Module | Description |
30//! |--------|-------------|
31//! | [`agent_bridge`] | Bridge between LLM agent and CLI |
32//! | [`session`] | Session management and persistence |
33//! | [`tools`] | Built-in tool implementations |
34//! | [`tui`] | Terminal UI components |
35//! | [`render`] | Markdown rendering |
36//! | [`syntax`] | Syntax highlighting |
37//! | [`file_finder`] | File autocomplete with fuzzy matching |
38//! | [`session_share`] | Export sessions to various formats |
39
40pub mod agent_bridge;
41pub mod clipboard;
42pub mod session_share;
43pub mod system_prompt;
44
45pub mod error;
46pub mod file_finder;
47pub mod logging;
48pub mod render;
49pub mod session;
50pub mod syntax;
51pub mod tools;
52pub mod tui;
53pub mod tui_bridge;
54
55pub use agent_bridge::{AgentBridge, AgentEvent};
56pub use error::CliError;
57pub use file_finder::{FileFinder, FileMatch};
58pub use logging::init_logging;
59pub use render::MarkdownRenderer;
60pub use session::SessionManager;
61pub use session_share::{ExportFormat, SessionExport, SessionShare};
62pub use syntax::SyntaxHighlighter;
63pub use tui::{FileAutocompleteState, TuiState};
64// Legacy re-exports from tui_bridge module (deprecated, will be removed)
65pub use tui_bridge::{TuiApp, TuiBridge};