Expand description
Core library for bito-lint.
This crate provides writing analysis functionality used by the
bito-lint CLI and MCP server.
§Modules
config— Configuration loading and managementerror— Error types and result aliasesmarkdown— Markdown processing (strip to prose, extract headings)tokens— Pluggable token counting (Claude / OpenAI backends)readability— Flesch-Kincaid Grade Level scoringcompleteness— Template section validationgrammar— Grammar checking and passive voice detectionanalysis— Comprehensive writing analysis (18 features)
§Quick Start
use bito_lint_core::tokens;
let report = tokens::count_tokens("Hello, world!", Some(100), tokens::Backend::default()).unwrap();
println!("Tokens: {}, over budget: {}", report.count, report.over_budget);Re-exports§
pub use config::Config;pub use config::ConfigLoader;pub use config::CustomEntry;pub use config::Dialect;pub use config::LogLevel;pub use error::AnalysisError;pub use error::AnalysisResult;pub use error::ConfigError;pub use error::ConfigResult;pub use tokens::Backend;
Modules§
- analysis
- Comprehensive writing analysis.
- completeness
- Completeness checking for structured document templates.
- config
- Configuration loading and discovery.
- dictionaries
- Dictionaries for text analysis.
- directives
- Inline suppression directives.
- error
- Error types for bito-lint-core.
- grammar
- Grammar analysis: passive voice detection and grammar checking.
- lint
- Lint execution engine.
- markdown
- Markdown processing utilities.
- readability
- Readability scoring using Flesch-Kincaid Grade Level.
- rules
- Rule resolution engine.
- text
- Text processing utilities.
- tokens
- Pluggable token counting with multiple backends.
- word_
lists - Curated word lists for writing analysis.
Constants§
- DEFAULT_
MAX_ INPUT_ BYTES - Default maximum input size: 5 MiB.
Functions§
- validate_
input_ size - Validate that input text does not exceed the configured size limit.