pypith
Decorator-based library for building agent-native Python CLIs with progressive discovery.
- Define commands with
@app.command()and attach intents and hints - Auto-generated
pithdiscovery subcommand with tiers 0-3 - Built-in core schema, rendering, and optional semantic search
- Schema export compatible with
pypith-cli
Installation
pip install pypith
# With semantic search support
pip install pypith[semantic]
Quick Start
from pith import Pith, Argument, Option
from pathlib import Path
app = Pith(name="fileops", pith="File manipulation utilities")
@app.command()
@app.intents("copy files", "duplicate", "backup files")
def copy(
src: Path = Argument(..., pith="Source file or directory"),
dest: Path = Argument(..., pith="Destination path"),
recursive: bool = Option(False, "-r", "--recursive", pith="Copy directories recursively"),
):
"""Copy files or directories to a destination."""
import shutil
if src.is_dir() and recursive:
shutil.copytree(src, dest)
else:
shutil.copy2(src, dest)
if __name__ == "__main__":
app.run()
Core Module
The library includes the core schema and rendering utilities:
from pith.core import PithSchema, Command, Tier1, Tier2, Tier3
from pith.core import render_tier0, build_run_line, search_commands
Metadata
Release files for pypith 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pypith-0.1.2.tar.gz | 18.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pypith-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.9 kB
Release files / pypith-0.1.2.tar.gz
| Download URL | pypith-0.1.2.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5efef8c892fcd5e2c9a636ca0466d93ec6916b51343637bfa0bf6bbbb5050ff
|
|
BLAKE2b-256 checksum How to use checksums |
ba7f52661763779b8b2e0cf99da6db20b7b17497db91110a715774e072d37017
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 8, 2025.
Transparency logRelease files / pypith-0.1.2-py3-none-any.whl
| Download URL | pypith-0.1.2-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37693e9f6c354bbbe4e769e10fb727e19bdc45eaf031b7459ea4dfbd4562fdb5
|
|
BLAKE2b-256 checksum How to use checksums |
ad98ef2ba7a55a28e2239b973a6ae16d4685769d73013bba497b30f85e6b6ab4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Dec 8, 2025.
Transparency log