explaingit

amperser/proselint

4,529JavaScriptAudience · writerComplexity · 1/5LicenseSetup · easy

TLDR

A command-line tool that checks English writing for style problems, awkward phrasing, weak word choices, and common mistakes, drawing on respected writing guides like Garner and Strunk.

Mindmap

mindmap
  root((proselint))
    What it does
      Style checking
      Word choice review
      Line-level suggestions
    Tech Stack
      Python
      Command line
    Use Cases
      Check documents
      Pre-commit hook
      Script integration
    Sources
      Garner usage guide
      Orwell and Strunk
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run proselint on a text or markdown file to get line-by-line suggestions for improving style and word choice

USE CASE 2

Add proselint as a pre-commit hook so it checks documentation automatically on every commit

USE CASE 3

Call proselint from a Python script using the LintFile class to integrate writing checks into a publishing workflow

Tech stack

Python

Getting it running

Difficulty · easy Time to first run · 5min
Use, modify, and distribute freely for any purpose including commercial use, as long as you keep the copyright notice.

In plain English

Proselint is a command-line tool that checks English writing for stylistic and usage problems. Think of it like a spell checker, but instead of catching misspelled words it catches awkward phrasing, dubious word choices, and style issues. You run it on a text file, and it prints a list of suggestions with the exact line and column where each problem appears. The checks are drawn from well-known writing guides and the practices of respected editors and authors, including style references like Garner's Modern English Usage and the work of writers such as George Orwell and William Strunk. The goal is to make that accumulated writing wisdom available as an automated tool rather than requiring writers to memorize hundreds of rules. Installation is straightforward: a single pip command for most users, or through package managers on Fedora, Debian, and Ubuntu. It can also be set up as a pre-commit hook so it runs automatically every time you save or commit a document in a software project. Plugins are available for popular text editors including Vim, Emacs, Neovim, and previously for Atom, Sublime Text, and Visual Studio Code. When you run proselint on a file, each suggestion shows the check name and a short explanation. For example, the phrase "very unique" would trigger a note that "unique" cannot be compared and the modifier is unnecessary. The output can also be formatted as JSON, which is useful if you want to feed the results into another tool or script. For developers who want to call proselint from within a Python program rather than the command line, the package exposes a LintFile class. Individual checks can also be turned on or off through a configuration file, giving fine-grained control over which rules apply to a given project. The project is BSD-licensed.

Copy-paste prompts

Prompt 1
I want to run proselint on my README file, show me the exact command and what the output looks like
Prompt 2
How do I set up proselint as a pre-commit hook in my Git repository to check writing on every commit?
Prompt 3
Show me how to use proselint's Python API with the LintFile class to check a string of text programmatically in a script
Prompt 4
How do I disable specific proselint checks I disagree with using a configuration file?
Prompt 5
What kinds of writing problems does proselint catch? Give me three examples of phrases it would flag and explain why
Open on GitHub → Explain another repo

← amperser on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.