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 session_tree;
44pub mod system_prompt;
45
46pub use session_tree::{
47 generate_entry_id, SerializableMessage, SessionEntry, SessionEntryType, SessionTree,
48};
49
50pub mod error;
51pub mod file_finder;
52pub mod logging;
53pub mod render;
54pub mod session;
55pub mod syntax;
56pub mod tools;
57pub mod tui;
58pub mod tui_bridge;
59
60pub use agent_bridge::{AgentBridge, AgentEvent};
61pub use error::CliError;
62pub use file_finder::{FileFinder, FileMatch};
63pub use logging::init_logging;
64pub use render::MarkdownRenderer;
65pub use session::SessionManager;
66pub use session_share::{ExportFormat, SessionExport, SessionShare};
67pub use syntax::SyntaxHighlighter;
68pub use tui::{FileAutocompleteState, TuiState};
69// Legacy re-exports from tui_bridge module (deprecated, will be removed)
70pub use tui_bridge::{TuiApp, TuiBridge};