1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
==========
watchfiles
==========
-------------------------------------------------
Simple, modern and high performance file watching
-------------------------------------------------
:Author: Louis-Philippe Véronneau
:Date: 2024
:Manual section: 1
Synopsis
========
watchfiles [**--ignore-paths** *<IGNORE_PATHS>*] [**--target-type** (*command* | *function* | *auto*)] [**--filter** *<FILTER>*] [**--args** *<ARGS>*] [**--verbose]** [**--non-recursive**] [**--verbosity** (*warning* | *info* | *debug*)] [**--sigint-timeout** *<SIGINT_TIMEOUT>*] [**--grace-period** *<GRACE_PERIOD>*] [**--sigkill-timeout** *<SIGKILL_TIMEOUT>*] [**--ignore-permission-denied**] *target* [*paths* ...]
|
| watchfiles (**-h** \| **--help**)
| watchfiles (**-V** \| **--version**)
Description
===========
*watchfiles* watches one or more directories and executes either a Shell command
or a Python function on file changes.
Arguments
=========
| *target* Command or dotted function path to run
| *paths* Filesystem paths to watch, defaults to current directory
Options
=======
| **-h** | **--help**
| Show this help message and exit
| **--ignore-paths** *<IGNORE_PATHS>*
| Specify directories to ignore, to ignore multiple paths use a comma as
| separator, e.g. "env" or "env,node_modules"
| **--target-type** (*command* | *function* | *auto*)
| Whether the target should be intercepted as a shell command or a Python
| function, defaults to "auto" which infers the target type from the target
| string
| **--filter** *<FILTER>*
| Which files to watch, defaults to "default" which uses the
| "DefaultFilter", "python" uses the "PythonFilter", "all" uses no filter,
| any other value is interpreted as a Python function/class path which is
| imported
| **--args** *<ARGS>*
| Arguments to set on sys.argv before calling target function, used only if
| the target is a function
| **--verbose**
| Set log level to "debug", wins over **--verbosity**
| **--non-recursive**
| Do not watch for changes in sub-directories recursively
| **--verbosity** (*warning* | *info* | *debug*)
| Log level, defaults to "info"
| **--sigint-timeout** *<SIGINT_TIMEOUT>*
| How long to wait for the sigint timeout before sending sigkill.
| **--grace-period** *<GRACE_PERIOD>*
| Number of seconds after the process is started before watching for
| changes.
| **--sigkill-timeout** *<SIGKILL_TIMEOUT>*
| How long to wait for the sigkill timeout before issuing a timeout
| exception.
| **--ignore-permission-denied**
| Ignore permission denied errors while watching files and directories.
| **-V** | **--version**
| Show program's version number and exit
Examples
========
Watching the current directory and calling a Python function:
$ watchfiles foobar.main
Watching Python files in two local directories and calling a Shell command:
$ watchfiles --filter python 'pytest --lf' src tests
Bugs
====
Bugs can be reported to your distribution's bug tracker or upstream
at https://github.com/samuelcolvin/watchfiles/issues
|