๐ฆ Lion-OS
A complete graphical desktop operating system that runs inside Python.
Boot, login, a full window manager with snapping, a taskbar with desktop icons, and 15 built-in apps โ all rendered with Pygame. Installable from PyPI and started with a single command.
Install ยท Quick Start ยท Apps ยท Features ยท Themes ยท Development
โจ What is Lion-OS?
Lion-OS is a genuine desktop environment built from scratch in Python. It has its own boot sequence, a login screen, a window manager with drag / resize / snap-to-edge and corners, desktop icons, an Alt-Tab switcher, a taskbar with a live launcher, a working power menu, and a suite of 15 built-in applications โ including a built-in AI assistant that works with local and cloud models.
The v1.1 release ("Refined") added a performance engine (cached window chrome, prerendered wallpaper), window animations, animated theme transitions, and deep feature upgrades across the most-used apps.
The v1.1.1 patch release focuses on memory efficiency: the kernel now reuses full-screen overlay, glow, taskbar and fade surfaces instead of allocating them every frame; app-icon tiles and glass panels are cached; fonts are shared through a global cache instead of being rebuilt per draw call; and the System Monitor's graph no longer allocates a fresh fill surface each frame.
The v1.1.2 release made the install-to-run experience bulletproof: the package
installs two equivalent commands (lionos and lion-os-desktop), python -m
lionos works even when a console script isn't on your PATH, and the PyPI listing
metadata is clean.
The v2.0.0 "Majestic" release is the biggest yet:
- Procedural vector icons โ every app gets hand-drawn, theme-aware icon art (no more emoji), crisp at any size.
- A real driver architecture โ a driver bus with 99 drivers (display, audio, input, media, network + 94 simulated across storage, security, networking, diagnostics, virtualization, IoT and more), all auto-probing, auto-tuning and self-healing at boot, plus a Devices & Drivers app.
- Auto-configuration โ everything configures itself;
python -m lionosjust works, and~/.lionos/drivers.auto.jsonrecords what was tuned. - Persistence โ session resume (windows restore + animate back in), crash-recovery checkpoints, an activity log with launcher Recents and a boot "Session Summary" card, a clipboard with history, and a first-boot wizard.
- Chrome & power features โ a catalog launcher, notification center, sound design, wallpaper gallery + accent picker, system tray + statusline widgets, motion-level accessibility, virtual workspaces, window tiling, global search (F2), a screenshot tool, and focus mode.
- 20 built-in apps โ now including Help, Devices, Inbox, System Health and Today, plus a rebuilt Media Player.
It's designed to be simple to run and genuinely fun to explore:
lionos
That's it. The desktop boots, you log in, and you have a working graphical OS.
๐ Install
Option 1 โ Install from source (recommended)
git clone https://github.com/ram1234598766-dotcom/Lion-OS.git
cd Lion-OS
python -m pip install .
lionos
Option 2 โ Install from PyPI
python -m pip install lion-os-desktop
lionos
Installing lion-os-desktop gives you two equivalent commands โ lionos and
lion-os-desktop โ plus the always-available python -m lionos.
Requirements: Python 3.9+. On first run Lion-OS installs nothing extra โ Pygame and psutil are dependencies and come automatically.
Option 3 โ Run without installing
git clone https://github.com/ram1234598766-dotcom/Lion-OS.git
cd Lion-OS
python -m pip install pygame-ce psutil requests
python -m lionos
๐ฅ Quick Start
lionosandpython -m lionosare equivalent. If your shell sayslionosis not recognized (common when Python lives inProgram Filesand pip installs to your user site), usepython -m lionosโ or see Troubleshooting.
| Command | What it does |
|---|---|
lionos |
Boot the desktop (windowed) |
lionos --fullscreen |
Boot fullscreen |
lionos --theme ocean |
Boot with a theme (dark, light, ocean, forest, violet, rose, sunset, midnight) |
lionos --screen 1600x900 |
Boot at a specific resolution |
lionos --reset |
Reset saved configuration |
lionos --headless |
Run the smoke test (no display, for CI) |
lionos --version |
Print the version |
First-time use
- Run
lionos. The OS boots with a progress bar, then shows the login screen. - Press Enter to log in as the default user (or set a password in
~/.lionos/config.json). - Click the ๐ฆ Start button (bottom-left) to open the launcher, then search for any app.
- Double-click a desktop icon to launch an app, or right-click the desktop for a context menu.
Handy shortcuts
| Key | What it does |
|---|---|
| Win | Toggle the launcher |
| Alt-Tab | Switch between open windows |
| Alt-Tab โ Tab | Cycle through windows, release Alt to activate |
| Esc | Close launcher / menus / power menu |
| โ โ โ โ / Enter | Navigate the launcher grid and launch |
๐ฑ Built-in Apps
| App | Icon | Description |
|---|---|---|
| AI Assistant | ๐ฌ | Chat with a built-in assistant โ Ollama, OpenAI or DeepSeek |
| Welcome | ๐ | Getting-started tour of the OS |
| File Manager | ๐ | Breadcrumbs, back/forward history, right-click context menu (open/rename/delete/copy path) |
| Terminal | โฃ | Full interactive shell with command history (โ/โ), cwd prompt, built-in commands |
| Text Editor | โ | Code editing with syntax highlighting, line numbers, Ctrl+S, Ctrl+F find |
| Calculator | โ | Keyboard input, history panel, percent โ safe AST-based evaluation |
| Paint | ๐จ | Canvas with brushes, shapes, fill, undo/redo, save to PNG |
| Notes | ๐ | Autosaving per-note files in ~/.lionos/notes/, note sidebar, title from first line |
| System Monitor | ๐ | Live CPU / RAM / disk / network graphs |
| Settings | โ | Themes, appearance, AI provider, system info, config reset |
| Media Player | ๐ต | Draggable seek bar, volume slider, playlist, next/prev, shuffle & loop |
| Browser | ๐ | Lightweight web reader & search |
| App Store | ๐ | Install Python packages via pip from inside the OS |
| About | โน | Version and platform info |
| UI Toolkit | ๐งฐ | Interactive demo of every widget |
๐ง AI Assistant
Open AI Assistant, then configure the provider in Settings โ AI Assistant:
| Provider | Endpoint | Model |
|---|---|---|
| Ollama (default, local) | http://localhost:11434/v1 |
llama3 |
| OpenAI | https://api.openai.com/v1 |
gpt-4o-mini |
| DeepSeek | https://api.deepseek.com/v1 |
deepseek-chat |
API keys are read from the environment (OPENAI_API_KEY, DEEPSEEK_API_KEY) or
stored in ~/.lionos/config.json. Nothing is hardcoded. For Ollama, run
ollama serve locally first.
๐จ Themes
Eight built-in themes with a glassmorphism look, switchable live from Settings. Theme changes animate smoothly between palettes:
- Dark ยท Light ยท Ocean ยท Forest ยท Violet ยท Rose ยท Sunset ยท Midnight
๐ Features
- Performance engine โ cached window chrome (shadow/body/titlebar), prerendered wallpaper, dirty-flag redraw and a font cache keep the desktop smooth at 60fps.
- Memory-efficient rendering โ full-screen overlays, glow, taskbar and fade surfaces are reused instead of reallocated each frame; app-icon tiles, glass panels and fonts are cached; the System Monitor's graphs reuse one fill surface.
- Desktop icons โ double-click to launch, single-click to select, right-click the desktop for a context menu.
- Window manager โ drag, resize, snap to edges and corners, maximize, minimize with open/close/minimize animations, Alt-Tab switcher.
- Power menu โ lock, sleep, restart and shutdown from the taskbar, with a fade-out animation.
- Launcher โ search-first with category tabs, keyboard grid navigation and a recent-apps row.
- Keyboard-first โ Win-key launcher, arrow-key navigation, Alt-Tab window switching.
- Animated theme transitions โ switching themes cross-fades every color.
- Shared icon tiles โ the same gradient app icons appear in the launcher, taskbar, desktop and About screen.
๐งฑ Architecture
lionos/
โโโ cli.py # `lionos` command-line entry point
โโโ kernel.py # desktop env: boot, login, icons, taskbar, launcher, power menu
โโโ wm.py # window manager: drag, resize, snap, focus, z-order
โโโ theme.py # color themes & blending
โโโ config.py # persistent user configuration (~/.lionos/config.json)
โโโ widgets.py # UI toolkit: buttons, inputs, sliders, lists, menus
โโโ ai/ # AI provider backends (Ollama / OpenAI / DeepSeek)
โโโ apps/ # 15 built-in applications
โโโ base.py # App base class + registry
โโโ ... # calculator, terminal, paint, notes, etc.
New apps are trivial to add:
from lionos.apps.base import App
class MyApp(App):
name = "My App"
icon = "โจ"
def draw(self, surface, rect):
... # draw into the window
# register in lionos/apps/__init__.py
๐งช Tests & CI
Run the automated suite (headless โ no display needed):
python -m pip install -e ".[dev]"
pytest
Tests cover boot, login, app registration, app rendering, calculator math (mouse + keyboard), window move/snap/close, corner snapping, Alt-Tab, launcher keyboard nav, desktop icons, theme switching + transitions, window chrome caching, terminal history and notes autosave โ plus the headless smoke test.
CI (.github/workflows/ci.yml) runs the full suite on every push and automatically
builds a wheel + sdist and attaches them to a GitHub Release on tags. Tag pushes
create the GitHub release only; publishing to PyPI is opt-in via a manual
workflow run.
๐ Troubleshooting
lionos is not recognized as a command
The package installs correctly โ the launcher just isn't on your PATH. This
happens when pip falls back to your user site-packages, e.g. when Python is
installed to C:\Program Files\PythonX (not writable by you) instead of the
per-user ...\AppData\Local\Programs\Python\PythonX location.
The universal fix (works everywhere, no PATH edits):
python -m lionos
To make the lionos command work in any terminal:
-
Find where pip put the launcher:
pip show -f lion-os-desktop | findstr /i "lionos" # Windows pip show -f lion-os-desktop | grep lionos # Linux/macOS
-
Either add that directory to your PATH, or install into a virtual environment, where the command always resolves:
python -m venv .venv .venv\Scripts\activate # Windows source .venv/bin/activate # Linux/macOS pip install lion-os-desktop lionos
Requirements
Python 3.9+. Pygame (pygame-ce) ships prebuilt wheels for every supported
Python version on Windows, macOS and Linux โ no compiler needed.
๐ฆ Releases
Pre-built wheels are attached to GitHub Releases:
pip install https://github.com/ram1234598766-dotcom/Lion-OS/releases/download/v2.0.0/lion_os_desktop-2.0.0-py3-none-any.whl
๐ Development
git clone https://github.com/ram1234598766-dotcom/Lion-OS.git
cd Lion-OS
python -m pip install -e ".[dev]"
pytest # run tests
python -m lionos --headless # smoke test
lionos # run the desktop
๐ License
MIT ยฉ Mrityunjay. See LICENSE.
Made with ๐ and Pygame.
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 lion_os_desktop-2.0.1.tar.gz.
File metadata
- Download URL: lion_os_desktop-2.0.1.tar.gz
- Upload date:
- Size: 157.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c6c20159d6cc6bde1625210c9d8c041f89981d46202ab46f29c9302edae936
|
|
| MD5 |
91d6c278cfaa5abeb228426b3f44be02
|
|
| BLAKE2b-256 |
3c4a139e81e383668ed46d19925542045e555a8ccc599aea948bb1af7d192708
|
File details
Details for the file lion_os_desktop-2.0.1-py3-none-any.whl.
File metadata
- Download URL: lion_os_desktop-2.0.1-py3-none-any.whl
- Upload date:
- Size: 132.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0472f03a3ff28de13a6e076cbff3922f584dbc02907ac5c1491b3bd5af91745a
|
|
| MD5 |
1e1460630be335c0042d74d30c2ffaf8
|
|
| BLAKE2b-256 |
9dda5142dbf63250910c084aba14c4ac96d4e4672383fb992e7880545acf06db
|