{"id":15007953,"url":"https://github.com/daynin/monk","last_synced_at":"2025-10-30T12:31:19.021Z","repository":{"id":257788714,"uuid":"860034845","full_name":"daynin/monk","owner":"daynin","description":"Monk is a simple Git hooks manager","archived":false,"fork":false,"pushed_at":"2024-09-20T17:57:18.000Z","size":157,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T05:02:59.924Z","etag":null,"topics":["git","git-hooks","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/monk","language":"Rust","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/daynin.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-09-19T17:47:32.000Z","updated_at":"2024-12-18T23:32:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"aba8d338-7926-409d-bfcd-f7398164804d","html_url":"https://github.com/daynin/monk","commit_stats":null,"previous_names":["daynin/monk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daynin%2Fmonk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daynin%2Fmonk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daynin%2Fmonk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daynin%2Fmonk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daynin","download_url":"https://codeload.github.com/daynin/monk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238968236,"owners_count":19560585,"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":["git","git-hooks","rust"],"created_at":"2024-09-24T19:14:36.966Z","updated_at":"2025-10-30T12:31:19.013Z","avatar_url":"https://github.com/daynin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/daynin/monk\"\u003e\n    \u003cimg src=\"./logo.svg\" height=\"200px\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003e\n    Monk is a simple Git hooks manager\n\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.bestpractices.dev/en/projects/10442\"\u003e\n    \u003cimg alt=\"OpenSSF Best Practices\" src=\"https://www.bestpractices.dev/projects/6505/badge\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/daynin/monk/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/license-MIT-blue.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/daynin/monk/issues\"\u003e\n    \u003cimg alt=\"GitHub Issues\" src=\"https://img.shields.io/github/issues/daynin/monk.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/monk\"\u003e\n    \u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/v/monk.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/monk\"\u003e\n    \u003cimg alt=\"Downloads\" src=\"https://img.shields.io/crates/d/monk\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n### Monk's features:\n\n- 🦀 **Easily set up in your Rust project.** No need to install additional package managers.\n- ⚙️ **Works with custom `build.rs` files.** Automate the hooks installation process.\n- 💻 **Run your hooks via CLI.** Test your hooks without triggering them via Git.\n\n\u003e Keep calm, monk will protect your repo!\n\n### Installation\n\nYou can install it using `cargo`:\n\n```sh\ncargo install monk\n```\n\n#### Or\n\nYou can add it as a build dependency:\n\n```sh\ncargo add --build monk\n```\n\nThen create a `build.rs` file:\n\n```rust\npub fn main() {\n    monk::init();\n}\n```\n\nIn this case, `monk` will be installed automatically and will initialize all hooks from `monk.yaml`\n.\nThis is the most convenient option for Rust projects, as it doesn't require contributors to install `monk` manually.\n\n#### Installing monk with Nix\n\nYou can also install `monk` using Nix:\n\n```sh\nnix profile install github:daynin/monk\n```\n\n#### Installing monk with Guix\n\nYou can install `monk` using GNU Guix directly from GitHub:\n\n```sh\n# Install latest version from main branch\nguix package -f \u003c(curl -s https://raw.githubusercontent.com/daynin/monk/main/monk.scm)\n```\n\nNote: This will automatically fetch and build the latest version from the main branch.\n\n\n### Usage\n\nCreate a configuration file named `monk.yaml` in your project root:\n\n#### Simple Configuration\n\n```yaml\npre-commit:\n  commands:\n    - cargo fmt -- --check\n    - cargo clippy -- -D warnings\n\npre-push:\n  commands:\n    - cargo test\n\n```\n\n#### Path-Based Configuration\n\nFor projects with multiple modules or mixed technologies, you can configure different hooks for different paths:\n\n```yaml\npre-commit:\n  paths:\n    \"api/\":\n      commands:\n        - cargo fmt -- --check\n        - cargo clippy -- -D warnings\n      working_directory: \"api\"\n    \"frontend/\":\n      commands:\n        - npm run lint\n        - npm test\n      working_directory: \"frontend\"\n    \"shared/\":\n      commands:\n        - cargo fmt -- --check\n        - cargo clippy -- -D warnings\n        - cargo test\n      working_directory: \"shared\"\n\npre-push:\n  paths:\n    \"api/\":\n      commands:\n        - cargo test\n        - cargo build --release\n      working_directory: \"api\"\n    \"frontend/\":\n      commands:\n        - npm run build\n      working_directory: \"frontend\"\n\n# Global hooks (run for any changes)\ncommit-msg:\n  commands:\n    - echo \"Validating commit message...\"\n```\n\n**Path-based features:**\n- 🎯 **Selective execution**: Only runs hooks for paths with changed files\n- 📁 **Working directory**: Each hook can specify its working directory  \n- 🔄 **Multi-module support**: Perfect for monorepos with multiple Rust crates\n- 🌐 **Mixed technology**: Supports different tech stacks in the same repo\n\n\nIf you installed `monk` manually, run:\n\n```sh\nmonk install\n```\n\nIf you added it as a build dependency and set up `build.rs` as shown above, the hooks will be installed automatically when you build your project.\n\n#### Running hooks manually\n\nTo run specific hooks manually, use the `run` command\n\n```sh\nmonk run pre-commit\n```\n\n#### Removing Hooks\n\n`monk` automatically creates backup files for existing hooks and restores them when you remove monk's hooks.\n\nTo remove the hooks, run:\n\n```sh  \nmonk uninstall\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaynin%2Fmonk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaynin%2Fmonk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaynin%2Fmonk/lists"}