Just Python 3 + Tkinter. No Electron. No bloat. Zero dependencies.
Features β’ Quick Start β’ Architecture β’ Shortcuts β’ Contributing
Most Python IDEs are heavy, slow, or require dozens of dependencies. Viper is the opposite β a clean Python package that gives you everything needed to write and run Python code on Linux. No setup wizards. No configuration files. No internet required.
| Feature | Description |
|---|---|
| Multi-tab editing | Open and switch between multiple files without saving |
| Syntax highlighting | Keywords, builtins, strings, comments, decorators, numbers |
| Line numbers | With active line indicator |
| Current line highlight | Subtle dark highlight on cursor line |
| Auto-indent | Smart indentation after : blocks |
| Auto-close | Brackets ()[]{} and quotes ""'' |
| Find bar | Search with match count and prev/next navigation |
| Zoom | Ctrl+/- to resize editor font (8β28px) |
| Feature | Description |
|---|---|
| Run code | F5 to execute, real-time stdout/stderr streaming |
Inline input() |
Type directly next to the prompt in the output area β just like a real terminal |
| pip install | Install packages directly from the terminal |
| Expression eval | Type Python expressions for quick evaluation |
| Command history | Arrow keys to cycle through previous commands |
| Feature | Description |
|---|---|
| No forced saving | Open, edit, and run files freely β save when you want |
| Multi-file open | Select multiple files at once from the file dialog |
| Content-hash tracking | Only marks files as modified when content actually changes |
| Tab management | Close tabs with β, prompted to save only when needed |
git clone https://github.com/nafiul-afk/viper.git
cd viper
make runsudo make install # installs to /usr/local
viper # launch from anywherepip install -e . # editable install
viper # launch from anywheresudo make uninstall
# or
pip uninstall viper-idePython 3.8+ with Tkinter:
# Ubuntu / Debian
sudo apt install python3-tk
# Fedora
sudo dnf install python3-tkinter
# Arch
sudo pacman -S tkββββββββββββββββββββββββββββββββββββββββββββββββββββ
β app.py β
β Main window β’ Toolbar β’ Shortcuts β’ File I/O β
β Process management β’ pip runner β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β editor.py β β
β β Tab bar β’ Gutter β’ Text widget β β
β β Syntax highlighting β’ Find bar β β
β β Auto-close β’ Content-hash dirty tracking β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β terminal.py β β
β β Output display β’ Inline process input β β
β β Command history β’ Tag-based coloring β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β
βββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ€
β theme.py β constants.py β
β Color scheme β Keywords β’ Builtins β’ Patterns β
β 30 tokens β Font chains β’ Regex builder β
βββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
-
Content-hash dirty tracking β Tkinter's
<<Modified>>event fires on tag operations (syntax highlighting, line highlighting), causing false "unsaved changes" dialogs. Viper useshash(content)comparison instead, eliminating false positives entirely. -
Per-keysym auto-close bindings β A catch-all
<Key>binding blocks text input on some Tkinter/Tcl versions. Viper binds<KeyPress-parenleft>,<KeyPress-bracketleft>, etc. individually to avoid this. -
Threaded I/O β Subprocess stdout/stderr are read in daemon threads using
os.read()for immediate output (no newline buffering). The main thread polls the queue every 50ms, keeping the UI responsive during code execution. -
Inline
input()I/O β When a process is running, the terminal output area becomes editable. A Tkinter text mark tracks the boundary between program output and user input. Thewrite()method uses a save-insert-restore pattern so that program output arriving mid-typing is placed correctly before the user's pending keystrokes.
| Shortcut | Action |
|---|---|
F5 |
Run code |
Ctrl+S |
Save |
Ctrl+N |
New tab |
Ctrl+O |
Open file(s) |
Ctrl+W |
Close tab |
Ctrl+F |
Find |
Ctrl+D |
Duplicate line |
Ctrl+/ |
Toggle comment |
Ctrl++ |
Zoom in |
Ctrl+- |
Zoom out |
Ctrl+0 |
Reset zoom |
Tab |
Indent |
Shift+Tab |
Unindent |
β / β |
Terminal history |
viper/
βββ viper/
β βββ __init__.py # Package metadata
β βββ __main__.py # Entry point
β βββ app.py # Main application (~360 lines)
β βββ editor.py # Code editor (~435 lines)
β βββ terminal.py # Terminal widget (~215 lines)
β βββ theme.py # Color scheme (37 lines)
β βββ constants.py # Language constants (63 lines)
βββ run.py # Convenience launcher
βββ pyproject.toml # Modern Python packaging
βββ Makefile # Build / install / uninstall
βββ CHANGELOG.md # Release history
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # MIT License
βββ README.md
βββ .gitignore
One theme. One purpose. Zero compromise.
Viper is not trying to be VS Code. It is a focused tool for writing and running Python on Linux β nothing more, nothing less. Every feature exists because it removes friction, not because it looks good on a feature list.
See CONTRIBUTING.md for guidelines.
MIT β see LICENSE
Built with π by Nafiul Islam