Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easymd_cli-0.4.2.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easymd_cli-0.4.2-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

Details for the file easymd_cli-0.4.2.tar.gz.

File metadata

  • Download URL: easymd_cli-0.4.2.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for easymd_cli-0.4.2.tar.gz
Algorithm Hash digest
SHA256 3ed775c5be9272b763bf949eabaf4933be875c864cee69d532f6fd302ba50d18
MD5 eb1e98f147b968a34522374dee9e8b1c
BLAKE2b-256 62a34c6947a496298adb01206061f5f3c466c5cfa22ad1e0cf5b49fadeceaacb

See more details on using hashes here.

Provenance

The following attestation bundles were made for easymd_cli-0.4.2.tar.gz:

Publisher: release.yml on decajoin/easymd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file easymd_cli-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: easymd_cli-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 31.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for easymd_cli-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00a6f7e9eec8feec93f9d9c374efc22ae0a10ac4b9b324015d70f9464a478409
MD5 e7fc61396dd65c6175553c81117ed236
BLAKE2b-256 4713acea10963b7ba5d8096c7fdb68836800c6a1235fdbd62126bf10d70ebe54

See more details on using hashes here.

Provenance

The following attestation bundles were made for easymd_cli-0.4.2-py3-none-any.whl:

Publisher: release.yml on decajoin/easymd

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.3

2 files

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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