litmus-cli 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- litmus/__init__.py +27 -0
- litmus/artifact.py +179 -0
- litmus/cli.py +342 -0
- litmus/detectors/__init__.py +3 -0
- litmus/detectors/base.py +56 -0
- litmus/exif.py +158 -0
- litmus/inspectors/__init__.py +32 -0
- litmus/inspectors/base.py +36 -0
- litmus/inspectors/c2pa.py +159 -0
- litmus/inspectors/file_metadata.py +210 -0
- litmus/inspectors/office_metadata.py +54 -0
- litmus/inspectors/text_markers.py +75 -0
- litmus/inspectors/unicode_scan.py +308 -0
- litmus/io.py +54 -0
- litmus/model.py +173 -0
- litmus/office.py +198 -0
- litmus/pipeline.py +464 -0
- litmus/providers/__init__.py +17 -0
- litmus/providers/registry.py +239 -0
- litmus/reporting.py +150 -0
- litmus/server.py +176 -0
- litmus/transform/__init__.py +12 -0
- litmus/transform/base.py +30 -0
- litmus/transform/code_structural.py +119 -0
- litmus/transform/file_strip.py +148 -0
- litmus/transform/text_normalize.py +257 -0
- litmus/validate/__init__.py +3 -0
- litmus/validate/binary.py +75 -0
- litmus/validate/code.py +165 -0
- litmus/validate/office.py +73 -0
- litmus/validate/structural.py +136 -0
- litmus/validate/text.py +158 -0
- litmus/validate/treesitter_code.py +129 -0
- litmus/web_ui.py +728 -0
- litmus_cli-0.3.0.dist-info/METADATA +108 -0
- litmus_cli-0.3.0.dist-info/RECORD +39 -0
- litmus_cli-0.3.0.dist-info/WHEEL +4 -0
- litmus_cli-0.3.0.dist-info/entry_points.txt +2 -0
- litmus_cli-0.3.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: litmus-cli
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: AI provenance inspector and quality-preserving transformation system
|
|
5
|
+
Project-URL: Homepage, https://github.com/LastDev-coder/litmus
|
|
6
|
+
Project-URL: Repository, https://github.com/LastDev-coder/litmus
|
|
7
|
+
Project-URL: Issues, https://github.com/LastDev-coder/litmus/issues
|
|
8
|
+
Author: Atanu
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai-detection,c2pa,provenance,unicode,watermark
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
16
|
+
Classifier: Topic :: Text Processing
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: pydantic>=2.7
|
|
19
|
+
Requires-Dist: typer>=0.12
|
|
20
|
+
Provides-Extra: c2pa
|
|
21
|
+
Requires-Dist: c2pa-python>=0.5; extra == 'c2pa'
|
|
22
|
+
Provides-Extra: code
|
|
23
|
+
Requires-Dist: tree-sitter-language-pack>=0.9; extra == 'code'
|
|
24
|
+
Requires-Dist: tree-sitter>=0.23; extra == 'code'
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
27
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: ruff>=0.5; extra == 'dev'
|
|
29
|
+
Requires-Dist: tree-sitter-language-pack>=0.9; extra == 'dev'
|
|
30
|
+
Requires-Dist: tree-sitter>=0.23; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# litmus
|
|
34
|
+
|
|
35
|
+
**See what's hiding in your files — and remove it, safely.**
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+
litmus is a private, fully local tool that reveals invisible characters, hidden
|
|
40
|
+
file information and content credentials in your documents, code and images —
|
|
41
|
+
then strips them out without changing anything you can see. Every clean-up is
|
|
42
|
+
checked before it is saved: if a change cannot be confirmed safe, litmus keeps
|
|
43
|
+
your original untouched.
|
|
44
|
+
|
|
45
|
+
- **Check** — see what's hidden: invisible characters, embedded file info, content credentials
|
|
46
|
+
- **Clean** — remove it, while what you see stays exactly the same
|
|
47
|
+
- **Trust** — nothing is saved unless the result is verified safe
|
|
48
|
+
- **Private** — 100% offline; your files never leave your machine
|
|
49
|
+
|
|
50
|
+
Works with text, source code, PNG, JPEG and SVG files.
|
|
51
|
+
|
|
52
|
+
## Get started in one minute
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
git clone https://github.com/LastDev-coder/litmus
|
|
56
|
+
cd litmus
|
|
57
|
+
./start.sh # macOS / Linux
|
|
58
|
+
./start.ps1 # Windows (PowerShell)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
That's the whole setup — it prepares everything and opens the app in your
|
|
62
|
+
browser. Drop a file in, choose **Check** or **Clean**, and download the clean
|
|
63
|
+
result. Requires Python 3.11+ (or [uv](https://docs.astral.sh/uv/), which
|
|
64
|
+
fetches Python for you).
|
|
65
|
+
|
|
66
|
+
## Using the app
|
|
67
|
+
|
|
68
|
+
1. **Drop a file** onto the page.
|
|
69
|
+
2. **Check** shows what's hiding inside, explained in plain language.
|
|
70
|
+
3. **Clean** removes it and hands you the cleaned file. Your original is never
|
|
71
|
+
modified.
|
|
72
|
+
|
|
73
|
+
Pick a cleaning level to control how much is done:
|
|
74
|
+
|
|
75
|
+
| Level | What it does |
|
|
76
|
+
|---|---|
|
|
77
|
+
| Minimal | Remove invisible characters only |
|
|
78
|
+
| Standard *(default)* | Also normalize unusual spaces, line endings and letterforms |
|
|
79
|
+
| Tidy | Also neaten extra blank lines |
|
|
80
|
+
| Code-aware | Also remove unused Python imports |
|
|
81
|
+
|
|
82
|
+
## Command line
|
|
83
|
+
|
|
84
|
+
Prefer a terminal? After setup, the same features are available as commands:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
source .venv/bin/activate
|
|
88
|
+
|
|
89
|
+
litmus inspect myfile.txt # what's hidden? (read-only)
|
|
90
|
+
litmus transform myfile.txt # print the cleaned version
|
|
91
|
+
litmus transform myfile.txt --in-place --backup # save it, keep a .bak
|
|
92
|
+
litmus serve # open the web app
|
|
93
|
+
litmus --help # everything else
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
For source-code files, litmus is deliberately strict: it saves a cleaned code
|
|
97
|
+
file only when it can verify the program still behaves the same. If it can't
|
|
98
|
+
verify, it refuses and tells you why.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
## Privacy
|
|
102
|
+
|
|
103
|
+
Everything runs on your machine. No accounts, no uploads, no telemetry, no
|
|
104
|
+
network access. The web app binds to `127.0.0.1` and analyses files in memory.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
litmus/__init__.py,sha256=EQ854H8GRRZUsWOwUQpM0bxgmsogkXAMyH4k_4jievo,752
|
|
2
|
+
litmus/artifact.py,sha256=EjwAd4kdCkb9xqLOQ1_64kGzkOTzt68SmQ3mrLEifWE,5166
|
|
3
|
+
litmus/cli.py,sha256=TMZxes-f8lWwhR7o35XBZsntO6XOW1HM5oja6fiuMGI,12008
|
|
4
|
+
litmus/exif.py,sha256=V4DyEkhUOKBHI8yq4Owpgy26L6wDI5nn8x9DRQY61WU,5546
|
|
5
|
+
litmus/io.py,sha256=y4XqpFU8M_6YmtdYEkeFuU1rSfmjDB1JjMfIsILCwPY,1925
|
|
6
|
+
litmus/model.py,sha256=eCumAk8DjECpiPlTJG0l-siNukJ2c7ZZWiV6wcc3UYQ,4828
|
|
7
|
+
litmus/office.py,sha256=N7d5u-cMi5LP2xACF5_25GjWFZio0_LTJgaM50OPJgg,7303
|
|
8
|
+
litmus/pipeline.py,sha256=ZQ4wxzuBbwGWhdse5k6DLbo-tU0h86pKKnfMyjIIoVA,17336
|
|
9
|
+
litmus/reporting.py,sha256=1SMDIBKM8pmOGpo6moIRcj-YdtlAlclgpomCPgdhMCg,6070
|
|
10
|
+
litmus/server.py,sha256=SyCg2gssyvJtilM31sbBN9mIBTJgKJNgGUxvQupxid8,7073
|
|
11
|
+
litmus/web_ui.py,sha256=vfCuqR5emnQaA52sLQ46HgNNOcXUmCw_SJHE5P4FOdE,47064
|
|
12
|
+
litmus/detectors/__init__.py,sha256=B9jcGDLAEsHjEMEFFosFeKF4Vp6U3p-h45iFRZI05zE,131
|
|
13
|
+
litmus/detectors/base.py,sha256=AMkV2Apf23o5BGuP50RHI99yFX2Bz3dHLNrhsGLU9Z4,1753
|
|
14
|
+
litmus/inspectors/__init__.py,sha256=01QTQM8_EaKUV6p9rFoMBv2anvHHL0U3a4NLrK1Es6o,765
|
|
15
|
+
litmus/inspectors/base.py,sha256=R-FiO4kkWiZtd0yFkWc7R04Z0SHooxYGbLOyCveIUK0,932
|
|
16
|
+
litmus/inspectors/c2pa.py,sha256=WLECLmziliwUqHMPMDRKWB-mX38P0ueADxTKOo69hEo,5834
|
|
17
|
+
litmus/inspectors/file_metadata.py,sha256=xa-PNBgqMlVd6c8IcGtXmPxty5D1DcXg0toCowbNahs,7903
|
|
18
|
+
litmus/inspectors/office_metadata.py,sha256=CdZE15ooEjq34WbY0uoJoWWZyS7d2620-hNPmP0kPMI,2099
|
|
19
|
+
litmus/inspectors/text_markers.py,sha256=AJJwhlhQSNCF5JNJqhAKqvW2aePU4R33o7fsQPyF4Vo,2723
|
|
20
|
+
litmus/inspectors/unicode_scan.py,sha256=PdNRmgOmpz9CAvo7nIB26uTiNxI7kyu0LreQHhUxM-k,11846
|
|
21
|
+
litmus/providers/__init__.py,sha256=cVCv2QNRAgeBgBO8rpffmGn2jWZynWt8SYpVQhuNK2s,277
|
|
22
|
+
litmus/providers/registry.py,sha256=6HTfvpGJZincvCQRmOBIpyX-VuQNknEddl5YTI6hkF0,8207
|
|
23
|
+
litmus/transform/__init__.py,sha256=rbfdigoyeB5RiyYpbliiix28GMl08HL3J-irVr0ikjw,307
|
|
24
|
+
litmus/transform/base.py,sha256=jTev08dx2ZdJougj6a-l70sOIKEegU8nowTUaPC73b0,853
|
|
25
|
+
litmus/transform/code_structural.py,sha256=JbraNaVrMJAJTnssEgtDt-qXQaZWko-jXaNswIAPnOY,5044
|
|
26
|
+
litmus/transform/file_strip.py,sha256=vnTkQjA3IxOjKPWJd_vcfN_ViPHE9h1PITpe_Wz1dS0,5380
|
|
27
|
+
litmus/transform/text_normalize.py,sha256=ug-hpWM-E58iHuulO7c9hPEjhv4rFi364nQbe4CmvkM,8040
|
|
28
|
+
litmus/validate/__init__.py,sha256=TaxY1lNU1LnEJX9ausQxwAi3YU3mhn5JIBvg3SaFR9U,127
|
|
29
|
+
litmus/validate/binary.py,sha256=vJoGWgB2NPgb3QtrBInfY0tGbVyM89aECO-QSQ1248o,2524
|
|
30
|
+
litmus/validate/code.py,sha256=mn--P0jX8u6KGaRidCAWummy6MU8fdaGn7IV7DAB_xw,6372
|
|
31
|
+
litmus/validate/office.py,sha256=LlEDpnXwHgLrRiJfRx4pdMi0fLmCM6LJTRVsV65Tar4,2598
|
|
32
|
+
litmus/validate/structural.py,sha256=o6QJC50zUU4hHG5dvSD1sZsqg2ojq3rUXlkdGXiJuF0,5177
|
|
33
|
+
litmus/validate/text.py,sha256=OSnpLqa6O_Zg0XfA1SwZ69lTrneAa6ELHHVT8-dxqDw,5601
|
|
34
|
+
litmus/validate/treesitter_code.py,sha256=3LgxheIfQ6eTaftHQCv0adrB7z33n07y9wFYNKxLfjA,4510
|
|
35
|
+
litmus_cli-0.3.0.dist-info/METADATA,sha256=k4odIML-mVjH2t3nbSi1Hk9tH1Gxl-MhKZr2RpI3ASo,3933
|
|
36
|
+
litmus_cli-0.3.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
37
|
+
litmus_cli-0.3.0.dist-info/entry_points.txt,sha256=Yqa2tday5rvZ00ZA9wdfwPOhcY9wOY4NiKHRz5oK3Uk,43
|
|
38
|
+
litmus_cli-0.3.0.dist-info/licenses/LICENSE,sha256=WJcOCDjY8-cfe4p4aXRzITDQWhH06cmvNz0-_4hhrb4,1062
|
|
39
|
+
litmus_cli-0.3.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Atanu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|