CKMTools

textlens - Zero-dependency text analysis and readability for TypeScript

by
textlens: zero-dependency TypeScript library & CLI for text analysis. Runs 100% locally, no API calls. 8 readability formulas (Flesch, Flesch-Kincaid, Gunning Fog, SMOG, Coleman-Liau, ARI, Dale-Chall, Linsear Write) with consensus grade. AFINN-165 sentiment analysis. TF keyword extraction with stopword filtering. Keyword density (unigram/bigram/trigram). SEO scoring with actionable suggestions. Reading time estimation. Extractive summarization. CLI with pretty, JSON & minimal output.

Add a comment

Replies

Best
CKMTools
Maker
📌
I built textlens because I wanted a single tool to check content readability without pulling in a tree of dependencies. The library has zero runtime dependencies — it bundles its own AFINN-165 sentiment lexicon and Dale-Chall word list. It works as both a library API and a CLI. The consensus grade averages 7 different grade-level formulas (excluding Flesch Reading Ease which uses a different scale) for a more reliable readability estimate than any single formula. Happy to answer questions about the implementation or take feature requests.