{"title":"Watch","description":"","section":"cli","version":"v1.5","path":"cli/watch","canonical_url":"https://amberframework.org/docs/v1.5/cli/watch","markdown_url":"https://amberframework.org/docs/v1.5/cli/watch.md","inherited":true,"content_markdown":"# Watch\n\nThe `amber watch` compiles and runs your project. It also monitors for changes and rebuilds when necessary.\n\nHere is a list of the commands available:\n\n`amber watch` or `amber w`\n\n```bash\namber watch [OPTIONS]\n\nOptions:\n  -b, --build             Overrides the default build command\n                          (default: crystal build ./src/[process_name].cr)\n  --build-args            Specifies arguments for the build command\n  -i, --info              Shows the values for build/run commands, build/run args, and watched files\n  -n, --name              Sets the name of the app process\n                          (default: [process_name])\n  --no-build              Skips the build step\n  -r, --run               Overrides the default run command\n                          (default: ./[process_name])\n  --run-args              Specifies arguments for the run command\n  -w, --watch (multiple)  Overrides default files and appends to list of watched files\n                          (default: ./src/**/*.cr, ./src/**/*.ecr)\n  -h, --help              show this help\n```\n\n## Example\n\n```bash\n$ amber watch\n02:58:23 Watcher    | (INFO) Watching 22 files (server reload)...\n02:58:23 Watcher    | (INFO) Building project App01...\n02:58:31 Watcher    | (INFO) Terminating app App01...\n02:58:31 Watcher    | (INFO) Starting App01...\n02:58:31 NodeJS     | (INFO) Installing dependencies...\n02:58:31 NodeJS     | (INFO) Watching public directory\n02:58:31 Server     | (INFO) Amber 0.7.2 serving application \"App01\" at http://0.0.0.0:3000\n02:58:31 Server     | (INFO) Server started in development.\n02:58:31 Server     | (INFO) Startup Time 00:00:00.000182000\n02:58:31 Watcher    | Watching 10 client files...\n```"}