{"id":15286427,"url":"https://github.com/rawnly/hawk","last_synced_at":"2025-04-13T02:32:31.794Z","repository":{"id":78841005,"uuid":"532007883","full_name":"rawnly/hawk","owner":"rawnly","description":"Dead simple rust CLI to ease workflows management inside monorepos.","archived":false,"fork":false,"pushed_at":"2023-03-13T16:07:42.000Z","size":300,"stargazers_count":34,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T20:49:31.549Z","etag":null,"topics":["build-tool","cli","github-actions","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/hawk-cli","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawnly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-09-02T16:50:00.000Z","updated_at":"2024-10-27T17:23:05.000Z","dependencies_parsed_at":"2023-04-22T18:30:17.887Z","dependency_job_id":null,"html_url":"https://github.com/rawnly/hawk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fhawk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fhawk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fhawk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawnly%2Fhawk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawnly","download_url":"https://codeload.github.com/rawnly/hawk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248657819,"owners_count":21140842,"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":["build-tool","cli","github-actions","rust"],"created_at":"2024-09-30T15:13:57.378Z","updated_at":"2025-04-13T02:32:31.788Z","avatar_url":"https://github.com/rawnly.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hawk\n\nDead simple rust CLI to ease workflows management inside monorepos.\n\n![gif](./assets/out.gif)\n\n## Installation\n\nYou can install `hawk` via cargo (homebrew coming soon) or by downloading the [latest binary](https://github.com/Rawnly/hawk/releases/latest)\n\n```sh\ncargo install hawk-cli\n```\n\n## Usage\n\nRun `hawk init` to initialize an empty config file. With the `--read-from-env` flag `hawk` will try to\nretrive your `workspaces` from `pnpm-workspace.yaml` or `pacakge.json` workspaces key.\n~You can also pass `--json` if you want to save the config file as json.~\n\n```bash\nhawk 0.1.4\n\nUSAGE:\n    hawk [OPTIONS] [SUBCOMMAND]\n\nOPTIONS:\n    -c, --config \u003cCONFIG\u003e    Specify the config file path\n    -h, --help               Print help information\n        --scope \u003cSCOPE\u003e      Specify which workspaces files copy / watch Usage: --scope\n                             \u003cworkspace-name\u003e\n    -V, --version            Print version information\n\nSUBCOMMANDS:\n    clean    Delete generated files\n    copy     Copy files to the `target` directory\n    help     Print this message or the help of the given subcommand(s)\n    init     Initialize a repository\n    list     List workflows in the `target` directory\n```\n\n## Example\n\n\u003e Check out the [example](./example) folder.\n\nBelow an example monorepo situation:\n\n```sh\nexample\n├── hawk-config.yaml\n├── .github\n│   └── workflows\n│       ├── my-second-app--deploy.yml # name generated by folder\n│       └── the-app--deploy.yml # name is read from package.json\n└── packages\n    ├── my-app\n    │   ├── .DS_Store\n    │   ├── package.json // reads workspace name from package.json (the-app)\n    │   └── .github/workflows\n    │       └── deploy.yml\n    └── my-second-app\n        └── .github/workflows\n            └── deploy.yml\n```\n\n```bash\n    $ cd example\n    $ hawk --watch\n    ... let the magic happen\n```\n\n## Why\n\n[Github actions don't yet support workflows inside subfolders](https://github.com/orgs/community/discussions/18055#discussioncomment-3703595), neither in your `.github/workflows/` folder or project custom folders.\nSo I made `hawk` to solve this problem without using custom commands. It lets you copy workflows from custom paths and paste them with a prefix, handling most of the pain.\nWith 10 lines config you have a working monorepo setup.\n\n## Installation\n\nDownload the [latest release](https://github.com/rawnly/hawk/releases/latest) and move in your `$PATH`\n\n### From source\n\nmake sure to have your rust environment ready, then:\n\n- Clone the repo\n- Run `cargo build -r` or `make build`\n- Copy `target/release/hawk` to your path or use `sudo make install` (it will copy the bin into `/usr/local/bin`)\n- Enjoy\n\n## Setup\n\nTo setup a new project just run `hawk init`. If you're in a `node` environment you can pass the `--read-from-env` flag to generate config based on the monorepo configuration.\n\n## Run in the CI\n\n```yaml\n- uses: rawnly/hawk@main\n  with:\n    config: hawk-config.yaml\n```\n\n## Features\n\n- [x] File watching\n- [x] Cleanup `workflows` folder from generated files.\n- [x] Custom configuration\n- [x] Generate config from `pnpm-workspace.yaml` and yarns `package.json:workspaces`\n- [x] Create an action to automate this process. (so the user can update a workflow, push and get the generated one updated automatically)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fhawk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawnly%2Fhawk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawnly%2Fhawk/lists"}