Repository navigation
Releases
v0.3.3
Install with uv tool install sugo-cli or pipx install sugo-cli, or run the MCP server in the signed container image:
docker run -i --rm --network none -v ~/Documents:/data:ro ghcr.io/muralnick/sugo:0.3.3Image digest: sha256:c56231c0aaeb4ea9c67e9f8b8a8dcfe5a0da27d243cc0366a2e3d05bf20056b8 (linux/amd64, linux/arm64). Check it with gh attestation verify oci://ghcr.io/muralnick/sugo:0.3.3 --repo Muralnick/sugo (gh 2.49 or later).
Security: 0.3.1 could put text hidden on a dark box into the Markdown through OCR on mixed PDF pages; upgrade. Details below.
The first release with the container image: 0.3.2 reached PyPI, but its
image job stopped before publishing anything.
Fixed
- Release pipeline: the container image of 0.3.2 was not published. GitHub's
SBOM attestation refused the CycloneDX SBOM, which had no serial number,
and the job stopped before pushing anything (PyPI has 0.3.2). The SBOM
now carries a serial number derived from its content, so builds stay
reproducible, and the deprecatedactions/attest-sbomis replaced by
actions/attest(ADR-075).
Also in this release: the changes of 0.3.2 (2026-11-26)
Added
- (Not published with 0.3.2: the image job failed at the SBOM
attestation, before any push. The first image is 0.3.3.) A signed container image of the MCP server on GitHub Container Registry,
ghcr.io/muralnick/sugo, forlinux/amd64andlinux/arm64,lite
level (ADR-075). Each release builds it on both architectures from the
repository'sDockerfile, runs the MCP probe on the exact image before
pushing it, and publishes it after the PyPI upload and a second approval,
asX.Y.Z;X.Ymoves only with the highest release of that minor line,
andlatestonly with the highest release of all. It is
signed before it is pushed, with a Sigstore provenance attestation and two
SBOMs: a CycloneDX SBOM fromuv.lock(Python packages and models) and
BuildKit's list of the Debian and Python packages in the image. Check it withgh attestation verify oci://ghcr.io/muralnick/sugo:X.Y.Z --repo Muralnick/sugo. - Dependabot proposes base image updates for the
Dockerfileonce a week,
only for releases at least 14 days old (ADR-035) and only Python 3.12
patch releases. - The CI container check also runs on arm64.
Security
- On a PDF page with only a few words and a drawing, the part read with OCR
could contain text the page hides. Dark text on a black box, for example,
became white letters in the image given to OCR, so an instruction no
reader could see reached the Markdown as plain text (affects 0.3.1). Each
pixel of the text's area now takes the colour of the nearest pixel a
reader sees, so no shape of the text is left for OCR, however large the
letters (ADR-043 amendment).opencv-python-headless, already installed
by rapidocr, becomes a direct dependency for this.
v0.3.1
Changed
-
PDF engine decided (ADR-073):
litekeeps PyMuPDF, which gave cleaner text
and was 2 to 5 times faster on large files in the test on 73 real PDFs.
The ADR names the conditions for moving to PDFium: better on a new
measurement; approved by a community poll (ADR-074); a PyMuPDF
vulnerability unfixed for over 30 days, or no PyMuPDF release for 12
months; or a licence change. -
Governance (ADR-074): users can decide on new features and changes
through an official poll in GitHub Discussions. A poll opens with 10
supporters; under 20 votes nothing changes, 20 to 99 votes need two
thirds, 100 or more a simple majority. The licence, the principles and
the security rules are never put to a poll; the maintainer may refuse an
off-topic proposal with a detailed public explanation. -
Dependency policy (ADR-035 amendment): a release that fixes a published
vulnerability affecting Sugo may skip the 14-day minimum age, for that
package and release only, after checking its source and its changes;
exclude-newer-packageinpyproject.tomlrecords the exception, and
uv.lockmust resolve exactly the checked version. For a low severity,
waiting stays the default; the maintainer decides. -
MCP
estimate_savings: its description now says that a first call may
take longer thanconvert_document, which tokenizer it counts with, that
the provider comparison is for images only, and what each top-level field
of the answer means; theprovidersschema lists the valid names
(ADR-049 amendment).
Fixed
- A PDF page whose words are drawn as curves, with no characters and no
images inside, gave empty Markdown with statusok: the words were lost
without a trace. A page with almost no real text and something drawn on
it now keeps its real text exactly and has only the drawn part read with
OCR (ADR-043 amendment). Known limit: a page with 20 or more real
characters, such as a footer, and a drawn body is not yet detected. - On a PDF page shown rotated (
/Rotate90, 180 or 270 degrees, as
landscape pages often are), every visible line was marked hidden and
removed from the Markdown with the reason "hidden text": text boxes were
not turned with the page they were checked against (ADR-043 amendment). - Two faults in the check that renders a PDF page without its text: on a
page with a/Rotatevalue that is not a quarter turn (45) the check was
skipped, so a faint instruction over a picture could pass as visible text;
on a page whose boxes do not start at the origin part of the text stayed,
so visible text could be marked hidden (ADR-043 amendment).
v0.3.0 — the normal level (Docling) for PDF tables and layouts
Sugo 0.3.0, on PyPI as sugo-cli and in the MCP Registry as io.github.Muralnick/sugo. The loaders langchain-sugo and llama-index-readers-sugo 0.1.2 accept it.
pip install --upgrade sugo-cliThe packages on PyPI are built reproducibly, with an SBOM and Sigstore attestations, and published with Trusted Publishing from the release workflow.
Added
-
langchain-sugo0.1.2 andllama-index-readers-sugo0.1.2: no change in
the loaders; they acceptsugo-cli0.3 (>=0.2.1,<0.4), which 0.1.1
excluded (<0.3). -
A warm Docling worker (ADR-072): at
normal, the shell,sugo uiand
sugo converton several files keep Docling loaded between PDFs instead
of starting it for each one, about twice as fast on a run of small PDFs
(5 table PDFs: 35 s instead of about 73 s). The worker is replaced after
any failure and every 20 documents, and stops after 5 minutes without
work, returning its memory. The MCP server keeps a fresh worker per
document, so no file can affect another's result. -
Choosing the
normallevel (ADR-071 §4):levelin[general](until
now reserved) andSUGO_LEVELtakeliteornormal;
sugo convertandsugo statstake--level/-l; the shell has
/leveland shows the level in its bottom bar;
sugo.convert(..., level="normal")in Python. Leavinglevelout of
sugo.convertnow uses the configured level,liteby default. The web
page has an "Engine level" choice in its settings, remembered by the
browser, and starts from the configured level; the MCP server uses the
configured level. -
Receipts record the engine level (ADR-056 amendment): a receipt made at
normalhas"level": "normal"andschema_version"1.1", and
sugo verifyconverts again at that level. Receipts made atliteare
unchanged ("1.0", nolevel). -
The
normallevel, first part (ADR-071):pip install "sugo-cli[normal]"
adds Docling with PyTorch for the CPU. With its models
(sugo models pull normal), PDF pages with a text layer are read by
Docling, which rebuilds tables; scanned pages are read as inlite.
Docling runs in its own process with downloads, telemetry and remote
services off, reading its models only from Sugo's folder. Office files stay with
Sugo's own reader for now. -
The models of the
normallevel (ADR-071):sugo models pull normal
downloads Docling's layout model and table model (384 MB, from Hugging Face,
pinned to a commit and checked by SHA-256). A model can now have several
files; they are kept in the folder layout Docling reads. -
Korean (ADR-070):
languagesacceptsko, and a Korean system locale
selects it. Images and scanned pages are then read with the Korean OCR
model, downloaded once withsugo models pull ocr-korean(13.5 MB). If it
is not installed, OCR stops withMODEL_MISSING(exit code 5) and the
command to run; native PDFs and Office files without pictures convert as
before. A page mixing Korean with Japanese or Chinese is a known limit. -
sugo uninstallalso lists and deletes downloaded models;sugo cache clearkeeps them. -
sugo models list,sugo models pull MODELandsugo models remove MODEL
(ADR-070).pullshows size, sources and licence and asks first (--yes
for scripts); the file is downloaded over HTTPS from a fixed list of hosts,
resumed after an interruption and used only once its SHA-256 matches. The
first downloadable model isocr-korean; Korean itself follows. -
sugo models bundle MODEL... -o FILEandsugo models install FILE
(ADR-070): carry installed models to a computer without internet. Install
uses no network, accepts only files the registry knows, checks each one's
size and SHA-256, and installs nothing from a bundle with one bad entry. -
Offline mode:
offline = truein[privacy], orSUGO_OFFLINE=1, refuses
every download before any connection. -
New error codes:
MODEL_UNKNOWN,DOWNLOAD_FAILED,OFFLINE,
MODEL_INVALID,MODEL_BUSY,MODEL_MISSING,BUNDLE_INVALID.
Fixed
- A downloaded model whose file is reached through a linked subfolder is
no longer accepted: every folder between the file and the cache folder
must be a plain folder (and, on Linux and macOS, the user's), at load time
too, not only when the model is downloaded (review of #120). sugo models installrefuses a bundle with an altered file even when that
model is already installed and valid, as ADR-070 says; before, the entry
was skipped without being checked.
v0.1.0a1 - first public pre-release
First public pre-release of Sugo, a local, offline-first tool that converts documents, screenshots and images into compact Markdown for RAG systems and LLMs.
Published on PyPI as sugo-cli — the name sugo was already registered by an unrelated project. The installed command is unaffected: it is still sugo.
pip install sugo-cli
sugo --helpWhat's in this pre-release
- Intermediate representation (IR) and offline token metrics, with provider image-cost baselines.
lite-level image pipeline: safe loading, classifier, preprocessing, offline OCR with hash-checked models, reading-order reconstruction.- Screenshot chat/code detection, UI chrome cleaning and core cleaning decisions.
- Markdown serializer with adaptive tables.
- PDF extraction (PyMuPDF) in an isolated worker, header/footer/page-number removal, and a two-level SQLite page cache.
- Section chunker and Markdown/JSONL (schema v1) exporters.
sugoCLI (stats,clip,doctor) and MCP server (convert_document,estimate_savings).- Text normalisation and tracking-URL cleaners.
- Basic layered TOML configuration.
- Italian interface, with automatic language selection from the system locale.
- Light Office readers (DOCX, XLSX, PPTX, pictures via OCR) and generic XML, each isolated in its own worker process.
- Wider MCP secret exclusions; documents holding private keys are refused.
- Local web UI (
sugo ui): single file, Markdown, tokens, removals, chunks, settings, questions. - Synthetic-corpus and EUR-Lex benchmarks, with results in the README.
Known issues
- OCR is noticeably slower than the other stages on low-end hardware (see the 2010-desktop measurements in
docs/TESTING.md); expected at thelitelevel.
Full details: CHANGELOG.md (pending merge in #47).