Skip to main content

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

diffuser_cli-0.1.1.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffuser_cli-0.1.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

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

Hashes for diffuser_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6b229b3a656055f7e6be07bfc0e314ad63e10d91e5eaac887df213caac2df160
MD5 5657407edfaed80e247c6129fce3b6ce
BLAKE2b-256 69bc533c26adde0e1642e6bf559ff5dd932dab111465ee7d707275bedd9a6840

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffuser_cli-0.1.1.tar.gz:

Publisher: release.yml on shakedlokits/diffuser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for diffuser_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff90dba49aa990db862b595a0bb52974754ec8eaee0576cf0e4a869dc38938c6
MD5 aa65014e220a4c2cf1b401e0e10e467b
BLAKE2b-256 9cfc64c0c7f43acc241c9b5b265583d794537a30d0d9529b6db78b79678cb7ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffuser_cli-0.1.1-py3-none-any.whl:

Publisher: release.yml on shakedlokits/diffuser

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page