Thanks for thinking about contributing. codechu-cli is a small,
focused CLI primitives library — pure stdlib, POSIX-first. Patches
that keep that invariant intact are warmly received.
This library was originally extracted from Disk Cleaner, but is maintained independently with its own release cadence.
git clone https://github.com/codechu/cli-py.git
cd cli-py
pip install -e ".[dev]"
pytest -q
ruff check src tests- Branch names:
feature/<short>,fix/<short>,refactor/<short>,docs/<short>,test/<short>. - Commit messages: Conventional Commits
(
feat:,fix:,refactor:,docs:,test:,chore:). - Open a PR using the template; describe the why in the body.
- One change per PR — keep diffs reviewable.
A useful bug report includes:
- Python version + OS + terminal emulator (
$TERM,$LANG). - A minimal reproducer (≤30 lines, stdlib-only if possible).
- Expected vs observed behaviour. For TTY/non-TTY differences, mention whether you ran under a pty, a CI runner, or a real shell.
pytest -qmust pass; coverage stays at ≥85 %.- New feature → new test. Interactive components (
select,multiselect,Spinner) need tests that bypass the raw-mode path — use non-TTY streams + monkeypatchedtime.sleep. - Don't introduce real sleeps for synchronization — mock
time. - Prefer
io.StringIOfor stream injection over touching real fds.
The public surface is what codechu_cli.__all__ exports. Everything
else is internal — please don't extend it without a discussion first.
ruff check+ruff formatclean.- Type hints on public APIs (
from __future__ import annotations). - Use
logging.getLogger(__name__); avoidprint. - Pure stdlib — no new third-party runtime dependencies.
If you find a security issue, see SECURITY.md — do not open a public issue for it.
Every commit must be signed off with the DCO. The sign-off certifies that you wrote the patch, or otherwise have the right to submit it under the project's license. Add a line to your commit message:
Signed-off-by: Your Name <you@example.com>
git commit -s does this automatically. PRs without sign-off will
be asked to amend before merge.
Contributions are accepted under the project's license (see LICENSE).