Skip to main content

typer-swissknife

typer-swissknife is a lightweight companion library for Typer that helps you build cleaner, more expressive CLI applications.

It focuses on a small set of practical helpers for common CLI patterns such as alias-aware commands, nested sub-apps, and richer help output.

Why use it

  • Keep command registration simple and readable.
  • Organize larger CLIs into smaller, reusable Typer components.
  • Improve discoverability with optional visual help text.
  • Stay close to Typer's native behavior while adding a bit more structure.

Features

  • Alias-aware command decorators
  • Nested Typer app registration
  • Optional ASCII-enhanced help sections
  • Simple integration into existing Typer projects

Installation

pip install typer-swissknife

Quick example

import typer
from typer_swissknife import add_typer, command

app = typer.Typer()
admin = typer.Typer()

@command(app, name="list", aliases=("ls",))
def list_items():
    print("Listing items...")

@command(admin, aliases=("rm",))
def remove(item: str):
    print(f"Removing {item}")

add_typer(
    app,
    admin,
    name="admin",
    ascii_name="Admin",
    aliases=("a",),
    help="Administrative commands",
)

if __name__ == "__main__":
    app()

Project philosophy

This package is intentionally compact and focused. As the project grows, the goal is to keep the documentation high-level and feature-oriented rather than listing every helper in detail.

License

typer-swissknife is licensed under the GNU General Public License v3 (GPLv3).

Release files for typer-swissknife 0.1.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 typer-swissknife 0.1.0
File Size Uploaded
typer_swissknife-0.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for typer-swissknife 0.1.0
File Interpreter ABI Platform
typer_swissknife-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 kB

Release files / typer_swissknife-0.1.0.tar.gz

Download URL typer_swissknife-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
36a9fffa4db6345c516edb89a45ce41e7e11e1efef2c500bf67b060e5e23265b
BLAKE2b-256 checksum
How to use checksums
f31b5bbdb97573ec0ec39de8c69997f3c7aac11ee99438db304b30bd94d20057
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / typer_swissknife-0.1.0-py3-none-any.whl

Download URL typer_swissknife-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1317b82f15e57efbbf8766f3fb4c22502e890f79e7383d7e92017e18efaa4f5
BLAKE2b-256 checksum
How to use checksums
954524864b9815c784e104045fee41cbed4cdeed672dfa7953e686449be6e6e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

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