Skip to main content

textli

A lightweight text editor with focused writing and reading in mind.

textli is a full-window, distraction-free Markdown editor: one warm paper-toned column of text, vim keybindings, and nothing else on screen. ⌘R flips the source into a rendered reading view made for proof-reading and review — navigate with vim motions, leave inline comments, and propose suggestions (track changes) that the author accepts or rejects with a keystroke. Notes about code stay connected to it: a reference like textli/editor.py:2455 is followable — ↵ opens the file read-only at that line, gb comes back — so a design doc reads with its evidence one keystroke away. All annotations are stored inline as CriticMarkup, so they travel with the file and diff cleanly in git — no sidecar files. Pandoc-style TeX math — $…$ inline, $$…$$ display — renders as typeset formulas in the reading view, so scientific notes read like the paper they'll become (and convert to one via pandoc, untouched). A <!-- chart: bar x=… --> marker over a pipe table turns it into a typeset chart on render, while the source stays a plain table everywhere else. And an image reference to a .grafli file — ![](architecture.grafli) — renders inline as the diagram itself when the grafli CLI is installed, degrading quietly to nothing when it isn't. The page comes in two counterpart palettes — warm paper and a low-key dark ground — switched with ⌘⇧D, or driven by an embedding host through textli.set_theme("dark").

textli started life as the editor inside grafli, the keyboard-driven diagram tool, and is now its own package — usable standalone or embeddable in any PySide6 application.

Install

uv tool install textli-editor   # or: pipx / pip install textli-editor

The package publishes as textli-editor (plain textli is too close to an existing PyPI name), but everywhere else it's just textli: the command is textli, the import is import textli.

Use

textli notes.md                     # open reading (created on first save)
textli notes.md#design-decisions    # jump straight to a heading
textli -w notes.md                  # start in the editable write view
textli notes.md --pdf               # export the typeset page, no window

A file you haven't opened before opens in the reading view; ⌘R (or -w) puts you in the write view, ready to type in vim NORMAL mode. It autosaves while you work, and every file resumes where you left it — view mode, caret and scroll included, so a note you were writing comes back writing. It also watches the open file, so edits made outside textli (an agent applying your comments, a git checkout) reload in place without a restart. A faint whisper status in the card's corner keeps you oriented — mode, word count, and session delta while writing; the section you're in, progress, minutes left, and open review items while reading. Press F1 inside the editor for the complete key reference, or see the documentation.

The short version

Key Action
⌘R Toggle write ↔ reading view
Esc Step back — leave visual mode, close an overlay, put an expanded image away. Embedded in a host app it also saves & closes (⇧Esc cancels); standalone, ⌘Q quits
⌘↵ Full-window width
⌘. Section focus (dim all but the current paragraph / section)
f Focus reading mode — caret-locked centre line + gradient spotlight (reading view)
⌘T Typewriter scrolling (the caret line stays put; persists)
⌘⇧P Paper surface — grain & light on the page; off = flat (persists)
⌘⇧D Dark / light page — the counterpart palette (persists)
c / s Comment / suggest a change on the selection — text or a formula (reading view)
a / x Accept / reject the suggestion under the caret
go Open another file — fuzzy history + per-segment path completion
↵ Follow the link under the caret — .md opens in place, web in the browser, #heading jumps (reading view)
↵ Follow the source reference under the caret — `editor.py:42` opens the file read-only at that line (reading view)
↵ Expand the image under the caret — picture, chart, diagram or formula fills the window; Esc closes (reading view)
gb / ⌫ Back to the document the last link was followed from (reading view)
gl Links overview — jump-list of every link (reading view)
/ Fuzzy in-document search (n/N next/previous hit; ⇥ to replace)
F1 Full help

Embed

from textli import ZenMarkdownEditor, InlineVimEditor

ZenMarkdownEditor is the full-window editor (parent it into any widget); InlineVimEditor is a small vim-capable QPlainTextEdit for editing a single piece of text in place. See the embedding guide.

AI agents

textli ships an installable agent skill that teaches AI tools to author Markdown for the reading view and to review through the inline annotation layer — comments from the human, track-change suggestions from the agent — including genre playbooks (decision doc, learning doc, scientific paper; examples/paper.md is a worked example studying textli itself):

textli skill install     # ~/.claude/skills, ~/.agents/skills, ~/.config/opencode/skills
textli skill check       # per-tool status: ok / stale / modified / missing
textli skill             # print the whole skill to stdout instead

See the AI agents guide.

Develop

uv venv && uv pip install -e '.[dev]'
QT_QPA_PLATFORM=offscreen .venv/bin/pytest -q

License

MIT — see LICENSE. Bundled fonts — JetBrains Mono, Caveat and Literata — are licensed under the SIL Open Font License (JetBrains Mono, Caveat, Literata).

Metadata

Release files for textli-editor 0.8.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 textli-editor 0.8.0
File Size Uploaded
textli_editor-0.8.0.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for textli-editor 0.8.0
File Interpreter ABI Platform
textli_editor-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / textli_editor-0.8.0.tar.gz

Download URL textli_editor-0.8.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
38f9d0c5b2f42c4e5e23d3b4be85b3712c256d9b32d88569eea593762ace1a78
BLAKE2b-256 checksum
How to use checksums
c54064d18ebffb63477cd0a64dd490d9138a47aecc3afef5c3a5023c46ffedfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

Release files / textli_editor-0.8.0-py3-none-any.whl

Download URL textli_editor-0.8.0-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8bb29cdf7f636ba171aa054f7345a5c2dbd36e989b3e96e693951e94ae7807de
BLAKE2b-256 checksum
How to use checksums
b75f0732a9b7dc201255d3ddacf2b4a6841781d71941a4afad7a42564a21f06f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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