Expand description
Core functionality for batless - a minimal, AI-friendly code viewer
This library provides the core logic for syntax highlighting and file processing that can be used both by the CLI and in tests.
Re-exports§
pub use config::BatlessConfig;
pub use config::CustomProfile;
pub use config::SummaryLevel;
pub use error::BatlessError;
pub use error::BatlessResult;
pub use file_info::FileInfo;
pub use formatter::OutputFormatter;
pub use formatter::OutputMode;
pub use highlighter::SyntaxHighlighter;
pub use json_schema::get_json_schema;
pub use json_schema::validate_batless_output;
pub use json_schema::JsonSchemaValidator;
pub use language::LanguageDetector;
pub use language::ThemeManager;
pub use processor::FileProcessor;
pub use streaming::StreamingCheckpoint;
pub use streaming::StreamingChunk;
pub use streaming::StreamingProcessor;
pub use token_counter::AiModel;
pub use token_counter::TokenCount;
pub use token_counter::TokenCounter;
pub use wizard::ConfigurationWizard;
Modules§
- config
- Configuration management for batless
- error
- Custom error types for batless
- file_
info - File information structure for batless
- formatter
- Output formatting functionality for batless
- highlighter
- Syntax highlighting functionality for batless
- json_
schema - JSON schema validation for batless output
- language
- Language detection and management for batless
- processor
- File processing functionality for batless
- streaming
- Streaming JSON output functionality for batless
- summarizer
- Code summarization functionality for batless
- token_
counter - Token counting for AI models
- tokenizer
- Token extraction functionality for batless
- wizard
- Interactive configuration wizard for batless
Functions§
- detect_
language - Detect the programming language from a file path
- format_
output - Format output according to the specified mode
- highlight_
content - Highlight content with syntax highlighting
- list_
languages - Get list of all available programming languages
- list_
themes - Get list of all available themes
- process_
file - Main entry point for processing a file with batless