Linux command
reflex 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Watch and run command
reflex [command]
Watch specific pattern
reflex -r '\.go$' [go build]
Watch directory
reflex -d [src/] [command]
Multiple patterns
reflex -r '\.go$' -r '\.html$' [command]
Start without initial run
reflex -s [command]
Decoration mode
reflex -d [.] -- [sh -c "echo changed"]
Exclude pattern
reflex -r '\.go$' -R 'vendor/' [command]
说明
reflex watches files and runs commands on changes. It's a flexible file watcher for development. Regex patterns filter which files trigger. Multiple patterns combine for complex matching. Service mode runs a long-running process. The process restarts on changes. Exclusions ignore vendor directories or build output. Prevents unnecessary rebuilds. Configuration files define complex watch rules. Multiple watchers in one file.
参数
- -r _REGEX_
- Include pattern.
- -R _REGEX_
- Exclude pattern.
- -d _DIR_
- Watch directory.
- -s
- Start service (no initial run).
- -g _GLOB_
- Glob pattern.
- -c _CONFIG_
- Config file.
- --all
- Match all files.
- --decoration _MODE_
- Output decoration.
FAQ
What is the reflex command used for?
reflex watches files and runs commands on changes. It's a flexible file watcher for development. Regex patterns filter which files trigger. Multiple patterns combine for complex matching. Service mode runs a long-running process. The process restarts on changes. Exclusions ignore vendor directories or build output. Prevents unnecessary rebuilds. Configuration files define complex watch rules. Multiple watchers in one file.
How do I run a basic reflex example?
Run `reflex [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -r _REGEX_ do in reflex?
Include pattern.