Watches src files, rebuilds/reruns application on file changes process-manager monitor
0.3.0 released
281 25 18
Sam Eaton


Sentry 🤖

Build/Runs your crystal application, watches files, and rebuilds/reruns app on file changes


To install in your project, from the root directory of your project, run:

curl -fsSLo- | crystal eval

If using Crystal version 0.24.2 try the following:

curl -fsSLo- | crystal eval

If using Crystal version 0.23.1 or lower try the following:

curl -fsSLo- | crystal eval

This will install the Sentry CLI tool. To use the Crystal API, see


Troubleshooting the install: This ruby install script is just a convenience. If it does not work, simply: (1) place the files located in the src dir into a your project in a dev/ dir, and (2) compile sentry by doing crystal build --release dev/ -o ./sentry.


Assuming was correctly placed in [your project name]/dev/ and compiled into the root of your app as sentry, simply run:

./sentry [options]


Show Help Menu

./sentry --help

Override Default Build Command

./sentry -b "crystal build --release ./src/"

The default build command is crystal build ./src/[app_name].cr. The release flag is omitted by default for faster compilation time while you are developing.

Override Default Run Command

./sentry -r "./my_app"

The default run command is ./[app_name].

Override Default Files to Watch

./sentry -w "./src/**/*.cr" -w "./lib/**/*.cr"

The default files being watched are ["./src/**/*.cr", "./src/**/*.ecr"].

By specifying files to watch, the default will be omitted. So if you want to watch all of the file in your src directory, you will need to specify that like in the above example.

Show Info Before Running

This shows the values for the build command, run command, and watched files.

./sentry -i


$ ./sentry -i

  name:       my_app
  build:      crystal build ./src/
  build args: []
  run:        ./my_app
  run args:   []
  files:      ["./src/**/*.cr", "./src/**/*.ecr"]

🤖  Your SentryBot is vigilant. beep-boop...

Setting Build or Run Arguments

If you prefer granularity, you can specify arguments to the build or run commands using the --build-args or --run-args flags followed by a string of arguments.

./sentry -r "crystal" --run-args "spec --debug"

Sentry Crystal API



(1) It is tiring to have to stop and restart an app on every change.

(2) Docker!

Stop and restarting your app is especially expensive (and annoying) when running the app in a docker container, where one would need to totally rebuild the docker image for every change.

Now, for development, simply run sentry in your docker container, and it will rebuild the app from the docker container on any changes, without rebuilding the docker image/container.


  1. Fork it ( )
  2. Create your feature branch (git checkout -b feat-my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feat-my-new-feature)
  5. Create a new Pull Request



Sentry is intended for use in a development environment, where failure is safe and expected 😉.

  github: samueleaton/sentry
  version: ~> 0.3.0
License ISC
Crystal 0.25.0


Dependencies 0

Development Dependencies 0

Last synced .
search fire star recently