On this page
desktop-interface
Prev: spatial-ui | Up: projects | Next: thoughtformula
Rel: wispsy, Frameworks, expose-protocol
Ref: wispsy on GitHub
Tags: #public #wispsy #project #frameworks #tier/standard
Role
Typed native desktop APIs for Python 3.12+ starting with macOS—covering nonprompting permission checks, active display snapshots, window discovery/control, keyboard input, and mouse input over ctypes with zero runtime dependencies.
Install
python -m pip install desktop-interface==0.1.0
Quickstart
from desktop_interface import Desktop, Permission
with Desktop() as desktop:
status = desktop.permissions.check(Permission.ACCESSIBILITY)
topology = desktop.displays.snapshot()
windows = desktop.windows.list()
print(status.state, len(windows))
When to Reach for It
- Interacting with native macOS displays, windows, keyboard, and mouse via typed Python APIs without ad-hoc AppleScript/shell wrappers.
- Reach for expose-protocol specifically when exposing local programs through validated macOS URL schemes.
Gotchas & Pitfalls
- macOS-first
ctypesbindings: Currently targets macOS native APIs (>=3.12, zero runtime deps); non-macOS platforms are not yet implemented. - TCC permissions (Accessibility / Screen Recording): Permission checks are nonprompting by design—grant Accessibility and Screen Recording permissions to your terminal/Python binary in System Settings before dispatching window, keyboard, or mouse actions.
- URL scheme boundary: For launching local tools from custom URLs (
scheme://action?...), use expose-protocol instead of scripting UI clicks.
Pairs With
- expose-protocol — Complements macOS desktop control with validated URL-scheme entry points.
- ellainng — Powers personal macOS automation workflows.
Metadata
type: project-card
slug: desktop-interface
org: wispsy
repo: wispsy/desktop-interface
package: desktop-interface
import_name: desktop_interface
version: 0.1.0
requires_python: ">=3.12"
layer: frameworks
topic: wispsy-framework
status: active
language: python
source_docs: README.md, docs/
Linked from
Related notes
- wiki/projects/spatial-ui Linked here; links to this page; shared tags: #frameworks, #project, #tier, #wispsy
- wiki/projects/thoughtformula Linked here; links to this page; shared tags: #frameworks, #project, #tier, #wispsy
- wiki/projects/expose-protocol Linked here; links to this page; shared tags: #project, #tier, #wispsy
- wiki/stack/frameworks Linked here; links to this page; shared tags: #frameworks, #tier, #wispsy
- wiki/orgs/wispsy Linked here; links to this page; shared tags: #tier, #wispsy
- wiki/projects Linked here; links to this page; shared tags: #wispsy
- wiki/projects/ellainng Linked here; shared tags: #project, #tier, #wispsy
- wiki/compatibility links to this page; shared tags: #tier, #wispsy
- tuts/third_party/python3/wispsy links to this page; shared tags: #tier
- wiki/projects/carets shared tags: #frameworks, #project, #tier, #wispsy