Learn Your Writing Style Locally with AuthorStyle and Python A developer built AuthorStyle, an alpha Python command-line tool that learns a writer's style from a local corpus by combining explicit stylometry—sentence and paragraph rhythm, punctuation rates, lexical diversity, and Markdown structure—with pluggable style and semantic encoders. The tool ingests documents into a profile, generates an inspectable Style Card with evidence metrics, and evaluates generated candidates against held-out writing, with version 0.2.1 released under the MIT license for Windows, macOS, and Linux. If you want an AI system to write in a style that feels like yours, the first problem is not a clever prompt. It is deciding what "your style" means and how to test whether a generated passage resembles it. AuthorStyle https://github.com/paladini/authorstyle takes a research-oriented approach to that problem. It is a Python command-line tool that learns recurring patterns from a local corpus, records evidence for its style profile, and evaluates generated candidates against held-out writing. The project is alpha software, so the useful outcome is an inspectable experiment, not a promise of a perfect voice clone. Install AuthorStyle 0.2.1, create a profile, ingest a directory of Markdown or other supported documents, and analyze it locally. The minimal path produces corpus statistics and a Style Card with measurable observations such as sentence rhythm, paragraph rhythm, lexical diversity, and punctuation rates. This tutorial uses the repository's English fixtures so the workflow is reproducible without supplying private writing. Replace that directory with your own corpus only after reviewing the privacy mode and data-handling boundaries. You need: AuthorStyle 0.2.1 is published in the repository's v0.2.1 tag. The package declares the MIT license and supports Windows, macOS, and Linux through Python's normal environment model. The project is marked alpha in its package metadata, which matters when deciding how much to rely on generated output. Clone the repository and create an isolated virtual environment. Pinning the tag keeps the example aligned with the documented release instead of silently following unreleased main changes. git clone --branch v0.2.1 https://github.com/paladini/authorstyle.git cd authorstyle python -m venv .venv source .venv/bin/activate pip install -e ". dev " On Windows PowerShell, activate the environment with: git clone --branch v0.2.1 https://github.com/paladini/authorstyle.git Set-Location authorstyle py -3 -m venv .venv .venv\Scripts\Activate.ps1 python -m pip install -e ". dev " The development extra installs the test tools in addition to the runtime dependencies. The optional embeddings and nlp extras are separate; the basic workflow does not require them. Start with a profile name and ingest the fixture corpus. A profile is stored below ~/.authorstyle/profiles/