Man page - reflex(1)
Packages contains this manual
Manual
REFLEX
NAMESYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
NAME
Reflex - Run a command when files change
SYNOPSIS
reflex [OPTIONS] [COMMAND]
DESCRIPTION
Reflex is a small tool to watch a directory and rerun a command when certain files change. Itβs great for automatically running compile/lint/test tasks and for reloading your application when the code changes.
OPTIONS
--all= True|False
Include normally ignored files (VCS and editor special files). Defaults to False.
-c , --config= FILE
A configuration file that describes how to run reflex (or β-β to read the configuration from stdin).
-d , --decoration= DECORATION
How to decorate command output. Choices: none, plain, fancy. Default is plain.
-g , --glob= GLOB_LIST
A shell glob expression to match filenames. (May be repeated.)
-G , --inverse-glob= GLOB_LIST
A shell glob expression to exclude matching filenames. (May be repeated.)
-R , --inverse-regex= REGEX
A regular expression to exclude matching filenames. (May be repeated.)
--only-dirs= True|False
Only match directories (not files). Defaults to false.
--only-files= True|False
Only match files (not directories). Defaults to false.
-r , --regex= REGEX
A regular expression to match filenames. (May be repeated.)
-e , --sequential= True|False
Donβt run multiple commands at the same time. Defaults to false.
-t , --shutdown-timeout= TIMEOUT
Allow services this long to shut down. Defaults to 500ms.
-s , --start-service= True|False
Indicates that the command is a long-running process to be restarted on matching changes. Defaults to false.
--substitute= STRING
The substitution symbol that is replaced with the filename in a command. Defaults to "{}"
-v , --verbose= True|False
Verbose mode: print out more information about what reflex is doing. Defaults to false.
EXAMPLES
Print each .txt file if it changes:
reflex -r β\.txt$β echo {}
Run make (1) if any of the .c files in this directory change:
reflex -g β*.cβ make
Build and run a server; rebuild and restart when .java files change:
reflex -r β\.java$β -s -- sh -c βmake && java bin/Serverβ