---
dateModified: '2016-04-07 17:55'
datePublished: '2016-04-07 17:55'
disqusIdentifier: '10'
excerpt: 'Learn how to automate your project dependencies with greenkeeper and github. Get automatically a pull request when a dependency gets updated.'
image: 'https://res.cloudinary.com/carloscuesta/image/upload/v1593531856/blog-featured-images/Automating_Dependencies_Greenkeeper.png'
title: 'Automating dependencies with greenkeeper'
---

I discovered [greenkeeper.io](http://greenkeeper.io) at the **NodeConf Barcelona 2015**, when [Stephan Bönnemann](http://boennemann.me) made a little demo of the project to show what was all about.

Basically what **greenkeeper** does is sit between _npm_ and _github_, **observing all of your dependencies**. When they get **updated**, your project gets a **pull request** with that update. The CI tests kicks in, and Greenkeeper watches them to see whether they pass or not.

At time of writing this post, I'm using greenkeeper in my opensource projects, and it's really awesome, handy and easy to use.

### Getting Started

As I said the main reason for using greenkeeper is to **stay up to date** with the dependencies, **know** the **changes and fixes** introduced in every **release** and see if they break your **build**.

```shell
$ npm i -g greenkeeper
$ greenkeeper login
```

After installing and login, you will have to enable greenkeeper for each repository you want to.

```shell
$ cd github/repo
$ greenkeeper enable
```

### Automated Pull Requests

Now, you will receive [pull requests](https://github.com/carloscuesta/carloscuesta.me/pull/7) from the **greenkeeperio-bot** that will look like [this](https://github.com/carloscuesta/carloscuesta.me/pull/7)

![greenkeeper pull requests](https://res.cloudinary.com/carloscuesta/image/upload/v1460042483/exmcofmkxt427z8gkt9k.png)

![greenkeeper pull request](https://res.cloudinary.com/carloscuesta/image/upload/v1460043221/pa5bjbnfakjo4fgcfnbu.png)

Greenkeeper is **free for open source** projects. Learn more about **greenkeeper** at [greenkeeper.io](https://greenkeeper.io/).
