{"id":13582389,"url":"https://github.com/wtetsu/gaze","last_synced_at":"2025-10-21T04:41:16.348Z","repository":{"id":40372796,"uuid":"230095307","full_name":"wtetsu/gaze","owner":"wtetsu","description":"👁️Executes commands for you","archived":false,"fork":false,"pushed_at":"2025-08-03T17:36:20.000Z","size":409,"stargazers_count":309,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-13T18:35:17.005Z","etag":null,"topics":["command-line-tool","file-watchers","filesystemwatcher","go"],"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/wtetsu.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,"zenodo":null}},"created_at":"2019-12-25T11:46:49.000Z","updated_at":"2025-08-29T21:03:07.000Z","dependencies_parsed_at":"2024-06-18T23:03:38.825Z","dependency_job_id":"0d1210dc-18bf-417b-bffb-bbc51a98f425","html_url":"https://github.com/wtetsu/gaze","commit_stats":{"total_commits":231,"total_committers":1,"mean_commits":231.0,"dds":0.0,"last_synced_commit":"182b945818ebc65cde904ba8e8916202845d9291"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/wtetsu/gaze","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetsu%2Fgaze","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetsu%2Fgaze/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetsu%2Fgaze/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetsu%2Fgaze/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wtetsu","download_url":"https://codeload.github.com/wtetsu/gaze/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wtetsu%2Fgaze/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207158,"owners_count":26290613,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line-tool","file-watchers","filesystemwatcher","go"],"created_at":"2024-08-01T15:02:40.156Z","updated_at":"2025-10-21T04:41:16.343Z","avatar_url":"https://github.com/wtetsu.png","language":"Go","readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"500\" src=\"https://user-images.githubusercontent.com/515948/179385932-48ea38a3-3bbb-4f45-8d68-63dc076e757d.png\" alt=\"gaze logo\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/wtetsu/gaze/actions?query=workflow%3ATest\"\u003e\u003cimg src=\"https://github.com/wtetsu/gaze/workflows/Test/badge.svg\" alt=\"Test\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/wtetsu/gaze\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/wtetsu/gaze\" alt=\"Go Report Card\" /\u003e\u003c/a\u003e\n  \u003c!-- \u003ca href=\"https://qlty.sh/gh/wtetsu/projects/gaze\"\u003e\u003cimg src=\"https://qlty.sh/gh/wtetsu/projects/gaze/maintainability.svg\" alt=\"Maintainability\" /\u003e\u003c/a\u003e --\u003e\n  \u003ca href=\"https://codecov.io/gh/wtetsu/gaze\"\u003e\u003cimg src=\"https://codecov.io/gh/wtetsu/gaze/branch/master/graph/badge.svg\" alt=\"codecov\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/wtetsu/gaze\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/wtetsu/gaze.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n\n# 👁️Gaze: Save \u0026 Run\n\n\nFocus on your code, not commands!\n\n\u003cimg src=\"https://github.com/user-attachments/assets/a7be2e53-b516-419e-afea-735fa7bc095e\" width=\"800px\" /\u003e\n\n----\n\n\n😵‍💫 Rerunning commands after each edit disrupts your flow.\n\nLet Gaze handle it!\n\n- Save a.py -\u003e 👁️Runs `python a.py`\n- Save a.rb -\u003e 👁️Runs `rubocop`\n- Save a.go -\u003e 👁️Runs `make build`\n- Save Dockerfile -\u003e 👁️Runs `docker build`\n- And so forth...\n\n## Installation\n\n### Homebrew (macOS)\n\n```\nbrew install gaze\n```\n\nOr, [download binary](https://github.com/wtetsu/gaze/releases) (macOS, Windows, Linux)\n\n## Quick start\n\n\nSetting up Gaze is easy.\n\n```\n# Gaze current directory\ngaze .\n```\n\nThen, open your favorite editor in another terminal and start editing!\n\n\n```\nvi a.py\n```\n\n\n\n## Why Gaze? (Features)\n\nPlenty of 'update-and-run' tools exist, but if you're coding, Gaze is the ideal choice — it's designed for coding flow.\n\n- 📦 Easy to use, out-of-the-box\n- ⚡ Lightning-fast response\n- 🌎 Language-agnostic, editor-agnostic\n- 🔧 Flexible configuration\n- 📝 Create-and-rename file actions handling\n- 🚀 Optimal parallel handling\n  - See also: [Parallel handling](/doc/parallel.md)\n  - \u003cimg src=\"doc/img/p04.png\" width=\"300\"\u003e\n\n## 🤖 Perfect with AI Agents!\n\nGaze works amazingly well with AI coding agents like Claude Code! Here's how this powerful combination works:\n\n```mermaid\nflowchart LR\n    subgraph cycle [\" \"]\n        A[🤖 AI Agent] --\u003e|edits| B[📁 Files]\n        B --\u003e|watches| C[👁️ Gaze]\n        C --\u003e|outputs| D[📊 Results\u003cbr/\u003eTests • Lint • Output]\n        D --\u003e|reads| A\n    end\n```\n\n1. **AI Agent edits files** - Claude Code modifies your source files, configs, or data\n2. **Gaze watches and runs** - Automatically executes tests, builds, linters, or data processing\n3. **Results feed back** - AI Agent reads the output and continues the cycle\n\n\n### Common AI + Gaze Patterns:\n- 🧪 **Test-driven development**: Auto-run tests as AI writes code\n- 📊 **Data pipeline**: Regenerate charts/reports when AI updates data\n- 🔨 **Build automation**: Rebuild projects as AI modifies source\n- 🚀 **Live development**: Restart servers when AI edits configs\n\nThis combo is a game-changer for AI-assisted development! 🚀\n\n\n# How to use\n\nGaze prioritizes ease of use with its simple invocation.\n\n```\ngaze .\n```\n\nThen, switch to another terminal and run `vi a.py`. Gaze executes a.py in response to your file modifications.\n\n---\n\nGaze at one file.\n\n```\ngaze a.py\n```\n\n---\n\nSpecify files using pattern matching (\\*, \\*\\*, ?, {, })\n\n```\ngaze \"*.py\"\n```\n\n```\ngaze \"src/**/*.rb\"\n```\n\n```\ngaze \"{aaa,bbb}/*.{rb,py}\"\n```\n\n---\n\nSpecify a custom command by `-c` option.\n\n```\ngaze \"src/**/*.js\" -c \"eslint {{file}}\"\n```\n\n---\n\nKill the previous process before launching a new process. This is useful if you are writing a server.\n\n```\ngaze -r server.py\n```\n\n---\n\nKill a running process after 1000(ms). This is useful if you love infinite loops.\n\n```\ngaze -t 1000 complicated.py\n```\n\n---\n\nSpecify multiple commands within quotes, separated by newlines.\n\n```\ngaze \"*.cpp\" -c \"gcc {{file}} -o a.out\nls -l a.out\n./a.out\"\n```\n\nOutput when a.cpp was updated.\n\n```\n[gcc a.cpp -o a.out](1/3)\n\n[ls -l a.out](2/3)\n-rwxr-xr-x 1 user group 42155 Mar  3 00:31 a.out\n\n[./a.out](3/3)\nhello, world!\n```\n\nGaze will not execute subsequent commands if a command exits with a non-zero status.\n\n\n```\n[gcc a.cpp -o a.out](1/3)\na.cpp: In function 'int main()':\na.cpp:5:28: error: expected ';' before '}' token\n   printf(\"hello, world!\\n\")\n                            ^\n                            ;\n }\n ~\nexit status 1\n```\n\n### Configuration\n\nGaze is language-agnostic.\n\nFor convenience, it provides helpful default configurations for a variety of popular languages (e.g., Go, Python, Ruby, JavaScript, Rust, etc.).\n\n\n```\ngaze a.py\n```\n\nBy default, this command is equivalent to `gaze a.py -c 'python \"{{file}}\"'` because the default configuration includes:\n\n```yaml\ncommands:\n- ext: .py\n  cmd: python \"{{file}}\"\n```\n\n\n\nYou can view the default YAML configuration using `gaze -y`.\n\n\n\u003cdetails\u003e\n\u003csummary\u003e⚙️The default configuration\u003c/summary\u003e\n\n```yaml\ncommands:\n- ext: .go\n  cmd: go run \"{{file}}\"\n- ext: .py\n  cmd: python \"{{file}}\"\n- ext: .rb\n  cmd: ruby \"{{file}}\"\n- ext: .js\n  cmd: node \"{{file}}\"\n- ext: .d\n  cmd: dmd -run \"{{file}}\"\n- ext: .groovy\n  cmd: groovy \"{{file}}\"\n- ext: .php\n  cmd: php \"{{file}}\"\n- ext: .java\n  cmd: java \"{{file}}\"\n- ext: .kts\n  cmd: kotlinc -script \"{{file}}\"\n- ext: .rs\n  cmd: |\n    rustc \"{{file}}\" -o\"{{base0}}.out\"\n    ./\"{{base0}}.out\"\n- ext: .cpp\n  cmd: |\n    gcc \"{{file}}\" -o\"{{base0}}.out\"\n    ./\"{{base0}}.out\"\n- ext: .ts\n  cmd: |\n    tsc \"{{file}}\" --outFile \"{{base0}}.out\"\n    node ./\"{{base0}}.out\"\n- ext: .zig\n  cmd: zig run \"{{file}}\"\n- re: ^Dockerfile$\n  cmd: docker build -f \"{{file}}\" .\n\nlog:\n  start: \"[{{command}}]{{step}}\"\n  end: \"({{elapsed_ms}}ms)\"\n```\n\n\u003c/details\u003e\n\n---\n\nTo customize your configuration, create your own configuration file:\n\n\n```\ngaze -y \u003e ~/.gaze.yml\nvi ~/.gaze.yml\n```\n\nGaze searches for a configuration file in the following order:\n\n1. A file specified by -f option\n1. ~/.config/gaze/gaze.yml\n1. ~/.gaze.yml\n1. (Default)\n\n\n\n\n\n### Options:\n\n```\nUsage: gaze [options] file(s)\n\nOptions:\n  -c \u003ccommand\u003e    Command(s) to run when files change.\n  -r              Restart mode: send SIGTERM to the running process before starting the next command.\n  -t \u003ctime_ms\u003e    Timeout (ms): send SIGTERM to the running process after the specified time.\n  -f \u003cfile\u003e       Path to a YAML configuration file.\n  -v              Verbose mode: show additional information.\n  -q              Quiet mode: suppress normal output.\n  -y              Show the default YAML configuration.\n  -h              Show help.\n  --color \u003cmode\u003e  Set color mode (0: plain, 1: colorful).\n  --version       Show version information.\n\nExamples:\n  gaze .\n  gaze main.go\n  gaze a.rb b.rb\n  gaze -c make \"**/*.c\"\n  gaze -c \"eslint {{file}}\" \"src/**/*.js\"\n  gaze -r server.py\n  gaze -t 1000 complicated.py\n\nFor more information: https://github.com/wtetsu/gaze\n```\n\n### Command format\n\nYou can use [Mustache](\u003chttps://en.wikipedia.org/wiki/Mustache_(template_system)\u003e) templates in your commands.\n\n```\ngaze -c \"echo {{file}} {{ext}} {{abs}}\" .\n```\n\n| Parameter | Example                   |\n| --------- | ------------------------- |\n| {{file}}  | src/mod1/main.py          |\n| {{ext}}   | .py                       |\n| {{base}}  | main.py                   |\n| {{base0}} | main                      |\n| {{dir}}   | src/mod1                  |\n| {{abs}}   | /my/proj/src/mod1/main.py |\n\n\n# Third-party data\n\n- Great Go libraries\n  - See [go.mod](https://github.com/wtetsu/gaze/blob/master/go.mod) and [license.zip](https://github.com/wtetsu/gaze/releases)\n","funding_links":[],"categories":["Go","go","\u003ca name=\"launcher\"\u003e\u003c/a\u003eCommand launchers","Other"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtetsu%2Fgaze","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwtetsu%2Fgaze","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwtetsu%2Fgaze/lists"}