Open sourcing Licensebat
Tags: rust, opensource, license, compliance
Published: 2022-01-04 22:02:47

---
title: Open sourcing Licensebat
published: true
date: 2022-01-03 23:00:00 UTC
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40lr4qguoeumo1bgte8s.jpg
tags: Rust, OSS, license, compliance
canonical_url: https://robertohuertas.com/2022/01/04/licensebat-open-source/
---

Learn why I decided to open source [Licensebat](https://licensebat.com), the software that easily helps you manage the licenses of your project's dependencies.

## What’s Licensebat?

The idea is pretty simple, it’s just a tool written in [Rust](https://rust-lang.org) that **scans the dependencies** of your project and **generates a report** of the different licenses that are used.

Initially, it was only a **SaaS** product running in the [GitHub Marketplace](https://github.com/marketplace/licensebat) with several pricing tiers. One of them being a [free tier](https://github.com/marketplace/licensebat/plan/MLP_kgDNGqc#pricing-and-setup) without any limitations for OSS projects and a few free requests per month for commercial projects.

After some months, though, I decided to open source [Licensebat](https://licenseba.com) and release it as a **FOSS** project.

## Why?

Although [Licensebat](https://licenseba.com) as a SaaS product has access to the code hosted in [GitHub](https://github.com) it only accesses the code through the [GitHub API](https://developer.github.com/v3/). This allows us to keep the **code private** and only access the dependency manifest files, like `package-lock.json`, `Cargo.lock` or `pubspec.yaml`.

Anyway, some companies had some **legit concerns** about their code being potentially exposed to a third party service. It was clear to me that I’d need some other way for these customers to be able to get the service [Licensebat](https://licensebat.com) was providing without exposing their code at all.

## Licensebat CLI

The idea of having some sort of _binary/container/executable_ that could be used by these companies in their CI/CD pipelines immediately came up. But then, anyway, if this binary was not open source, if they couldn’t compile it themselves, how would they be sure that it was completely safe to use? How would they know that it was not scanning the code under the hood?

That’s when I decided to **open source** not only the [CLI](https://crates.io/crates/licensebat-cli) but also [all the crates](https://crates.io/search?q=licensebat) that are used in order to give support for some programming languages, which at the time I’m writing this are:

- [JavaScript / TypeScript](https://crates.io/crates/licensebat-js)
- [Dart](https://crates.io/crates/licensebat-dart)
- [Rust](https://crates.io/crates/licensebat-rust)

The thought was that the community would eventually be able to **use and evolve** all these crates and **support many more languages** in the long term.

## What about the SaaS?

You may be wondering what’s the value of the SaaS service in this context where any company could just download the CLI and use it for free. And you’re totally right.

To be honest, I’m not completely sure about this, but I think there will still be companies willing to use Licensebat as a GitHub integrated service.

I have plans to extend that service even further by optimizing the dependency resolution and the license scanning process, and providing more value by adding features such as a history of the licenses that have been scanned, and a way to share the results with other people.

Will it work? Who knows! :grin:

In any case, I’m happy to be able to open source [Licensebat](https://licensebat.com) and hope that it will be useful to other people. That’s what matters to me more.

## Other conveniences

There are other cool things associated to the fact that this CLI is open source. The obvious one is that we can now leverage the fact that we can access the whole codebase without any concerns.

This means that, for some languages, we can find more convenient and optimized ways to access to the dependencies’ license information, speeding up the process.

## Conclusion

If you want to give it a try or are just curious about the code, you can find it [here, hosted in GitHub](https://github.com/licensebat/licensebat).

It would be great to have you as a contributor!