CLI tool
lolcommits/lolcommits avatar
lolcommits/lolcommits

lolcommits: a webcam snapshot on every git commit

:camera: git-based selfies for software developers

4,819 stars247 forksRubyLGPL-3.0

At a glance

What is it?
lolcommits is a Ruby gem that fires a webcam capture from a git post-commit hook and files the result under ~/.lolcommits. It is a novelty tool, but the hook plumbing, plugin system and capture flags are worth understanding before you install it.
Who is it for?
Adopt lolcommits if you want a per-commit webcam archive in a personal or small-team repository and you can install Ruby 3.1, ImageMagick and a webcam driver on the machine doing the committing. Do not adopt it on a build server, in a headless container, or anywhere commits are made by automation, because the capture is triggered by the post-commit hook and a missing camera turns every commit into a failed capture.
Can I use it commercially?
Yes, with conditions. LGPL-3.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 16 days ago.
What is it written in?
Mainly Ruby, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 27, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The problem lolcommits solves, and for whom

Git history records what changed and who changed it, but not what the person looked like at the moment of the commit. lolcommits closes that gap by attaching a webcam image to each commit, styled as a caption image in the LOLcat tradition. The README's own framing is that git blame has never been so much fun, and the project is honest about the fact that half the fun is forgetting it is installed. That is the intended user: a developer working on a laptop with a camera, in a repository where a little levity is acceptable.

The secondary audience is people who want a visual log of a long-running personal project. Because captures are stored per repository under ~/.lolcommits, the directory becomes a dated, commit-addressed record of sessions. The project also maintains a wiki page of lolcommits from around the world, so there is a social dimension for people who choose to share. Neither of these is a compliance or audit feature, and nothing in the README presents it as one.

How the post-commit hook, the runner and the plugins fit together

The mechanism is deliberately small. Running lolcommits --enable inside a repository writes a capture command into that repository's .git/hooks/post-commit file. From then on, git itself invokes the hook after each commit, and the hook runs the lolcommits capture path. The README notes that any extra arguments passed to --enable are appended to the hook command, which is how per-repository capture settings are persisted without a config file.

Capture itself is the Ruby process talking to a webcam device and then handing the frame to ImageMagick for composition. The default loltext plugin appends the commit message and sha to the image. Other plugins can post to Twitter, Tumblr or an arbitrary HTTP endpoint, and there is one that translates commit messages into lolspeak. The plugin layer is where most of the extensibility lives: lolcommits --plugins lists what is installed, and lolcommits --config -p loltext opens configuration for the default text plugin, covering layout, font type, size and colour, plus an optional transparent overlay. Output goes to ~/.lolcommits by default, in per-repository folders with short sha filenames, unless LOLCOMMITS_DIR overrides it.

Installing lolcommits and taking a first commit selfie

The gem requires Ruby 3.1 or newer, a webcam, and ImageMagick. ffmpeg is optional and only needed for animated gif or video capture. On macOS, Homebrew installs the image dependency, then the gem itself goes in with RubyGems.

bash
brew install imagemagick
gem install lolcommits

On Debian or Ubuntu the README gives a different dependency list, because the Linux path uses mplayer for capture and needs the MagickWand development headers at build time.

bash
sudo apt-get install mplayer imagemagick libmagickwand-dev
gem install lolcommits

Before enabling anything, confirm the machine can actually see a camera. The README documents this as the way to list attached video devices.

bash
lolcommits --devices

If a device is listed, move into the repository you want to instrument and enable the hook. After this, the next git commit triggers a capture automatically, and images land in ~/.lolcommits.

bash
cd ~/code/my-project
lolcommits --enable

To check what was written, read .git/hooks/post-commit. To turn capture off again for that repository, the README says there is a repository-specific --disable. Common follow-ups are --last to open the most recent image and --browse to open the directory holding the images for the current repository. Capture behaviour can be tuned either through environment variables such as LOLCOMMITS_DELAY, LOLCOMMITS_DEVICE, LOLCOMMITS_FORK and LOLCOMMITS_STEALTH, or through flags appended at enable time, as in the README's animated gif example.

bash
lolcommits --enable --delay 2 --animate 4 --fork

That combination captures a four second animated gif after a two second delay, in a forked process so the commit returns to your terminal quickly. If animated capture feels slow, LOLCOMMITS_FORK=true is the documented mitigation.

Where lolcommits breaks, and when it is the wrong tool

The failure mode is structural: the capture runs inside the commit path. A machine with no camera, a camera already held by another process, or a missing ImageMagick binary means the hook has nothing to work with. The README does not document rollback or a fallback image path, and it does not describe what the hook does when capture fails, so the safe assumption is that a broken capture environment is a per-commit problem rather than a one-time setup error. Because --enable writes into .git/hooks/post-commit, it also collides with any existing post-commit hook you already have. The README is silent on hook chaining, so check that file before enabling in a repository that uses hooks for other purposes.

Platform support is uneven by the project's own admission. The Windows section is headed here be dragons, and the README states that LOLCOMMITS_DEVICE does not apply to non-animated Windows captures. Linux users on Ubuntu 14.04 or newer are told they must install ffmpeg manually because it no longer ships with the base image. Animated gifs are explicitly described as potentially slow depending on capture length and machine capability. None of this makes the tool broken, but it does mean lolcommits is wrong for headless CI runners, containers, remote development boxes without camera passthrough, and any workflow where a commit must never wait on hardware.

How lolcommits differs from screenshot and commit-artifact tools

The closest comparison is a screenshot utility such as scrot or macOS screencapture driven by a git hook. Those capture the screen, not the person, and they are typically wired up by hand: you write the hook, choose the output path, and manage naming yourself. lolcommits ships the hook installation (--enable), the device enumeration (--devices), the per-repository output layout under ~/.lolcommits, and a plugin interface for what happens to the image afterwards. That packaging is the actual product.

The other direction is commit-attached artifacts in general, where a CI job stores a build log or coverage report alongside a sha. Those run after the fact on a server and have no camera. lolcommits runs at commit time on the developer's machine, which is precisely why it can see a webcam and precisely why it cannot run in most CI environments. Choosing between them is a question of whether the artifact belongs to the person or to the build.

Maintenance, upgrades and the LGPL-3.0 licence

The repository is not archived, and the last push was on 2026-09-14. Release history shows v0.18.0 on 2025-02-18, following v0.17.3 and v0.17.2 in January 2025, so the project is still receiving tagged releases, though the README does not describe an upgrade procedure beyond installing a newer gem. Upgrading is therefore a gem install away, but the hook file written by a previous --enable is not automatically rewritten by that, and the README does not document a migration step for it. If you have customised .git/hooks/post-commit by hand, re-running --enable is the only documented way to regenerate it, and the README does not say whether that preserves existing content.

lolcommits is licensed under LGPL-3.0. That matters most if you link against or modify the library and distribute the result; the gem is normally invoked as a command-line tool, which is a different situation from embedding it. The repository also contains a .quickhook directory and a vendor directory, which suggests vendored dependencies, so anyone redistributing a modified copy should read the licence text in LICENSE rather than rely on a summary. This is a description of what the licence identifier says, not legal advice.

Editorial conclusion

Adopt lolcommits if you want a per-commit webcam archive in a personal or small-team repository and you can install Ruby 3.1, ImageMagick and a webcam driver on the machine doing the committing. Do not adopt it on a build server, in a headless container, or anywhere commits are made by automation, because the capture is triggered by the post-commit hook and a missing camera turns every commit into a failed capture. Before enabling it, run lolcommits --devices to confirm the camera is visible, then check .git/hooks/post-commit after lolcommits --enable to see exactly what command was written, since any extra arguments you pass to --enable are appended to that hook.

Frequently asked questions

What does lolcommits do on every git commit?

Once you run lolcommits --enable inside a repository, the tool writes a capture command into .git/hooks/post-commit, so each commit triggers a webcam snapshot that is archived under ~/.lolcommits in per-repository folders with short sha filenames.

What do I need installed before I can use lolcommits?

The README lists Ruby 3.1 or newer, a webcam, and ImageMagick as requirements, with ffmpeg optional and only needed for animated gif or video capture. On macOS the documented path is brew install imagemagick followed by gem install lolcommits.

How do I turn lolcommits off for a single repository?

The README states that --enable has a repository-specific counterpart called --disable, which removes the capture behaviour for that repository. The README does not document whether --disable restores a pre-existing post-commit hook.

Can lolcommits capture video or animated gifs instead of a still image?

Yes. Use the -v {seconds} option or the LOLCOMMITS_VIDEO environment variable for mp4 video, and -a {seconds} or LOLCOMMITS_ANIMATE for an animated gif; both require ffmpeg. The README notes that if both are set, the video duration takes precedence and is applied to both captures.

Where are lolcommits images stored on disk?

By default they go to ~/.lolcommits, organised into folders for each git repository, with filenames based on the short sha. The README documents LOLCOMMITS_DIR as the way to change the output directory used for all repositories.

Official sources

  1. License: LGPL-3.0
  2. lolcommits/lolcommits on GitHub
  3. Project website
  4. README
  5. Releases
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/lolcommits-lolcommits.svg)](https://hysenlabs.com/projects/lolcommits-lolcommits)
Community notes

Community notes