Terminal Markdown editor with vim-style keys and live side-by-side preview
Project description
easymd
English · 中文
A terminal Markdown editor: vim-style editing on the left, live preview on the right. Built with Textual.
Install
Requires Python 3.10+. Install from PyPI with pip or uv:
pip install easymd-cli # or: uv tool install easymd-cli
easymd notes.md # created on the first :w if it does not exist
For one-key translation of the preview (see Translation), add the optional extra:
pip install 'easymd-cli[translate]' # or: uv tool install 'easymd-cli[translate]'
From source:
git clone https://github.com/decajoin/easymd && cd easymd
uv sync --group dev
uv run easymd demo.md
uv run pytest # run the tests
Key reference
Modes
| Key | Action |
|---|---|
i a A I o O |
Enter insert mode (same positions as vim) |
R |
Replace mode (overwrite continuously; backspace restores overwritten chars) |
Esc |
Back to normal mode |
v |
Visual mode (y/d/c act on the selection) |
V |
Visual line mode (whole-line selection; v/V switch between them) |
Motions (normal/visual mode, count prefixes like 3j)
h j k l, w b e, 0 ^ $, gg G (3G jumps to line 3), { } paragraphs,
Ctrl+d/u half-page, Ctrl+f/b full-page.
| Key | Action |
|---|---|
f F t T + char |
Inline find: to / back to / before / after; works with operators (df, ct.) |
; / , |
Repeat the last inline find (same / opposite direction) |
% |
Jump to the matching bracket (( ) [ ] { }, nested and multiline) |
* / # |
Search the word under the cursor (forward / backward, whole word), then n/N |
Editing
| Key | Action |
|---|---|
x |
Delete the character under the cursor |
r / ~ |
Replace a character / toggle case (count supported) |
J |
Join the next line (3J joins three) |
dd / yy / cc |
Delete / yank / change whole lines (3dd etc.) |
D / C / Y |
Delete to end of line / change to end of line / yank line |
dw de d$ … |
Operator + motion (y, c too; cw keeps trailing space, like vim) |
diw ci" ya( … |
Text objects: i/a + w " ' ` ( [ {, with d/c/y or visual |
p / P |
Paste after / before |
. |
Repeat the last change (count override, e.g. 3.) |
u / Ctrl+r |
Undo / redo |
Commands and search
| Command | Action |
|---|---|
:w :w <file> |
Save |
:q :q! :wq :x |
Quit (:q refuses if there are unsaved changes) |
/text then n / N |
Search / next / previous (all matches highlighted, current one emphasized) |
:trans |
Toggle the preview between translation and original (see below) |
:summarize (:sum) |
Replace the preview with a whole-document summary (TL;DR) |
:transback |
Back to the original preview |
:refresh |
Regenerate the active AI preview (translation/summary; only changed parts) |
:toc |
Toggle the heading outline on the left; Enter jumps to a heading |
:noh |
Clear search highlights |
Translation (DeepSeek)
With the [translate] extra installed, :trans translates the whole preview
(into Chinese by default) and caches it; :trans again switches back to the
original. The document is split into Markdown blocks and cached by content, so
after editing the status bar shows "translation out of date" and :refresh
re-translates only the changed blocks. Translation affects the preview only —
it is never written back to your file.
:summarize (alias :sum) reuses the same pipeline to produce a short TL;DR in
the same target language as translation. :refresh re-runs whichever AI view is
active.
Output streams in token by token, so it appears as it is produced. Results are
cached on disk under ~/.cache/easymd/translate/, so re-translating the same
content costs nothing (set EASYMD_CACHE_DIR= empty to disable, or point it
elsewhere). In translation view the preview scrolls in step with the editor by
heading section; the summary view, being condensed, scrolls independently.
If the [translate] extra is missing or no API key is configured, :trans /
:summarize show a friendly notice in the status bar instead of crashing.
Configuring the API key
Environment variable first, then the config file ~/.config/easymd/config.toml:
export DEEPSEEK_API_KEY=sk-... # recommended
# or write it to the config file interactively (mode 0600):
easymd config set-key
Config file example:
[deepseek]
api_key = "sk-..." # or the DEEPSEEK_API_KEY env var (takes priority)
model = "deepseek-v4-flash" # or deepseek-v4-pro
target_lang = "中文"
Related: easymd config show (resolved config, key masked) and
easymd config set-model deepseek-v4-pro. You can also override at launch:
easymd --pro notes.md, easymd --model <id> notes.md,
easymd --lang English notes.md.
Project layout
src/easymd/
cli.py # entry point (typer: easymd FILE / easymd config ...)
app.py # split layout, status bar, command line, preview sync, AI views
editor.py # vim modal layer (TextArea subclass)
config.py # read DeepSeek config (env > config.toml > defaults)
translate.py # chunking + content cache + DeepSeek client (optional dep)
tests/ # pytest suite (Textual Pilot drives real key presses headless)
Run the tests with uv run pytest.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easymd_cli-0.4.1.tar.gz.
File metadata
- Download URL: easymd_cli-0.4.1.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53dbc32d4eaaf1a03bc8d87a1d5332e70bafbd7c8fbd93ec4f38869541820159
|
|
| MD5 |
ab2006073b3143d472b6a526dc42b1ea
|
|
| BLAKE2b-256 |
637eb2b5827e0a7a0fb5e5b5b84ef5027aa79966564066d3db70198a11712b55
|
Provenance
The following attestation bundles were made for easymd_cli-0.4.1.tar.gz:
Publisher:
release.yml on decajoin/easymd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
easymd_cli-0.4.1.tar.gz -
Subject digest:
53dbc32d4eaaf1a03bc8d87a1d5332e70bafbd7c8fbd93ec4f38869541820159 - Sigstore transparency entry: 1911045229
- Sigstore integration time:
-
Permalink:
decajoin/easymd@484fac185e3e5ab526f2521a6dd46baf12958718 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/decajoin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@484fac185e3e5ab526f2521a6dd46baf12958718 -
Trigger Event:
push
-
Statement type:
File details
Details for the file easymd_cli-0.4.1-py3-none-any.whl.
File metadata
- Download URL: easymd_cli-0.4.1-py3-none-any.whl
- Upload date:
- Size: 28.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b1e352456dd89905f23217ffef3fda02938ae8d6b992c62ef2ae42730a7bcc1
|
|
| MD5 |
c180156f5436655499618c842750090a
|
|
| BLAKE2b-256 |
918e8db2e5ce9d3045bbd7ea4567a27ad4de0d41599dd135ad3e8860a4bcac38
|
Provenance
The following attestation bundles were made for easymd_cli-0.4.1-py3-none-any.whl:
Publisher:
release.yml on decajoin/easymd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
easymd_cli-0.4.1-py3-none-any.whl -
Subject digest:
2b1e352456dd89905f23217ffef3fda02938ae8d6b992c62ef2ae42730a7bcc1 - Sigstore transparency entry: 1911045346
- Sigstore integration time:
-
Permalink:
decajoin/easymd@484fac185e3e5ab526f2521a6dd46baf12958718 -
Branch / Tag:
refs/tags/v0.4.1 - Owner: https://github.com/decajoin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@484fac185e3e5ab526f2521a6dd46baf12958718 -
Trigger Event:
push
-
Statement type: