whatisgithub

What is listen?

rubys/listen — explained in plain English

Analysis updated 2026-07-16 · repo last pushed 2015-06-29

RubyAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A Ruby tool that watches your folders and tells your program when files are added, changed, or deleted. It powers live-reloading features so browsers refresh and tests re-run automatically when you save.

Mindmap

mindmap
  root((repo))
    What it does
      Watches folders
      Detects file changes
      Reports to your script
    How it works
      OS features on Mac
      OS features on Linux
      Polling fallback
    Use cases
      Live browser reload
      Auto re-run tests
      Auto compile stylesheets
    Tech stack
      Ruby
    Audience
      Developer tools
      Web developers
      Data teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically refresh your browser when you save a source file during development.

USE CASE 2

Re-run your test suite instantly every time a file changes, without manual commands.

USE CASE 3

Automatically compile stylesheets the moment you save a design file.

USE CASE 4

Trigger a data processing script as soon as a new CSV file lands in a watched folder.

What is it built with?

Ruby

How does it compare?

rubys/listen100rabhg/masterdetailapp100rabhg/pizzafactroy
LanguageRubyRubyRuby
Last pushed2015-06-292024-02-202025-01-26
MaintenanceDormantDormantStale
Setup difficultyeasymoderatemoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperpm founder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Just add the gem to your Ruby project and write a short callback script to start watching directories.

No license information was provided in the explanation, so it is unclear what permissions you have for using or modifying this software.

So what is it?

Listen is a tool for Ruby that watches your folders for changes and tells your program whenever a file is added, modified, or deleted. This is what powers live-reloading tools, when you save a file, your browser automatically refreshes or your tests instantly re-run, saving you from manually switching windows and hitting refresh all day. At a high level, you point the tool at one or more directories and provide a short script, a "callback", that says what to do when a change happens. It then sits quietly in the background. When it notices a file change, it hands your script a list of exactly which files were modified, added, or removed. You can also fine-tune what it watches, telling it to ignore certain file types (like temporary logs) or to only track specific files (like your source code). Under the hood, it uses fast, built-in operating system features on Mac and Linux to get instant notifications with minimal performance impact. On other setups or certain network drives, it falls back to "polling", repeatedly checking the files for changes, which is slower but works everywhere. The project is currently looking for new maintainers to take over its ongoing development. A wide range of people use this, mostly behind the scenes. If you are building a developer tool, a static website generator, or an automated testing suite, you need a reliable way to trigger actions when files change. For example, a web developer might use it to automatically compile fresh stylesheets the moment they save a design file, or a data team might use it to trigger a data processing script the second a new CSV lands in a directory.

Copy-paste prompts

Prompt 1
Using the Listen gem in Ruby, write a script that watches my project directory and automatically runs my RSpec tests whenever a file changes, ignoring temporary log files.
Prompt 2
Set up Listen to monitor my stylesheets folder and trigger a Sass compilation step whenever a file is saved, so my CSS is always up to date.
Prompt 3
Create a Ruby script using Listen that watches a directory for incoming CSV files and prints the name of each new file added, using the polling fallback so it works on network drives.
Prompt 4
Configure Listen to watch multiple source folders but ignore all files ending in .log.tmp, and .swp, printing a list of modified, added, and removed files on each change event.

Frequently asked questions

What is listen?

A Ruby tool that watches your folders and tells your program when files are added, changed, or deleted. It powers live-reloading features so browsers refresh and tests re-run automatically when you save.

What language is listen written in?

Mainly Ruby. The stack also includes Ruby.

Is listen actively maintained?

Dormant — no commits in 2+ years (last push 2015-06-29).

What license does listen use?

No license information was provided in the explanation, so it is unclear what permissions you have for using or modifying this software.

How hard is listen to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is listen for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.