Skip to content

Add Screenshot workflow #3081

Description

@Rowlando13

In a few places in the docs, it would be really nice to be able to run some code take a screen shot, and draw boxes around different parts. For example setup an example click app with multiple sub commands, options, epilog help, and arguments and then draw boxes and label the various blocks. Requirements:

  • run locally for doc generation (actually locally not calling out to api)
  • run in ci job (not calling out to external service)
  • No added dependencies that are not pip installable
  • have the screen shots not be blurry (common problem)
  • draw boxes around various sections.

Conduct some research and propose some options. A maintainer will pick from the options. and you can implement it. Here is an example of what I was thinking is in the comments below.

Activity

  1. davidism commented on Sep 22, 2025

    @davidism
    Member

    I'm not clear why we need screenshots for this? Code and CLI invocations are entirely text based. This would add a huge amount of complexity to our docs builds.

    If you want to call out certain lines in a block of text, you can do that with Sphinx already: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-option-code-block-emphasize-lines

  2. Rowlando13 commented on Sep 23, 2025

    @Rowlando13
    MemberAuthor

    It's definitely not a need. More of it would be very nice. See the attached screenshot. The best way I can think to give an overview for a help page if you are unfamiliar with command line help pages would be to show a lot on a help page and box and label it. Gives a very nice overview. image

  3. Rowlando13 commented on Sep 23, 2025

    @Rowlando13
    MemberAuthor

    There are a few other places, I had in mind to use it.

  4. Rowlando13 commented on Sep 23, 2025

    @Rowlando13
    MemberAuthor

    I was planning on looking at the options and seeing. An option might be nothing is worth it.

  5. kdeldycke commented on Sep 23, 2025

    @kdeldycke
    Collaborator
    • draw boxes around various sections.

    I guess you want to do what @janluke did to highlight the different parts of the help screen in Cloup:

    Image

    Source: https://cloup.readthedocs.io/en/stable/pages/formatting.html#themes

  6. Rowlando13 commented on Sep 23, 2025

    @Rowlando13
    MemberAuthor

    Yes. I have never seen this, but I was thinking this exactly.

  7. davidism commented on Sep 23, 2025

    @davidism
    Member

    Another requirement: This must not pull in any external dependencies/build dependencies. Users and contributors need to be able to build the docs without more overhead.

    The easiest way here is to take a screenshot and edit it.

  8. Rowlando13 commented on Sep 23, 2025

    @Rowlando13
    MemberAuthor

    I assume fine as long as pip installable?

  9. davidism commented on Sep 23, 2025

    @davidism
    Member

    As long as it's pip installable without requiring external things like imagemagick being installed on the system.

  10. ThiefMaster commented on Feb 25, 2026

    @ThiefMaster
    Member

    @pdonizete It looks like you used some (broken) LLM to generate this comment considering the raw \n linebreaks in there that a human would not write... We are not interested in AI-generated contributions. So if you wish to use LLMs for this, please find another project to contribute to.

  11. saxenanurag commented on May 18, 2026

    @saxenanurag

    I am taking this.

  12. 1 remaining item

  13. deleted a comment from pdonizete on May 18, 2026
  14. deleted a comment from pdonizete on May 18, 2026
  15. saxenanurag commented on May 18, 2026

    @saxenanurag

    Drafted PR: #3472

  16. saxenanurag commented on May 18, 2026

    @saxenanurag

    I will add the annotated screenshot to the PR as well.

  17. Rowlando13 commented on May 19, 2026

    @Rowlando13
    MemberAuthor

    In talking with @saxenanurag, best to just manually annotate a screen shot nicely.

  18. kdeldycke commented on Jun 27, 2026

    @kdeldycke
    Collaborator

    @Rowlando13 I made an inventory of CLI screenshot solutions in https://kdeldycke.github.io/click-extra/screenshots.html . I did not settled on one yet but will test drive them in the next few months.

  19. Rowlando13 commented on Jul 10, 2026

    @Rowlando13
    MemberAuthor

    Nice!

  20. deleted a comment from amahacker001 on Jul 24, 2026
  21. kdeldycke commented on Aug 31, 2026

    @kdeldycke
    Collaborator

    I went the extra mile and you can now produce SVG screenshots of CLIs with Click Extra with a one-liner. No need to install it thanks to uvx.

    Here is an example of calling flask and rendering a simulation of its invocation in a macOS-like terminal and highlighted lines:

    $ uvx --with flask click-extra screenshot --output flask-help.svg --preset macos --emphasize-lines 2,10,24 --wrap -- flask --help
    

    Which renders to:

    Image
  22. Rowlando13 commented on Aug 31, 2026

    @Rowlando13
    MemberAuthor

    That is cool! I only planned to add a few screenshots for help pages, but I was concerned about increasing the package size. SVG could fix that.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsUpdates to documentation, readme, docstrings, typos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions