Skip to main content

climplicit

Derive CLI tools implicitly from Python class definitions. Decorate a class with @tool, mark methods with @command, and the CLI is derived from type annotations automatically.

Defining a tool

from climplicit import command, tool
from pathlib import Path

@tool("file-processor", desc="Process and inspect text files")
class FileProcessor:
    @command
    def convert(
        self,
        input_file: Path,
        output_file: Path,
        encoding: str = "utf-8",
        uppercase: bool = False,
        max_lines: int | None = None,
    ):
        """Convert a text file, optionally transforming its content."""
        ...

    @command
    def inspect(self, input_file: Path, verbose: bool = False):
        """Print metadata and a preview of a text file."""
        ...
$ file-processor --help
usage: file-processor <command> [options]

│ Process and inspect text files

options:
  -h, --help                  show this help message and exit

commands:
  convert                     Convert a text file, optionally transforming its content.
  inspect                     Print metadata and a preview of a text file.

$ file-processor convert --help
usage: file-processor convert input-file output-file [options]

│ Convert a text file, optionally transforming its content.

positional arguments:
  input-file
  output-file

options:
  -h, --help                  show this help message and exit
  --encoding STR              ['utf-8']
  --uppercase
  --max-lines INT             [None]

How annotations map to CLI behaviour

Parameter CLI
name: str positional name (required)
path: Path positional path (required)
count: int = 10 --count INT (default: 10)
verbose: bool = False --verbose flag
limit: int | None = None --limit INT (default: None)
  • snake_case names become --kebab-case flags automatically
  • Parameters without type annotations have their type inferred from the default value
  • *args and **kwargs are silently ignored
  • Both regular methods and @classmethod methods are supported

Single-command shortcut

If a tool defines only one @command, the subcommand layer is skipped entirely:

@tool("greet")
class Greeter:
    @command
    def hello(self, name: str, loud: bool = False):
        """Greet someone."""
        ...
$ greet World --loud   # no "hello" subcommand needed

Installing tools into a venv

climplicit writes scripts directly into the active venv's bin/ on demand — no hardcoded entry points, no reinstall loop.

climplicit-generate <source-root>

<source-root> is the directory containing your packages (equivalent to where in find_namespace_packages). Sibling directories at the same level are also added to sys.path, so shared packages like util/ resolve correctly.

Re-run whenever you add a new @tool class.

Packaging for distribution

To print the [project.scripts] block for all @tool classes in a folder:

climplicit-generate <source-root> --print-scripts

Paste the output into your pyproject.toml and pip will create the scripts on install.

Before climplicit is on PyPI

Until climplicit is published, pip install -e . won't find it in the isolated build environment. Workaround:

pip install -e /path/to/climplicit       # install climplicit into your venv first
pip install --no-build-isolation -e .    # reuse the active venv for building

Or use the helper script:

/path/to/climplicit/scripts/dev-install.sh /path/to/your/project

Metadata

Release files for climplicit 0.1.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 climplicit 0.1.1
File Size Uploaded Provenance
climplicit-0.1.1.tar.gz 14.8 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 25.9 kB

Release files / climplicit-0.1.1.tar.gz

Download URL climplicit-0.1.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1a8e03ca69f4f7478e03ee9b62ff456ebfa71544ff24de3fccbf4cf9cc574c15
BLAKE2b-256 checksum
How to use checksums
46918f4649e9ea7807d7574553af6d730f525697f6aba8efab293fdbb8a242f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / climplicit-0.1.1-py3-none-any.whl

Download URL climplicit-0.1.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee3d07904bb88257da892bc07aa42562fa9753d9d26216e093b91f3bd7499bda
BLAKE2b-256 checksum
How to use checksums
90916112e786c1f838406ec1bd6348b08df333eb3a8f34cd79961646b94d1029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for climplicit 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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