{"id":20041117,"url":"https://github.com/makiuchi-d/arelo","last_synced_at":"2025-04-05T12:02:03.937Z","repository":{"id":57561431,"uuid":"254047394","full_name":"makiuchi-d/arelo","owner":"makiuchi-d","description":"a simple auto reload (live reload) utility","archived":false,"fork":false,"pushed_at":"2025-03-24T12:57:17.000Z","size":86,"stargazers_count":112,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T11:03:56.708Z","etag":null,"topics":["auto-reload","filewatcher","go","golang","live-reload","livereload","reload","task-runner","watcher"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/makiuchi-d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["makiuchi-d"]}},"created_at":"2020-04-08T09:46:40.000Z","updated_at":"2025-03-26T15:37:58.000Z","dependencies_parsed_at":"2023-01-25T08:00:08.581Z","dependency_job_id":"a299a5c1-63cd-4104-8867-f1c61a0e25f2","html_url":"https://github.com/makiuchi-d/arelo","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2Farelo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2Farelo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2Farelo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiuchi-d%2Farelo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makiuchi-d","download_url":"https://codeload.github.com/makiuchi-d/arelo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332556,"owners_count":20921853,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-reload","filewatcher","go","golang","live-reload","livereload","reload","task-runner","watcher"],"created_at":"2024-11-13T10:45:26.086Z","updated_at":"2025-04-05T12:02:03.917Z","avatar_url":"https://github.com/makiuchi-d.png","language":"Go","funding_links":["https://github.com/sponsors/makiuchi-d"],"categories":[],"sub_categories":[],"readme":"# Arelo - a simple auto reload utility\n\n[![go test](https://github.com/makiuchi-d/arelo/actions/workflows/test.yml/badge.svg)](https://github.com/makiuchi-d/arelo/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/makiuchi-d/arelo)](https://goreportcard.com/report/github.com/makiuchi-d/arelo)\n\nArelo executes the specified command and monitors the files under the target directory.\nWhen the file that matches the pattern has been modified, restart the command.\n\n## Features\n\n - Simple command line interface without config file\n - Monitoring file patterns are specified as glob\n   - globstar (**; matches to zero or more directories) supported\n   - can match the no extention filename\n   - can match the hidden filename which starts with \".\"\n - Safely terminate child processes\n - Any command line tool can be executed\n   - not only go project\n   - can execute shell script\n - No unnesesary servers\n   - no need to use local port unlike http server\n\n## Install\n\n```\ngo install github.com/makiuchi-d/arelo@latest\n```\n\nAlternatively, you can install it via [Homebrew](https://formulae.brew.sh/formula/arelo):\n\n```\nbrew install arelo\n```\n\nOr, you can download the executable binaries from the [release page](https://github.com/makiuchi-d/arelo/releases).\n\nTo get a static-linked executable binary, build with `CGO_ENABLED=0`.\n\n## Quick start\n\nRun this command in your Go project directory.\n\n```\narelo -p '**/*.go' -i '**/.*' -i '**/*_test.go' -- go run .\n```\n\n## Usage\n\n```\nUsage: arelo [OPTION]... -- COMMAND\nRun the COMMAND and restart when a file matches the pattern has been modified.\n\nOptions:\n  -d, --delay duration     duration to delay the restart of the command (default 1s)\n  -f, --filter event       filter file system event (CREATE|WRITE|REMOVE|RENAME|CHMOD)\n  -h, --help               display this message\n  -i, --ignore glob        ignore pathname glob pattern\n  -n, --no-stdin           do not forward stdin to the command\n  -p, --pattern glob       trigger pathname glob pattern (default \"**\")\n      --polling interval   poll files at given interval instead of using fsnotify\n  -r, --restart            restart the command on exit\n  -s, --signal signal      signal used to stop the command (default \"SIGTERM\")\n  -t, --target path        observation target path (default \"./\")\n  -v, --verbose            verbose output\n  -V, --version            display version\n```\n\n### Options\n\n#### -t, --target path\n\nMonitor file modifications under the `path` directory.\nThe subdirectories are also monitored unless they match to the ignore patterns.\n\nThis option can be set multiple times.\n\nThe default value is the current directory (\"./\").\n\nNote:\nThis option can be file instead of directory, \nbut arelo cannot follow modification after the file has been removed/renamed.\n\n#### -p, --pattern glob\n\nRestart command when the modified file is matched to this pattern.\n\nThe pattern is specified as an extended glob\nthat supports `{alt1,...}`, `**` like zsh or bash with globstar option.\nAnd note that the path delimiter is `/` even on Windows.\n\nThis option can set multiple times.\n\nThe default value (\"**\") is a pattern that matches any file in the target directories and their subdirectories.\n\n#### -i, --ignore glob\n\nIgnore the file or directory whose names is matched to this pattern.\n\nThis option takes precedence over the --pattern option.\n\nThis option can set multiple times.\n\n\n#### -f, --filter event\n\nFilter the filesystem event to ignore it.\n\nThe event can be `CREATE`, `WRITE`, `REMOVE`, `RENAME` or `CHMOD`.\n\nThis option can set multiple times.\n\n#### -d, --delay duration\n\nDelay the restart of the command from the detection of the pattern matched file modification.\nThe detections within the delay are ignored.\n\nThe duration is specified as a number with a unit suffix (\"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\").\n\n#### -s, --signal signal\n\nThis signal will be sent to stop the command on restart.\nThe default signal is `SIGTERM`.\n\nThis option can be `SIGHUP`, `SIGINT`, `SIGQUIT`, `SIGKILL`, `SIGUSR1`, `SIGUSR2`, `SIGWINCH` or `SIGTERM`.\n\nThis option is not available on Windows.\n\n#### -r, --restart\n\nAutomatically restart the command when it exits, similar to when the pattern matched file is modified.\n\n#### --polling interval\n\nPoll files at the specified interval instead of using fsnotify.\nIf not set or set to `0`, fsnotify is used for file monitoring.\n\nThis option is useful when fsnotify cannot detect changes, such as on WSL2.\n\nThe interval is specified as a number with a unit suffix (\"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\").\n\n#### -v, --verbose\n\nOutput logs verbosely.\n\n#### -V, --version\n\nPrint version informatin.\n\n#### -h, --help\n\nPrint usage.\n\n### Example\n\n```\narelo -t ./src -t ./html -p '**/*.{go,html,yaml}' -i '**/.*' -- go run .\n```\n\n####  `-t ./src -t ./html`\n\nMonitor files under the ./src or ./html directories.\n\n#### `-p '**/*.{go,html,yaml}'`\n\nRestart command when any *.go, *.html, *.yml file under the target, sub, and subsub... directories modified.\n\n#### `-i '**/.*'`\n\nIgnore files/directories whose name starts with '.'.\n\n#### `go run .`\n\nCommand to run.\n\n## Similar projects\n\n - [realize](https://github.com/oxequa/realize)\n - [fresh](https://github.com/gravityblast/fresh)\n - [gin](https://github.com/codegangsta/gin)\n - [go-task](https://github.com/go-task/task)\n - [air](https://github.com/cosmtrek/air)\n - [reflex](https://github.com/cespare/reflex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiuchi-d%2Farelo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakiuchi-d%2Farelo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiuchi-d%2Farelo/lists"}