Skip to content

Conversation

@Ahmed-AdelB
Copy link

@Ahmed-AdelB Ahmed-AdelB commented Jan 1, 2026

Summary

This PR adds documentation for the SHELL_VERBOSITY environment variable as requested in #7601.

Changes

Added a note to the Global Options section in docs/cli.md that:

  • Explains SHELL_VERBOSITY as an alternative to -v/-vv/-vvv flags
  • Provides a table showing verbosity levels and their command-line equivalents
  • Includes an example usage for CI/CD pipelines

Context

From the issue discussion, @Secrus (maintainer) confirmed:

There is SHELL_VERBOSITY flag that sets up the verbosity level. It should probably be added to docs somewhere.

This feature is inherited from the Cleo library and is particularly useful in environments like dh-poetry where command-line invocation is outside user control.

Closes #7601


Ahmed Adel Bakr Alderai

Summary by Sourcery

Documentation:

  • Add CLI documentation explaining the SHELL_VERBOSITY environment variable, its mapping to verbosity flags, and example usage for scripts and CI/CD pipelines.

Add documentation explaining how to set verbosity level using the
SHELL_VERBOSITY environment variable. This is useful in CI/CD pipelines
or scripts where command-line arguments cannot be easily modified.

The note includes:
- Table showing verbosity levels and their equivalents
- Example usage for setting debug output

Closes python-poetry#7601

---
Ahmed Adel Bakr Alderai
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 1, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Documents the SHELL_VERBOSITY environment variable as an alternative way to control CLI verbosity, including mapping values to existing verbosity flags and providing an example for CI/CD usage.

Flow diagram for choosing verbosity configuration method

flowchart TD
  A[Need_to_change_Poetry_CLI_verbosity] --> B{Can_you_modify_command_line_arguments?}
  B -->|Yes| C[Use_-q_-v_-vv_-vvv_flags]
  C --> D[Run_poetry_command]
  B -->|No| E[Set_SHELL_VERBOSITY_environment_variable]
  E --> F{Desired_verbosity_level}
  F -->|Quiet| G[Set_SHELL_VERBOSITY_to_-1_equivalent_to_-q]
  F -->|Normal| H[Set_SHELL_VERBOSITY_to_0_default]
  F -->|Verbose| I[Set_SHELL_VERBOSITY_to_1_equivalent_to_-v]
  F -->|More_verbose| J[Set_SHELL_VERBOSITY_to_2_equivalent_to_-vv]
  F -->|Debug| K[Set_SHELL_VERBOSITY_to_3_equivalent_to_-vvv]
  G --> L[Run_poetry_command_without_flags]
  H --> L
  I --> L
  J --> L
  K --> L
  D --> M[Observe_output_at_selected_verbosity]
  L --> M
Loading

File-Level Changes

Change Details Files
Add documentation note describing SHELL_VERBOSITY as an alternative to verbosity flags, including level mapping and CI/CD example.
  • Insert a Hugo-style note block under the Global Options section explaining that verbosity can be configured via the SHELL_VERBOSITY environment variable.
  • Add a markdown table mapping SHELL_VERBOSITY numeric values (-1 to 3) to their corresponding CLI verbosity flags and behavior descriptions.
  • Include a shell snippet demonstrating setting SHELL_VERBOSITY=3 in a CI or scripted context before running a poetry command.
docs/cli.md

Assessment against linked issues

Issue Objective Addressed Explanation
#7601 Document in the official CLI documentation that log verbosity can be configured via an environment variable (SHELL_VERBOSITY), including how its values map to existing verbosity flags.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@radoering radoering added the impact/docs Contains or requires documentation changes label Jan 2, 2026
@github-actions
Copy link

github-actions bot commented Jan 2, 2026

Deploy preview for website ready!

✅ Preview
https://website-dpletof7z-python-poetry.vercel.app

Built with commit 7a0163f.
This pull request is being automatically deployed with vercel-action

Comment on lines +37 to +41
For example, to enable debug output:
```bash
export SHELL_VERBOSITY=3
poetry install
```
Copy link
Member

Choose a reason for hiding this comment

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

I think I would omit the example because in this case you can just use command-line arguments and I hope people who cannot use command-line arguments are able to figure out for themselves how to set an environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/docs Contains or requires documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document ability to set verbosity level through environment variable

2 participants