Skip to content

Move CLI docs to top-level section - #27017

Open
Joosboy wants to merge 2 commits into
astral-sh:mainfrom
Joosboy:docs/17020-cli-docs-location
Open

Move CLI docs to top-level section#27017
Joosboy wants to merge 2 commits into
astral-sh:mainfrom
Joosboy:docs/17020-cli-docs-location

Conversation

@Joosboy

@Joosboy Joosboy commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Resolves #17020. The CLI docs were previously nested under 'Configuring Ruff', which was confusing. This PR moves the CLI docs to a top-level section 'Command-line Interface' by generating a separate cli.md file.

Also resolves #13444 by adding the ruff analyze command to the generated CLI help.

@ntBre ntBre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me at a high level, but I think there are a few more things to do. First of all, there are some merge conflicts, I believe from #26803. We need to make sure not to drop the new argfile docs. We also need to check for references to configuration#... that no longer exist. Anything that links to a subsection of the CLI reference has to be updated.

I'm not sure how easy this will be, so it might be okay as-is for a first iteration, but I think ideally we would actually document what analyze graph does rather than the analyze subcommand itself. It kind of makes sense to me to separate that into its own PR and focus on splitting out the CLI help here first.

Comment thread docs/cli.md
Comment on lines +1 to +14
# Command-line interface

Some configuration options can be provided or overridden via dedicated flags on the command line.
This includes those related to rule enablement and disablement,
file discovery, logging level, and more:

```console
$ ruff check path/to/code/ --select F401 --select F403 --quiet
```

All other configuration options can be set via the command line
using the `--config` flag, detailed below.

### The `--config` CLI flag

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that Command-line interface is the top-level heading, I think these should become ## instead of ###.

@ntBre ntBre added the documentation Improvements or additions to documentation label Jul 22, 2026
@ntBre ntBre changed the title Docs: Move CLI docs to top-level section Move CLI docs to top-level section Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI docs should not be nested under "Configuring Ruff" document what the analyze command does

2 participants