Meet RedCoffee : A Python CLI to export SonarQube analysis as shareable PDF Reports

Like many developers, I’ve worked extensively with SonarQube to track code quality, technical debt, code duplication, and security issues. Now, let’s be honest — SonarQube may not be the best tool out there for all use cases, but it continues to be the default choice for most organizations, especially in larger setups. Even early-stage startups I’ve worked with tend to integrate SonarQube pretty early in their pipelines. Tools like Snyk are gaining traction too, but I haven’t had the chance to work with it personally yet. One of the big advantages of SonarQube is that it’s open source — that’s a huge win, especially for smaller teams and startups. Most folks I know (myself included) tend to stick with the Community Edition, and while it covers the basics well, it suffers from one major drawback: there’s no easy way to share the analysis reports. Everyone has to log into the dashboard just to view results. That might sound manageable, but in practice — especially when you're using SonarQube via Docker (as most devs and early-stage startups do) — it becomes a hassle. And if you’re working in a tightly controlled environment like a bank (where I currently am), it gets even messier. Even something as simple as sharing a report with someone outside your immediate team turns into a process — screenshots, explanations, and still, it rarely tells the full story. And friends, that is why I exactly built RedCoffee. My Motivation behind building RedCoffee In the summer of 2023, I was working on a personal project with a few friends. It wasn’t meant to be a startup or anything commercially big — we were building it purely to learn, experiment, and have fun. But even then, we wanted it to be something people would look at and say, “Hey, this is really well written.” That’s when we decided to bring in SonarQube to keep our code quality in check. Since we were bootstrapping everything and funds were tight, we went with the Community Edition, running it locally via Docker — probably the most common setup for devs in our shoes. And sure enough, we hit the exact problems I mentioned earlier — no easy way to share reports, limited visibility, and a clunky experience for anyone outside the team. That’s what motivated me to build RedCoffee. Well, then what exactly is RedCoffee? If you’ve been following along so far, I hope the picture is clear. And if you’ve just jumped into this section — here’s the TL;DR: RedCoffee is a Python-based CLI tool that generates clean, shareable PDF reports from SonarQube Community Edition. No fancy setup. No manual exports. Just run a single command — and boom, your PDF report is ready to share with your teammates, tech leads, or anyone who needs visibility into your code quality. Nice, is there a Pre-Requisite for it ? Before you jump in, there are just two simple things you'll need: Completed Code Analysis Make sure the project has already been scanned and analyzed on SonarQube. RedCoffee fetches data from an existing analysis — it doesn’t trigger the scan itself. SonarQube Token (User Token) You’ll need access to a valid SonarQube user token — typically the one that starts with squ_. This is used to authenticate and fetch the analysis data. How to install RedCoffee ? RedCoffee is available to be installed via PyPi. If you already have Python up and running on your system, you can just go and type in the below command pip install redcoffee This will download RedCoffee ( and it's dependencies ) and make it available to be used in your local setup. Awesome, but how to use RedCoffee? As mentioned earlier, RedCoffee is a command-line tool. This means it exposes a set of simple commands that you can run directly from your terminal to generate PDF reports from your SonarQube analysis. Pasting the sample command for your reference below redcoffee generatepdf --host=http://localhost:9000 --project=my_project --path=./sonar-report.pdf --token=abcdef1234567890 Below is the brief explaination of the available flags Flag Required? Description --host Yes The URL of your SonarQube server. --project Yes The project key in SonarQube for which the PDF report should be generated. --path Yes File path where the generated PDF report will be saved. As of now, you will be needed to explicitly mention the name of the file as well. So, it can be something like Desktop/SonarQubeReport.pdf --token Yes Your SonarQube authentication token with API access permissions. Please note that this should begin with 'squ'. No other tokens are currently supported. Is there an extensive documentation that can be referred? Yes, I have already made the documentation available via Github Pages. Please feel free to refer the same RedCoffee Documentation on Github Pages Do you have a sample of the generated report? I've generated one report and uploaded it to S3 so that it is accessible for everyone. Here's the link for the same - RedCoffee Sample Report uploaded on S3 Is RedCoffee

Apr 12, 2025 - 09:17
 0
Meet RedCoffee : A Python CLI to export SonarQube analysis as shareable PDF Reports

Like many developers, I’ve worked extensively with SonarQube to track code quality, technical debt, code duplication, and security issues. Now, let’s be honest — SonarQube may not be the best tool out there for all use cases, but it continues to be the default choice for most organizations, especially in larger setups. Even early-stage startups I’ve worked with tend to integrate SonarQube pretty early in their pipelines. Tools like Snyk are gaining traction too, but I haven’t had the chance to work with it personally yet.

One of the big advantages of SonarQube is that it’s open source — that’s a huge win, especially for smaller teams and startups. Most folks I know (myself included) tend to stick with the Community Edition, and while it covers the basics well, it suffers from one major drawback: there’s no easy way to share the analysis reports.

Everyone has to log into the dashboard just to view results. That might sound manageable, but in practice — especially when you're using SonarQube via Docker (as most devs and early-stage startups do) — it becomes a hassle. And if you’re working in a tightly controlled environment like a bank (where I currently am), it gets even messier. Even something as simple as sharing a report with someone outside your immediate team turns into a process — screenshots, explanations, and still, it rarely tells the full story.

And friends, that is why I exactly built RedCoffee.

My Motivation behind building RedCoffee

In the summer of 2023, I was working on a personal project with a few friends. It wasn’t meant to be a startup or anything commercially big — we were building it purely to learn, experiment, and have fun. But even then, we wanted it to be something people would look at and say, “Hey, this is really well written.”

That’s when we decided to bring in SonarQube to keep our code quality in check. Since we were bootstrapping everything and funds were tight, we went with the Community Edition, running it locally via Docker — probably the most common setup for devs in our shoes.

And sure enough, we hit the exact problems I mentioned earlier — no easy way to share reports, limited visibility, and a clunky experience for anyone outside the team. That’s what motivated me to build RedCoffee.

Well, then what exactly is RedCoffee?

If you’ve been following along so far, I hope the picture is clear. And if you’ve just jumped into this section — here’s the TL;DR:

RedCoffee is a Python-based CLI tool that generates clean, shareable PDF reports from SonarQube Community Edition.

No fancy setup. No manual exports.
Just run a single command — and boom, your PDF report is ready to share with your teammates, tech leads, or anyone who needs visibility into your code quality.

Nice, is there a Pre-Requisite for it ?

Before you jump in, there are just two simple things you'll need:

  • Completed Code Analysis

Make sure the project has already been scanned and analyzed on SonarQube. RedCoffee fetches data from an existing analysis — it doesn’t trigger the scan itself.

  • SonarQube Token (User Token)

You’ll need access to a valid SonarQube user token — typically the one that starts with squ_. This is used to authenticate and fetch the analysis data.

How to install RedCoffee ?

RedCoffee is available to be installed via PyPi. If you already have Python up and running on your system, you can just go and type in the below command

pip install redcoffee

This will download RedCoffee ( and it's dependencies ) and make it available to be used in your local setup.

Awesome, but how to use RedCoffee?

As mentioned earlier, RedCoffee is a command-line tool. This means it exposes a set of simple commands that you can run directly from your terminal to generate PDF reports from your SonarQube analysis.

Pasting the sample command for your reference below

redcoffee generatepdf --host=http://localhost:9000 --project=my_project --path=./sonar-report.pdf --token=abcdef1234567890

Below is the brief explaination of the available flags

Flag Required? Description
--host Yes The URL of your SonarQube server.
--project Yes The project key in SonarQube for which the PDF report should be generated.
--path Yes File path where the generated PDF report will be saved. As of now, you will be needed to explicitly mention the name of the file as well. So, it can be something like Desktop/SonarQubeReport.pdf
--token Yes Your SonarQube authentication token with API access permissions. Please note that this should begin with 'squ'. No other tokens are currently supported.

RedCoffee GIF

Is there an extensive documentation that can be referred?

Yes, I have already made the documentation available via Github Pages. Please feel free to refer the same RedCoffee Documentation on Github Pages

Do you have a sample of the generated report?

I've generated one report and uploaded it to S3 so that it is accessible for everyone. Here's the link for the same - RedCoffee Sample Report uploaded on S3

Is RedCoffee open-source?

Yes, RedCoffee is completely open source and available for anyone to use, modify, or contribute to. It’s licensed under the MIT License, which means you can use it freely in personal and commercial projects without restrictions.

The source code is available on GitHub: RedCoffee on Github

You can also explore RedCoffee on PyPi

Feel free to explore, star the repo, or raise an issue if you have feedback or suggestions.

Support the Project on Github

If RedCoffee helped you or solved a pain point you’ve faced with SonarQube, I’d really appreciate it if you could star the repository on GitHub. It’s a small gesture that goes a long way in supporting open source work and helps others discover the project too.

You can find the repo here: RedCoffee on Github

Thanks for reading — and as always, feedback is welcome!