{"id":21941823,"url":"https://github.com/juls0730/zqdgr","last_synced_at":"2026-01-18T11:07:39.749Z","repository":{"id":263123342,"uuid":"889414461","full_name":"juls0730/zqdgr","owner":"juls0730","description":"Zoe's Quick and Dirty Golang Runner","archived":false,"fork":false,"pushed_at":"2025-01-23T15:12:51.000Z","size":39,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T16:24:19.721Z","etag":null,"topics":["golang","runner","zqdgr"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juls0730.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}},"created_at":"2024-11-16T10:17:05.000Z","updated_at":"2025-01-23T15:12:54.000Z","dependencies_parsed_at":"2025-01-15T17:50:33.005Z","dependency_job_id":"bd9fef49-bf60-4d60-8cac-88860c58411b","html_url":"https://github.com/juls0730/zqdgr","commit_stats":null,"previous_names":["juls0730/zqdgr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juls0730%2Fzqdgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juls0730%2Fzqdgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juls0730%2Fzqdgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juls0730%2Fzqdgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juls0730","download_url":"https://codeload.github.com/juls0730/zqdgr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235875513,"owners_count":19059167,"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":["golang","runner","zqdgr"],"created_at":"2024-11-29T03:14:53.399Z","updated_at":"2026-01-18T11:07:39.743Z","avatar_url":"https://github.com/juls0730.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZQDGR\n\nZQDGR is Zoe's Quick and Dirty Golang Runner. This is a simple tool that lets you run a go project in a similar way to\nhow you would use npm. ZQDGR lets you watch files and rebuild your project as you make changes. ZQDGR also includes an\noptional websocket server that will notify listeners that a rebuild has occurred, this is very useful for live reloading\nwhen doing web development with Go.\n\n**Status: Alpha**\n\nThis project is not recommend for production use, you are allowed to, and I try\nmy best to keep it as stable as possible, but features and APIs will change\nin nearly every release without backwards compatibility, upgrade carefilly, and\nmake sure to depend on a specific version of ZQDGR.\n\n## Install\n\n```bash\ngo install github.com/juls0730/zqdgr@latest\n```\n\n## Usage\n\nFull usage\n\n```Bash\nzqdgr [options] \u003ccommand\u003e\n```\n\n### Commands\n\n- `init`\n\n  generates a zqdgr.config.json file in the current directory\n\n- `new [project name] [github repo]`\n\n  Creates a new golang project with zqdgr and can optionally run scripts from a github repo\n\n- `watch \u003cscript\u003e`\n\n  runs the script in \"watch mode\", when files that follow the pattern in zqdgr.config.json change, the script restarts\n\n- `\u003cscript\u003e`\n\n  runs the script\n\n### Options\n\n- `-no-ws`\n\n  disables the web socket server running at 2067\n\n- `-config`\n\n  specifies the path to the config file\n\n- `-disable-reload-config`\n\n  disables reloading the config file when it changes\n\n- `-C`\n\n  specifies the path to use as the working directry\n\nExample usage:\n\n```bash\nzqdgr init\nzqdgr watch dev\nzqdgr -config ./my-config.json watch dev\nzqdgr -C ./my-nested-project watch dev\n```\n\n### ZQDGR websocket\n\nZQDGR comes with a websocket to notify listeners that the application has updates, the websocket is accessible at\n`127.0.0.1:2067/ws`. An example dev script to listen for rebuilds might look like this\n\n```Javascript\nlet host = window.location.hostname;\nconst socket = new WebSocket('ws://' + host + ':2067/ws');\n\nsocket.addEventListener('message', (event) =\u003e {\n    if (event.data === 'refresh') {\n        async function testPage() {\n            try {\n            let res = await fetch(window.location.href)\n            } catch (error) {\n                console.error(error);\n                setTimeout(testPage, 300);\n                return;\n            }\n            window.location.reload();\n        }\n\n        testPage();\n    }\n});\n```\n\n## Configuration\n\nZQDGR is solely configured by a `zqdgr.config.json` file in the root of your project. The file has the following keys:\n\n| Key              | Type   | Required | default | Description                                                                                              |\n| ---------------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------------- |\n| name             | string | -        | -       | The name of the project                                                                                  |\n| version          | string | -        | -       | The version of the project                                                                               |\n| description      | string | -        | -       | The description of the project                                                                           |\n| author           | string | -        | -       | The author of the project (probably you)                                                                 |\n| license          | string | -        | -       | The license of the project                                                                               |\n| homepage         | string | -        | -       | The URL to the homepage of the project                                                                   |\n| repository       | object | -        | -       | The repository of the project                                                                            |\n| repository.type  | string | -        | -       | The type of VCS that you use, most likely git                                                            |\n| repository.url   | string | -        | -       | The place where you code is hosted. This should be a URI that can be used as is in a program such as git |\n| scripts          | object | true     | -       | An object that maps a script name to a script command, which is just a shell command                     |\n| pattern          | string | true     | -       | The GLOB pattern that ZQDGR will watch for changes                                                       |\n| excluded_globs   | array  | -        | -       | Globs that ZQDGR will ignore when in the `watch` mode                                                    |\n| shutdown_signal  | string | -        | SIGINT  | The signal that ZQDGR will use to shutdown the script. One of SIGKILL, SIGINT, SIGQUIT, SIGTERM          |\n| shutdown_timeout | int    | -        | 1       | The amount of time in seconds that ZQDGR will wait for the script to exit before force killing it.       |\n\nThe only required key is `scripts`, the rest are optional, but we recommend you set the most important ones.\n\n## ZQDGR `new` scripts\n\nSince ZQDGR v0.0.2, you can easily initialize a new project with `zqdgr new` and optionally, you can specify a git repo\nto use as the initializer script. An example script is available at\n[github.com/juls0730/zqdgr-script-example](https://github.com/juls0730/zqdgr-script-example).\n\nEvery initialize script is expected to follow a few rules:\n\n- The project must be a zqdgr project\n- The `build` script must exist and must export a binary named `main`\n\nZQDGR passes your init script the directory that is being initialized as the first and only argument and runs the script\nin the target directory. When your binary is executed, there is a git repository and the project is in the following\nstate:\n\n- go.mod\n- main.go\n- zqdgr.config.json\n\n## Attribution\n\nThis project uses work from the following projects:\n\n- [CompileDaemon](https://github.com/githubnemo/CompileDaemon)\n\n  ```\n    Copyright (c) 2013, Marian Tietz\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without\n    modification, are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this\n      list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice,\n      this list of conditions and the following disclaimer in the documentation\n      and/or other materials provided with the distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuls0730%2Fzqdgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuls0730%2Fzqdgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuls0730%2Fzqdgr/lists"}