Skip to main content

mdpad

CI PyPI Python License

A local-first, AI-assisted environment for writing and revising long technical/scientific documents (Markdown + LaTeX math). Its defining idea: the model is sent a compact, inspectable context package for the selected text — never the whole manuscript — and it never replaces your text silently (every edit is a diff you Accept or Reject).

This is a proof of concept (see tasks/done/01_poc.md), not production software.

Run

Requires uv and Python ≥ 3.14 (uv fetches it).

uv run mdpad

Or double-click mdpad.bat (Windows) / run ./mdpad.sh (macOS/Linux).

Don't want to clone the repo at all? Once published, uvx mdpad runs it straight from PyPI, no install step.

This starts a local server and opens http://127.0.0.1:8000. It works immediately with an offline mock (no API key needed) so you can try the full select → context → diff → accept flow. For real edits, open Settings and enter an OpenAI-compatible endpoint (OpenAI, OpenRouter, LM Studio, Ollama, …): base URL, API key, and model. Settings are stored in your browser only.

To set a server-side default instead (so the key never has to be typed into the browser, or lives in source/git), write it to a local .env:

uv run mdpad-configure --base-url https://host/v1 --api-key sk-...
# or run with no flags to be prompted instead

The preview libraries (markdown-it, KaTeX, Mermaid) are vendored locally, so the editor/preview works fully offline once the page has loaded.

Use

  1. Edit Markdown on the left; the rendered preview (with math) updates on the right.
  2. Select a passage, then choose Rewrite / Expand / Shorten / Custom….
  3. Inspect exactly what was sent (the context "spectrum" panel) and the proposed diff.
  4. Accept to apply, or Reject to discard. Nothing changes until you accept.

Develop

uv sync --group dev    # install dev tools (pytest, ruff, mypy)
uv run pytest           # tests (section parsing + context package)
uv run ruff check .     # lint
uv run ruff format .    # format
uv run mypy src/mdpad   # type check
install.bat             # editable install into the active/local venv

CI (.github/workflows/ci.yml) runs all of the above on every push/PR. Pushing a tag matching vX.Y[.Z] publishes to PyPI (.github/workflows/publish.yml).

Layout: Python backend in src/mdpad/ (app.py, sections.py, context.py, provider.py); zero-build frontend in src/mdpad/static/ — vanilla HTML/CSS/JS, no React/TypeScript/bundler, a deliberate choice to keep everything in Python except the thin UI layer. See docs/architecture.md for the codebase map.

Metadata

Release files for mdpad 0.1.1

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

Source distribution (sdist)

Source distribution for mdpad 0.1.1
File Size Uploaded Provenance Actions
mdpad-0.1.1.tar.gz 2.1 MB With provenance Details for mdpad-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mdpad 0.1.1
File Interpreter ABI Platform Actions
mdpad-0.1.1-py3-none-any.whl Python 3 none any Details for mdpad-0.1.1-py3-none-any.whl

Total release size: 4.1 MB

Release files / mdpad-0.1.1.tar.gz

Download URL mdpad-0.1.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
72a46273aa9cb5f1dbe507fcdf670c8d237dbbe8ab0ed9fd533be586b5c2c81a
BLAKE2b-256 checksum
How to use checksums
7b1bca5945683b1c034bad25ef4cdeba6df3f2ea1ff2acdeee3191de06702679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Release files / mdpad-0.1.1-py3-none-any.whl

Download URL mdpad-0.1.1-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
16131f2d58f8fef70577bf19f4e6c3ecb7632d4ef751d0af2b30998249320da6
BLAKE2b-256 checksum
How to use checksums
97320b3f418ca11b7e2a2997578cfbb7301ef904ac6b1dd3491b7ca7f231e85b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

Security for mdpad 0.1.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mdpad-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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