Skip to main content

Rhythmos CLI

A lightweight CLI framework. Install once, put commands in each project's commands/ folder.

Install

pip install rhythmos-cli

Usage

In any project:

rhythmos-cli make hello -d "Say hello to someone"
# edit commands/hello.py
rhythmos-cli hello Alice

rhythmos is an optional shorthand for the same CLI.

make and list are built-in system commands. If you define a user command with the same name, yours wins and a warning is printed.

Commands are loaded from ./commands (cwd), or from RHYTHMOS_COMMANDS if set.

Write a command

from rhythmos import BaseCommand


class HelloCommand(BaseCommand):
    def get_description(self):
        return "Say hello to someone"

    def add_arguments(self):
        self.parser.add_argument("name", help="Name of the person to greet")

    def handle(self, name):
        print(f"Hello, {name}!")

File commands/foo_bar.py → rhythmos-cli foo-bar.

See examples/commands/hello.py for a ready example.

Develop this package

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
RHYTHMOS_COMMANDS=examples/commands rhythmos-cli hello World
pytest

Release (GitLab CI)

Version comes from git tags (no manual edits in pyproject.toml). Pushing a tag builds and publishes that version:

git add -A && git commit -m "..." 
git tag v26.10.2
git push origin v26.10.2

Requires CI variable PYPI_TOKEN (masked + protected) and protected tags v*. If a tag pipeline fails, push a new tag — protected tags usually cannot be deleted via git.

Metadata

Release files for rhythmos-cli 26.10.4

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

Source distribution (sdist)

Source distribution for rhythmos-cli 26.10.4
File Size Uploaded
rhythmos_cli-26.10.4.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rhythmos-cli 26.10.4
File Interpreter ABI Platform
rhythmos_cli-26.10.4-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / rhythmos_cli-26.10.4.tar.gz

Download URL rhythmos_cli-26.10.4.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
44de49ba38a3f9740dc27c45ef925cd0700cc04c2519686439b7b46492a82372
BLAKE2b-256 checksum
How to use checksums
6ca767a7046da13125728e2d1f05008b39af5b4c3978f3aeb52c0dab67947ef7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / rhythmos_cli-26.10.4-py3-none-any.whl

Download URL rhythmos_cli-26.10.4-py3-none-any.whl
Size 8.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7fd9047ed0b429e85d17a9f3afe4c7a58c3f3e5024e1017ad5458e7b86e9fe8
BLAKE2b-256 checksum
How to use checksums
d449a508043377edcb8d84168775e7486888a24aa09837d91d4dd71f29d5d5f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release history Release notifications | RSS feed

This release

26.10.4 This release

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