Skip to main content

litmus

See what's hiding in your files — and remove it, safely.

litmus — a local web app that reveals and removes hidden content from your files

litmus is a private, fully local tool that reveals invisible characters, hidden file information and content credentials in your documents, code and images — then strips them out without changing anything you can see. Every clean-up is checked before it is saved: if a change cannot be confirmed safe, litmus keeps your original untouched.

  • Check — see what's hidden: invisible characters, embedded file info, content credentials
  • Clean — remove it, while what you see stays exactly the same
  • Trust — nothing is saved unless the result is verified safe
  • Private — 100% offline; your files never leave your machine

Works with text, source code, PNG, JPEG, GIF, WebP, SVG, BMP, ICO, TIFF, HEIC / AVIF, PDF and Office files (docx / xlsx / pptx). Cleaning is available for text, code, PNG, JPEG, GIF, WebP, SVG, PDF and Office files; the other image types are checked but not changed.

Install

With uv — works even if your system Python is old or pip is missing (the default on macOS):

uv tool install litmus-cli
litmus serve        # opens the web app in your browser

Or with pip, if you already have Python 3.11+:

pip install litmus-cli          # or: python3 -m pip install litmus-cli

Either way the package installs the litmus command; see Command line below for terminal usage. If litmus isn't found after a uv install, run uv tool update-shell once and open a new terminal.

Or run from source

git clone https://github.com/LastDev-coder/litmus
cd litmus
./start.sh          # macOS / Linux
./start.ps1         # Windows (PowerShell)

That's the whole setup — it prepares everything and opens the app in your browser — no Python setup needed if you have uv, which fetches everything for you.

Using the app

  1. Drop a file onto the page.
  2. Check shows what's hiding inside, explained in plain language.
  3. Clean removes it and hands you the cleaned file. Your original is never modified.

Pick a cleaning level to control how much is done:

Level What it does
Minimal Remove invisible characters only
Standard (default) Also normalize unusual spaces, line endings and letterforms
Tidy Also neaten extra blank lines
Code-aware Also remove unused Python imports

Command line

Prefer a terminal? After setup, the same features are available as commands:

source .venv/bin/activate

litmus inspect myfile.txt        # what's hidden? (read-only)
litmus transform myfile.txt      # print the cleaned version
litmus transform myfile.txt --in-place --backup   # save it, keep a .bak
litmus serve                     # open the web app
litmus --help                    # everything else

For source-code files, litmus is deliberately strict: it saves a cleaned code file only when it can verify the program still behaves the same. If it can't verify, it refuses and tells you why.

Image security checks

litmus also looks for structural signs that an image hides something harmful, and gives each file a verdict: high, suspicious or none found.

  • Data hidden after the end of the image (for example a PHP web shell appended to a JPEG), and file or script signatures inside the image
  • Files whose content does not match their extension (a ".jpg" that is a ZIP)
  • SVG files with scripts, event handlers, javascript: links or risky XML entities — the SVG clean removes scripts and handlers, behind a proof that the drawing is unchanged
  • Images that declare huge dimensions (decompression bombs) and damaged files
  • Optional: known-signature scanning with YARA (bundled rules for image exploits) or your own local ClamAV
litmus inspect uploads/ --fail-on-threat suspicious   # CI / batch gate
litmus guard avatar.jpg                               # one JSON verdict; exit 1 = blocked
litmus watch uploads/ --quarantine quarantine/        # scan new files, move high-threat ones
litmus inspect uploads/ --security-report report.html # plain-language report: what, why, what to do
pip install "litmus-cli[yara]"                        # then: --signatures yara

From Python, litmus.scan_upload(data, filename) returns a verdict before you save an upload. In the web app, Export report (PDF) opens the detailed report and your browser's print dialog — choose "Save as PDF". litmus is not an antivirus. "None found" means none of its checks matched — it is not proof that a file is safe.

What litmus won't claim

Honesty is the point of this tool, so two limits are stated up front:

  • litmus finds hidden content — it does not detect statistical AI watermarks in plain text (no public tool can), and it never labels a file "AI-generated" or "human-written".
  • Finding nothing is not proof there is nothing. litmus reports only what it can actually verify.

Privacy

Everything runs on your machine. No accounts, no uploads, no telemetry, no network access. The web app binds to 127.0.0.1 and analyses files in memory.

License

MIT

Metadata

Release files for litmus-cli 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litmus-cli 0.5.0
File Size Uploaded Provenance Actions
litmus_cli-0.5.0.tar.gz 208.1 kB Without provenance Details for litmus_cli-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for litmus-cli 0.5.0
File Interpreter ABI Platform Actions
litmus_cli-0.5.0-py3-none-any.whl Python 3 none any Details for litmus_cli-0.5.0-py3-none-any.whl

Total release size: 368.0 kB

Release files / litmus_cli-0.5.0.tar.gz

Download URL litmus_cli-0.5.0.tar.gz
Size 208.1 kB
Tags Source
SHA-256 checksum
How to use checksums
51799705d79b9c74ff55c5cb0faec88a82d2dd4099c3124daaab8f8d26b73307
BLAKE2b-256 checksum
How to use checksums
070f18273d434dc0bee344d519aae85a2dacbdf47ff7972b5343acb590ebef38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / litmus_cli-0.5.0-py3-none-any.whl

Download URL litmus_cli-0.5.0-py3-none-any.whl
Size 159.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae9c5011627032958ea9e2f4284ad65e1b066be860888418045a64e645099f06
BLAKE2b-256 checksum
How to use checksums
1ed333c5484754d539bcb741c49d9e1b4753699a4540ad20997aa8e910e3b949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for litmus-cli 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page