pip install blessed && python vs_cli.py . — that's it.
▸ Editor preview
vs-cli — main.py*                                  INSERT ⎇ main saved — main.py      Ln 12, Col 1 4spc PY UTF-8
 1 import os, sys, re
 2  import subprocess
 3  from pathlib import Path
 4  from collections import deque
 5
 6 # undo stack — snapshot before every destructive op
 7  _UNDO_LIMIT = 500
 8
 9  class EditorState:
10      def __init__(self):
11          self.lines = ['']
12          self.cy = self.cx = 0
vs-cli is a single Python file (~700 lines) that gives you a VS Code-flavored editing experience in any terminal. File explorer, git gutter, syntax highlighting, undo/redo, bracket matching, integrated terminal, command palette, quick-open, global grep, outline view, zen mode — the works. It runs anywhere Python 3.10+ runs, with one pip install.
▸ Installation
$ pip install blessed
$ python vs_cli.py [file or directory]

Requires Python 3.10+. No other dependencies. Works on Linux, macOS, and over SSH. Download: vs-cli.py

▸ Features
  • [+] Syntax highlighting — Python, JS/TS, JSON, Markdown
  • [+] Undo / redo (Ctrl+Z / Ctrl+Y) — 500-entry snapshot stack
  • [+] Bracket auto-close and visual bracket matching
  • [+] Auto-indent detection — tabs vs spaces, width detection
  • [+] Smart newline with auto-indent after : and {
  • [+] Git gutter — added / modified / deleted indicators per line
  • [+] Quick open (Ctrl+P) — fuzzy file search across project
  • [+] Global grep (Ctrl+F) — project-wide search via grep -rn
  • [+] Find & replace (Alt+R) — replace-all with undo
  • [+] Outline view (Ctrl+O) — functions and classes for py/js/ts
  • [+] Sticky scroll — enclosing function pinned to top of viewport
  • [+] Zen mode (F11) — hides sidebar and status bar
  • [+] Integrated terminal panel (F9→A) — run commands inline
  • [+] Command palette (Shift+F6) — searchable command list
  • [+] File explorer with expand/collapse and parent navigation
  • [+] Word jump (Ctrl+← / Ctrl+→)
  • [+] Smart home key — toggle between indent and column 0
  • [+] Flicker-free full-screen rendering via single write()
  • [+] Color auto-detection — gracefully disables on unsupported terms
  • [ ] Multiple buffers / tabs — not yet
  • [ ] LSP / autocomplete — not planned
  • [ ] Plugin system — not planned
▸ Keybindings
Key Action Context
Ctrl+SSave fileglobal
Ctrl+QQuitglobal
Ctrl+ZUndoglobal
Ctrl+YRedoglobal
F5Focus explorerglobal
F6Focus editorglobal
Shift+F6Command paletteglobal
F11Toggle zen modeglobal
F9 → AOpen terminal panelglobal
F9 → CClose terminal panelglobal
Ctrl+PQuick open fileglobal
Ctrl+FGlobal grepglobal
Ctrl+OOutline / symbolsglobal
Alt+SSearch in fileglobal
Alt+WGo to folderglobal
Alt+RFind and replaceglobal
Ctrl+← / →Word jumpeditor
HomeSmart home (indent ↔ col 0)editor
EndEnd of lineeditor
PgUp / PgDnScroll by pageeditor
TabIndent (auto-detected)editor
EnterNewline + smart indenteditor
BackspaceDelete char / bracket paireditor
↑ ↓ EnterNavigate / openexplorer
BackspaceParent directoryexplorer
EscFocus editorterminal
▸ Design notes

The entire screen is redrawn every frame as a single sys.stdout.write() call. No diff, no partial updates. At 20fps this costs under 2ms per frame — the simplicity is worth it.

The undo stack stores full line snapshots in a deque(maxlen=500). Snapshots are deduplicated to avoid filling the stack during held-key repetition.

The terminal panel is not a PTY. It uses blocking subprocess.run(). Interactive programs like vim, htop, or the Python REPL will not work. This is a deliberate tradeoff for zero complexity.