Skip to main content

cmdgui

Simple terminal GUIs in Python. Draw your layout as text, fill in the widgets, and keep writing your program — the view runs on its own thread, so there's no event loop to hand control to and no draw calls to make.

┌─ name ───────────────────┐
│quinn                     │[         Greet          ] ON   fast
├─ fruit ──────────────────┼─ scores ──────────────────────────────────┐
│ apple                    │name      score  city                      │
│ banana                   │Ada       98     London                    │
│ cherry                   │Linus     87     Helsinki                  │
│                          ├─ log ─────────────────────────────────────┤
│                          │Hello, quinn! 👋                           │
│                          │picked cherry                              │
└──────────────────────────┴───────────────────────────────────────────┘
 ████████████████████████████████░░░░░░░░░░░░░░░░  67%[ ] done

No dependencies. macOS and Linux; Windows support is written but untested.

Install

pip install cmdgui

Quick start

from cmdgui import View, Button, Stdout
import time

class App(View):
    layout = """
        start  pause  .
        log    -      -
    """
    start = Button("Start", on_click=lambda: print("started"))
    pause = Button("Pause", on_click=lambda: print("paused"))
    log = Stdout()

view = App()

for i in range(100):
    print(f"tick {i}")   # shows up in the log box
    time.sleep(0.5)

Press q to quit (or Ctrl+C). Because the widgets are class attributes, your editor knows view.start is a Button — autocomplete and type checking work.

What's in it

  • Layouts drawn as text: each word is a grid cell, - and | stretch a widget across cells, and borders between neighbours join up.
  • Widgets: text, labels, buttons, one-line and multi-line text boxes (with password mode and history), checkboxes, toggles, radio buttons, dropdowns, sliders, progress bars, menus, folding trees, tables, tabs, and a box that shows everything you print.
  • Popups: dialogs, dropdowns and command menus that float over the layout.
  • Mouse and keyboard: clicks, dragging, the scroll wheel, Tab between widgets, and your own key bindings.
  • Timers: view.every(1, tick) and view.after(5, fn), no threads needed.
  • Themes: restyle any part, with 73 named colors, the 256-color palette, or exact hex colors.
  • Your own widgets: subclass Widget, draw into a canvas, and it works in layouts.

Documentation

The examples folder has a widget demo, a dashboard, popups, tabs, a console and a file browser.

Metadata

Release files for cmdgui 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmdgui 0.2.0
File Size Uploaded Provenance
cmdgui-0.2.0.tar.gz 45.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cmdgui 0.2.0
File Interpreter ABI Platform
cmdgui-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 94.7 kB

Release files / cmdgui-0.2.0.tar.gz

Download URL cmdgui-0.2.0.tar.gz
Size 45.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6dfc7097819f6b68d0f0fb665cc3001a0d15b304b2ea13ff983a137165aedccb
BLAKE2b-256 checksum
How to use checksums
bfab89fe193100fd236fa82cffd1da3c6542ae16cfe72dc39bb2e114fde48301
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / cmdgui-0.2.0-py3-none-any.whl

Download URL cmdgui-0.2.0-py3-none-any.whl
Size 49.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a996300460a7d929af80edfbb9088c42f2e030d690586642da173061b630c45b
BLAKE2b-256 checksum
How to use checksums
deb39e5f27b80a1a04393de360cda7ec9c2d00acf14521826eb8699ffbbac8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Security for cmdgui 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cmdgui-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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