Kipferl

Quick Start

Create your first kipferl app in 5 minutes

Quick Start

Let's build a simple CLI app that demonstrates kipferl's key features.

Create a Project

mkdir hello-cli && cd hello-cli
kipferl init

Write Your App

Create app.py:

import tui
import input

# Show a welcome box
tui.box("Welcome to Hello CLI!", title="Hello", border_color="cyan")

# Interactive selection
action = input.select("What would you like to do?", [
    "Say hello",
    "Show a table", 
    "Exit"
])

if action == "Say hello":
    name = input("What's your name? ")
    tui.success(f"Hello, {name}!")
    
elif action == "Show a table":
    tui.table([
        ["Language", "Status"],
        ["Python", "Supported"],
        ["Rust", "Native"],
    ], headers=True, border="rounded")
    
elif action == "Exit":
    if input.confirm("Are you sure?"):
        tui.error("Goodbye!")

Develop It

kipferl dev app.py

Kipferl runs the app immediately and restarts it whenever a Python, config, or template file in the app directory changes. The watcher stays open after the app exits, so save app.py to run it again. Add --clear to clear the terminal between runs or --watch <path> to include any file or directory elsewhere. Supported configuration extensions include JSON, YAML, TOML, KDL, XML, CSV, INI, CFG, and CONF.

See the kipferl dev reference for every option, the complete default file list, ignored paths, process behavior, terminal restoration, and troubleshooting.

For a one-off run without watching, use kipferl run app.py.

Build a Binary

# Build for current platform
kipferl build app.py -o hello

# Build a standalone binary for this machine
kipferl build app.py -o hello --mode universal

# Or target another supported platform
kipferl build app.py -o hello-linux --target linux-x86_64

# Run the binary
./hello

Universal builds automatically select a tree-shaken core runtime or the full compatibility runtime from your imports. This happens without a local Rust toolchain. See the kipferl build reference for size expectations, profile selection, cross-target behavior, and --full-runtime.

What's Next?

On this page