How to gain traffic for your open-source library
Tags: opensource, tutorial
Published: 2019-09-12 12:51:01

---
title: How to gain traffic for your open-source library
published: true
description: In this post I will describe you a process in how you can get traffic for your open-source libraries.
tags: open-source, tutorial
cover_image:
---

In this post I will describe you a process in how you can get traffic for your open-source libraries.

## Introduction

I made my first open-source library that I knew can be useful for other people too. So I created an npm-package, but it didn't find a lot of traffic. It was until I got my very first random GitHub star that motivated me to spread the word about the package I built. The following steps will describe the process I took to grow the weekly download count to 600+ and GitHub stars to 80+.

## Create & Publish the package
The first thing you'll have to do is create a reusable package of your library and publish it to the public registry of the ecosystem your package belongs to.
Here's a quick overview of some of the more popular registries.

| language | registry  |
|---|---|
| JavaScript  | [npm](//npmjs.com)  |
| .NET | [NuGet](https://www.nuget.org/)  |
| Ruby  | [Rubygems](https://rubygems.org)  |
| Python | [pip / PyPi](https://pypi.org/) |


If your language is not listed don't worry, there's probably a public registry too. You'll probably find it with a quick google search: `{language} package registry`. 


## Good README and documentation
Add a good README to your repository, so other developers can quickly get started using your library.
A good README should include at the minimum:

- What the package is about
- How to install the package
- A sample how to use the package
- How to customize the package

If your package is for the UI, you should also include a visual demo.
This can be just an Image/Gif or even a full documentation site dedicated to it.

For the documentation you can quickly get started with static site generators and host them for free on GitHub pages.
GitHub has a nice [article](https://help.github.com/en/articles/configuring-a-publishing-source-for-github-pages) of the process.


## Post in related forums
Find forums related to your library. You could just submit the link to your repository or write a full blog post about what problems the library solves. Examples for such forums can be:
- reddit
- dev.to
- hackernews
- discord


## Post on social media
Make a post on social media with related hashtags showcasing your library.

## Submit it to a newsletter
If the ecosystem of your library has an official newsletter you can submit it there!
Often times you just have to submit the link to your repository. Again, you could also write a full blog post about it and submit the blog post to the newsletter.

## Look for an awesome list
Awesome lists are lists of awesome tools for a particular ecosystem. There even is an [awesome list of awesome lists](https://github.com/sindresorhus/awesome). Find your list and create a pull-request with your added repository.


## Concluding

The most important thing however about open-source is to provide added value for others. And if you provide added value your package **will** be used.

For the curious here are some stats and a link to my repository.
![Overview of the package download count over a few months](https://thepracticaldev.s3.amazonaws.com/i/np2lq7mrp7fuop0y0f9h.png)
{% github kai-oswald/vue-svg-transition %}