Skip to content
📷 git-based selfies for software developers
Branch: master
Clone or download
matthutchinson Merge pull request #384 from mroth/authors
Give credit where credit is due
Latest commit 59718e8 Jan 5, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin appease latest rubocop errors Jan 1, 2019
lib appease latest rubocop errors Jan 1, 2019
test fixup Rubocop issues Aug 14, 2018
.editorconfig add editorconfig and gitattributes to add contributions Feb 10, 2014
.gitattributes add editorconfig and gitattributes to add contributions Feb 10, 2014
.gitignore adding vendor/bundle to gitignore Sep 10, 2014
.rubocop_todo.yml use gem names for plugins, pass config to plugins Dec 24, 2017
.travis.yml remove EOL ruby 2.2.10 (bundler no longer supports this) Jan 5, 2019 bump gem version, release 0.12.1 Mar 27, 2018 update maintainer link May 24, 2018
Gemfile remote pry-remote Feb 2, 2018
LICENSE add PR template May 21, 2018


git-based selfies for software developers

lolcommits takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image with it. Git blame has never been so much fun.

By default, the lol images are stored by a Github style short SHA in a ~/.lolcommits directory created for you.

Gem Version Build Status Depfu Maintainability Test Coverage


Originally created by @mroth in 2011 as a joke project for Hack && Tell, lolcommits has grown considerably since then, and is now primarily maintained by @matthutchinson.

Thank you to all of the contributors throughout the years!

Sample images

Please add your own lolcommit to the People Using Lolcommits page on our wiki!




You'll need ImageMagick installed. Homebrew makes this easy.

brew install imagemagick

Then install with:

[sudo] gem install lolcommits

If you're using RVM (or rbenv), you can/should probably omit the sudo, but the default macOS Ruby install usually requires it.

Lolcommits v0.8.1 was the last release to support Ruby < 2.0. If you'd like to use older Rubies try:

[sudo] gem install lolcommits --version 0.8.1   # for Ruby 1.9
[sudo] gem install lolcommits --version 0.7.0   # for Ruby 1.8


Install these dependencies using your package manager of choice, for example in Ubuntu:

sudo apt-get install mplayer imagemagick libmagickwand-dev

For Ubuntu 14.04 or newer, you need to manually install ffmpeg since it no longer ships with the default Ubuntu sources (downloads here).

Then install with:

gem install lolcommits

For more details, see Installing on Linux.

Windows - here be dragons!

It works, but you'll need some more detailed instructions to get the dependencies installed. See the wiki page for Installing on Windows.


Enabling and basic usage

Within any git repository, simply run lolcommits --enable. From that point on, any git commit will automatically trigger a lolcommit capture! By default, all lolcommits are stored in ~/.lolcommits and placed in a subdirectory by project name, with a filename matching the commit hash.

Follow these steps to enable lolcommits across all your repos; using git init and the init.templatedir setting.

Don't worry about it too much, half the fun of lolcommits is forgetting it's installed!

Other commands

OK, if you insist... Since you know about --enable, common sense suggests there is also a repository specific --disable, hopefully you can guess what that does.

Other handy common commands include --last, which will open for display your most recent lolcommit, or --browse, which pops open the directory containing all the lolcommit images for your current repository. You can always do --help for a full list of available commands.

NOTE: Any extra arguments you pass with --enable are appended to the git post-hook capture command. For example;

lolcommits --enable --delay 5 --animate 4 --fork

Will configure capturing of an animated gif (4 secs) after a 5 sec delay in a forked process. See the section below for more capture configuration options.

Capture configuration options

lolcommits has some capture options for additional lulz. You can enable these via environment variables like so;

  • LOLCOMMITS_DEVICE set a webcam device - except windows (non-animated) captures
  • LOLCOMMITS_ANIMATE (in seconds) set time for capturing an animated gif - requires ffmpeg
  • LOLCOMMITS_DELAY (in seconds) set delay time before capturing (for slow webcams to warmup)
  • LOLCOMMITS_FORK fork lolcommit runner (capture command forks to a new process, speedily returning you to your terminal)
  • LOLCOMMITS_STEALTH disable all notification messages when capturing
  • LOLCOMMITS_DIR set the output directory used for all repositories (defaults to ~/.lolcommits)
  • LOLCOMMITS_CAPTURE_DISABLED disables lolcommit capturing in the commit hook (when set as 'true')

Or they can be set with arguments to the capture command (located in your repository's .git/hooks/post-commit file).

  • --device {name} or -d {name}
  • --animate {seconds} or -a {seconds}
  • --delay {seconds} or -w {seconds}
  • --fork
  • --stealth

Use lolcommits --devices to list all attached video devices available for capturing.

You can configure lolcommit text positions, font styles (type, size, color etc.) or add a transparent overlay to your images. Simply configure the default loltext plugin with this command:

lolcommits --config -p loltext

To find out more about styling, read about the loltext options.

Animated Gif Capturing

Animated gifs can take a while to generate (depending on the number of seconds you capture and the capabilities of your machine). ffmpeg is required and can be installed like so;

To enable, just set the LOLCOMMITS_ANIMATE environment variable with the number of seconds to capture. If you find animated capturing takes too long, try setting LOLCOMMITS_FORK=true.

Example animated lolcommit gif


A growing number of plugins are available, allowing you to transform or share your lolcommits with others. The default plugin simply appends your commit message and sha to the captured image. Others can post to Twitter, Tumblr (and other services), or even translate your commit messages to lolspeak. Check them out on our plugins page.

To list all installed plugins use:

lolcommits --plugins

Installed plugins can be easily enabled, configured or disabled with the --config option:

lolcommits --config
# or
lolcommits --config -p loltext

Interested in developing your own plugin? Follow this simple guide at the Lolcommits Sample Plugin README.


Watch your face decay while you program, with an animated timelapse gif!

lolcommits --timelapse
# or for just today's lolcommits
lolcommits --timelapse --period today


Try our trouble-shooting FAQ, or take a read through our wiki. If you think something is broken or missing, please raise a Github issue (and please check if we haven't already addressed it).


The program is available as open source under the terms of LGPL-3.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.