From 35fece6981f3dd96bb0bd7050312601040b7a04d Mon Sep 17 00:00:00 2001 From: Nathan McDougall Date: Sun, 27 Apr 2025 19:49:36 +1200 Subject: [PATCH] Sync README with CLI help docs --- README.md | 50 +++++++++++++++++++++++++++++---------------- src/usethis/_app.py | 2 +- 2 files changed, 33 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9daf585..72fb1f5 100644 --- a/README.md +++ b/README.md @@ -55,24 +55,28 @@ Alternatively, run in isolation, using `uvx` or `pipx`. ## 🖥️ Command Line Interface -### Main commands +### Manage Tooling -- [`usethis tool`](#usethis-tool) - [`usethis ci`](#usethis-ci) +- [`usethis tool`](#usethis-tool) -### Configuration +### Manage Configuration -- [`usethis badge`](#usethis-badge) -- [`usethis rule`](#usethis-rule-rulecode) +- [`usethis author`](#usethis-author) - [`usethis docstyle`](#usethis-docstyle) +- [`usethis rule`](#usethis-rule-rulecode) + +### Manage README + +- [`usethis badge`](#usethis-badge) - [`usethis readme`](#usethis-readme) -- [`usethis author`](#usethis-author) ### Information - [`usethis list`](#usethis-list) -- [`usethis show`](#usethis-show) +- [`usethis version`](#usethis-version) - [`usethis browse pypi`](#usethis-browse-pypi-package) +- [`usethis show`](#usethis-show) ## 💡 Example Usage @@ -126,18 +130,24 @@ Add a new tool to a Python project, including: - any other relevant directories or tool-bespoke configuration files, and - `.pre-commit-config.yaml` configuration if using `pre-commit`. -Currently supported tools: +#### Code Quality Tools + +- `usethis tool codespell` - Use the codespell spellchecker: detect common spelling mistakes. +- `usethis tool deptry` - Use the deptry linter: avoid missing or superfluous dependency declarations. +- `usethis tool import-linter` - Use Import Linter: enforce a self-imposed architecture on imports. +- `usethis tool pre-commit` - Use the pre-commit framework to manage and maintain pre-commit hooks. +- `usethis tool pyproject-fmt` - Use the pyproject-fmt linter: opinionated formatting of 'pyproject.toml' files. +- `usethis tool ruff` - Use Ruff: an extremely fast Python linter and code formatter. + +#### Testing -- `usethis tool codespell` -- `usethis tool coverage` -- `usethis tool deptry` -- `usethis tool import-linter` -- `usethis tool pre-commit` -- `usethis tool pyproject-fmt` -- `usethis tool pyproject.toml` -- `usethis tool pytest` -- `usethis tool requirements.txt` -- `usethis tool ruff` +- `usethis tool coverage` - Use coverage: a code coverage measurement tool. +- `usethis tool pytest` - Use the pytest testing framework. + +#### Configuration Files + +- `usethis tool pyproject.toml` - Use a pyproject.toml file to configure the project. +- `usethis tool requirements.txt` - Use a requirements.txt file exported from the uv lockfile. Supported options: @@ -234,6 +244,10 @@ Other supported options: Display a table of all available tools and their current usage status. +### `usethis version` + +Display the current version of usethis. + ### `usethis show` Show a piece of information about the project. diff --git a/src/usethis/_app.py b/src/usethis/_app.py index 1777af5..f4ca5b3 100644 --- a/src/usethis/_app.py +++ b/src/usethis/_app.py @@ -26,7 +26,7 @@ app.add_typer(usethis._interface.ci.app, name="ci", rich_help_panel=rich_help_panel) app.add_typer(usethis._interface.tool.app, name="tool", rich_help_panel=rich_help_panel) -rich_help_panel = "Manage Config" +rich_help_panel = "Manage Configuration" app.command(help="Add an author to the project.", rich_help_panel=rich_help_panel)( usethis._interface.author.author, )