CriticMarkup viewer for the terminal
Project description
██████╗ ██╗███████╗███████╗██╗ ██╗███████╗███████╗██████╗
██╔══██╗██║██╔════╝██╔════╝██║ ██║██╔════╝██╔════╝██╔══██╗
██║ ██║██║█████╗ █████╗ ██║ ██║███████╗█████╗ ██████╔╝
██║ ██║██║██╔══╝ ██╔══╝ ██║ ██║╚════██║██╔══╝ ██╔══██╗
██████╔╝██║██║ ██║ ╚██████╔╝███████║███████╗██║ ██║
╚═════╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝
CriticMarkup viewer for the terminal.
Getting Started
Installation
pip install diffuser-cli
Or with uv:
uv tool install diffuser-cli
Quick Example
Given a markdown file with CriticMarkup annotations:
The system processed the data and {~~returned results to~>delivered results
back to~~} the user.
Render it in the terminal with color-coded annotations:
diffuser view my-document.md
Background & Rationale
Writing blog posts in markdown is straightforward until you start editing. You change a sentence, rewrite a paragraph, cut a section. The next morning, you're not sure what you changed or why. Git solves this for code, but version control for prose is a different problem. You don't want branches and merge conflicts for a blog post. You want to see what changed, right there in the text.
Fletcher Penney saw this clearly. Penney is the creator of
MultiMarkdown. He has spent
years building tools for writers who think in plain text. Together with Gabe
Weatherhead, he created CriticMarkup: five
simple inline annotations that track changes without leaving the document.
{++add this++}, {--remove this--}, {~~old~>new~~}. No external
tooling. No version control. Just the text.
The idea was brilliant. I just needed it in the terminal. That's diffuser.
How It Works
diffuser preprocesses CriticMarkup syntax into Rich markup, then delegates
all markdown rendering to the rich library. No custom HTML parser, no
browser. Just your terminal.
CriticMarkup Syntax
| Syntax | Meaning |
|---|---|
{++text++} |
Insertion |
{--text--} |
Deletion |
{~~old~>new~~} |
Substitution |
{==text==} |
Highlight |
{>>text<<} |
Comment |
Full specification: http://criticmarkup.com/spec.php
Agent Skill
diffuser ships with a skill that teaches AI agents how to use CriticMarkup when editing your writing. Install it with the skills CLI:
npx skills add shakedlokits/diffuser
Or view the skill content directly:
diffuser skill
The skill instructs the agent to annotate files in-place using CriticMarkup syntax, never deleting or replacing original text directly.
Development
Setup
git clone https://github.com/shakedlokits/diffuser.git
cd diffuser
uv sync
Running
uv run diffuser view my-document.md
Running Tests
uv run pytest
Releasing
git tag v0.1.0
git push origin v0.1.0
Credits
CriticMarkup was created by Fletcher Penney and Gabe Weatherhead. Full specification at criticmarkup.com.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diffuser_cli-0.1.1.tar.gz.
File metadata
- Download URL: diffuser_cli-0.1.1.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b229b3a656055f7e6be07bfc0e314ad63e10d91e5eaac887df213caac2df160
|
|
| MD5 |
5657407edfaed80e247c6129fce3b6ce
|
|
| BLAKE2b-256 |
69bc533c26adde0e1642e6bf559ff5dd932dab111465ee7d707275bedd9a6840
|
Provenance
The following attestation bundles were made for diffuser_cli-0.1.1.tar.gz:
Publisher:
release.yml on shakedlokits/diffuser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffuser_cli-0.1.1.tar.gz -
Subject digest:
6b229b3a656055f7e6be07bfc0e314ad63e10d91e5eaac887df213caac2df160 - Sigstore transparency entry: 1199808308
- Sigstore integration time:
-
Permalink:
shakedlokits/diffuser@4052592fe670059f43d2491c208393b35e2c7c1b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shakedlokits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4052592fe670059f43d2491c208393b35e2c7c1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file diffuser_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: diffuser_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff90dba49aa990db862b595a0bb52974754ec8eaee0576cf0e4a869dc38938c6
|
|
| MD5 |
aa65014e220a4c2cf1b401e0e10e467b
|
|
| BLAKE2b-256 |
9cfc64c0c7f43acc241c9b5b265583d794537a30d0d9529b6db78b79678cb7ce
|
Provenance
The following attestation bundles were made for diffuser_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yml on shakedlokits/diffuser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
diffuser_cli-0.1.1-py3-none-any.whl -
Subject digest:
ff90dba49aa990db862b595a0bb52974754ec8eaee0576cf0e4a869dc38938c6 - Sigstore transparency entry: 1199808310
- Sigstore integration time:
-
Permalink:
shakedlokits/diffuser@4052592fe670059f43d2491c208393b35e2c7c1b -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/shakedlokits
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4052592fe670059f43d2491c208393b35e2c7c1b -
Trigger Event:
push
-
Statement type: