Need help with guard?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

6.0K Stars 501 Forks MIT License 2.4K Commits 66 Opened issues


Guard is a command line tool to easily handle events on file system modifications.

Services available


Need anything else?

Contributors list


IMPORTANT: Please upgrade to Ruby >= 2.4 before installing Guard! To install for older versions, update Bundler at least 1.12:

gem update bundler
and Bundler should correctly resolve to earlier gems for your given Ruby version.

:exclamation: Guard is currently accepting more maintainers. Please read this if you're interested in joining the team.

Gem Version Build Status Code Climate Test Coverage Inline docs Reviewed by Hound

Guard Icon Guard automates various tasks by running custom rules whenever file or directories are modified.

It's frequently used by software developers, web designers, writers and other specialists to avoid mundane, repetitive actions and commands such as "relaunching" tools after changing source files or configurations.

Common use cases include: an IDE replacement, web development tools, designing "smart" and "responsive" build systems/workflows, automating various project tasks and installing/monitoring various system services.

For a full categorized list of known Guard plugins, look here:

If you have any questions about Guard or want to share some information with the Guard community, please go to one of the following places:

Before you file an issue, make sure you have read the known issues and file an issue sections that contains some important information.


  • File system changes handled by our awesome Listen gem.
  • Support for visual system notifications.
  • Huge eco-system with more than 300 Guard plugins.
  • Tested against the latest Ruby 2.4.x, 2.5.x, 2.6.x, JRuby & Rubinius. See
    for the exact versions.


Two nice screencasts are available to help you get started:


The simplest way to install Guard is to use Bundler.

Add Guard (and any other dependencies) to a

in your project’s root:
group :development do
  gem 'guard'

then install it by running Bundler:

$ bundle

Generate an empty

$ bundle exec guard init

Run Guard through Bundler with:

$ bundle exec guard

If you are on Mac OS X and have problems with either Guard not reacting to file changes or Pry behaving strange, then you should add proper Readline support to Ruby on macOS.

Avoiding gem/dependency problems

It's important that you always run Guard through Bundler to avoid errors.

If you're getting sick of typing

bundle exec
all the time, try one of the following:
  • (Recommended) Running

    bundle binstub guard
    will create
    in your project, which means running
    (tab completion will save you a key stroke or two) will have the exact same result as
    bundle exec guard
  • Or, you can

    alias be="bundle exec"
    in your
    or similar and the execute only
    be guard
    . Protip: It will work for all comands executed in
    bundle exec
  • Or, for RubyGems >= 2.2.0 (at least, though the more recent the better), simply set the

    environment variable to
    (for autodetecting the Gemfile in the current or parent directories) or set it to the path of your Gemfile.

(To upgrade RubyGems from RVM, use the

rvm rubygems

NOTE: this Rubygems feature is still under development still lacks many features of bundler

Add Guard plugins

Guard is now ready to use and you should add some Guard plugins for your specific use. Start exploring the many Guard plugins available by browsing the Guard organization on GitHub or by searching for

on RubyGems.

When you have found a Guard plugin of your interest, add it to your

group :development do
  gem ''

See the init section of the Guard usage below to see how to install the supplied plugin template that you can install and to suit your needs.


Guard is run from the command line. Please open your terminal and go to your project work directory.

Look here for a full list of Guard commands


Just launch Guard inside your Ruby or Rails project with:

$ bundle exec guard

Guard will look for a

in your current directory. If it does not find one, it will look in your
directory for a

Please look here to see all the command line options for Guard


Please read how to interact with Guard on the console and which signals Guard accepts

Guardfile DSL

For details on extending your

look at Guardfile examples or look at a list of commands Guardfile-DSL / Configuring-Guard


Before reporting a problem, please read how to File an issue.

Development / Contributing

See the Contributing Guide.



  • You must have commit rights to the GitHub repository.
  • You must have push rights for

How to release

  1. Determine which would be the correct next version number according to semver.
  2. Update the version in
  3. Commit the version in a single commit, the message should be "Bump VERSION to X.Y.Z".
  4. Push and open a pull request.
  5. Once CI is green, merge the pull request.
  6. Pull the changes locally and run
    bundle exec rake release:full
    ; this will tag, push to GitHub, publish to, and publish the release notes .


Thibaud Guillaume-Gentil (@thibaudgg)

Core Team


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.