Skip to main content

🚢 ktui

An interactive terminal UI for building Kubernetes YAML manifests.

CI Status PyPI version npm version Python Versions License


⚡ Why ktui?

Tired of memorizing exact YAML structures, indentation rules, and valid fields for every Kubernetes resource?

ktui solves this by giving you a dynamic, schema-driven terminal UI. It behaves like a modern web form inside your terminal. Pick a resource, fill in the fields you care about, use the interactive field picker to search for advanced properties, and preview or save the generated YAML.

✨ Features

  • 🏗️ Schema-driven Forms: Built-in definitions for core Kubernetes resources (Deployments, Pods, Services, ConfigMaps, RBAC, OpenShift Routes, etc.).
  • 🔍 Interactive Field Picker: Don't see the field you need? Open the searchable field picker to dynamically mount new properties or entire field groups (like spec.template.spec.containers) into your form.
  • ♻️ Smart Merging: Added fields are intelligently merged into their correct hierarchical sections—no duplicate categories or broken nesting.
  • 🗂️ Multi-Tab Editing: Open several resources at once (even multiple of the same kind), each in its own tab with independent state. Tabs are titled after metadata.name.
  • 👁️ Live YAML Preview: Press p at any time to instantly see the clean, formatted YAML you are building.
  • 🎨 Modern TUI: Keyboard-first navigation, multiple themes (press t to cycle), and a responsive layout powered by Textual.
  • 💾 Instant Save: Save your generated manifests directly to your disk with a single keystroke.

🚀 Installation

ktui is distributed as both a Python package and a self-contained executable via npm.

You don't even need Python installed! The npm package downloads a pre-compiled native binary for your OS (Linux, macOS, Windows).

# Run directly without installing
npx @ktui/editor

# Or install globally
npm install -g @ktui/editor

Install via PyPI using pipx (to keep your environment clean):

pipx install ktui

# Or with pip
pip install ktui

⌨️ Usage & Keybindings

Simply run ktui in your terminal to start the application.

Global

Key Action
↑ / ↓ Navigate focused lists
Tab / Shift+Tab Move between form fields
Enter Select resource / confirm (opens it in a new tab)
Ctrl+W Close the active tab
Ctrl+V Validate the active tab
p Preview YAML
Ctrl+S Save YAML to file
t Cycle application theme
Esc Close modal / Go back
q Quit

Field Picker (Press Add Field in forms)

Key Action
/ Focus search bar
↑ / ↓ Navigate available fields
Enter (on property) Toggle individual field selection
Enter (on 📁 group) Select / deselect all fields in that group
Esc Cancel without adding

🛠️ Development

If you want to contribute or build from source:

git clone https://github.com/marceleno1717/ktui.git
cd ktui

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Start the app
ktui

📄 License

This project is licensed under the PolyForm Noncommercial License 1.0.0.

Metadata

Release files for ktui 0.2.1

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

Source distribution (sdist)

Source distribution for ktui 0.2.1
File Size Uploaded
ktui-0.2.1.tar.gz 74.7 MB Details

Built distribution (wheel)

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

Total release size: 74.9 MB

Release files / ktui-0.2.1.tar.gz

Download URL ktui-0.2.1.tar.gz
Size 74.7 MB
Tags Source
SHA-256 checksum
How to use checksums
ce5c2550365b3a02d87373505ce8a7d3edb6b0a1d32d039aa1248fb49a43c9cb
BLAKE2b-256 checksum
How to use checksums
6a99209887f86e5efad3f3f53bde4c0d601334d35cf3772d8862a3573d8d801f
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 3, 2026.

Transparency log

Release files / ktui-0.2.1-py3-none-any.whl

Download URL ktui-0.2.1-py3-none-any.whl
Size 152.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afc02ba079aa231405a91cbe8de28d96b14bb78358b8ed2b086a3b80f9c2e521
BLAKE2b-256 checksum
How to use checksums
f7d8f0bdc5d549e5ada70f8b876ca2841bb339cceb6c4af125779f5148a3be7b
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

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