{"id":36617504,"url":"https://github.com/lordcodes/swifthooks","last_synced_at":"2026-01-12T09:14:26.894Z","repository":{"id":40511861,"uuid":"507561480","full_name":"lordcodes/swifthooks","owner":"lordcodes","description":"Include Git hooks in the project and share between contributors with easy install.","archived":false,"fork":false,"pushed_at":"2024-03-11T14:55:48.000Z","size":168,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T14:53:50.218Z","etag":null,"topics":["git","git-hooks","swift","swift-package-manager"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lordcodes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-26T11:57:26.000Z","updated_at":"2025-03-29T05:58:49.000Z","dependencies_parsed_at":"2022-09-17T00:20:34.433Z","dependency_job_id":null,"html_url":"https://github.com/lordcodes/swifthooks","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lordcodes/swifthooks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordcodes%2Fswifthooks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordcodes%2Fswifthooks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordcodes%2Fswifthooks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordcodes%2Fswifthooks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordcodes","download_url":"https://codeload.github.com/lordcodes/swifthooks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordcodes%2Fswifthooks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["git","git-hooks","swift","swift-package-manager"],"created_at":"2026-01-12T09:14:26.141Z","updated_at":"2026-01-12T09:14:26.886Z","avatar_url":"https://github.com/lordcodes.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"Art/logo.png\" width=\"500\" max-width=\"90%\" alt=\"SwiftHooks\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Swift-5.6-orange.svg\" /\u003e\n    \u003ca href=\"https://swift.org/package-manager\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/swiftpm-compatible-brightgreen.svg?style=flat\" alt=\"Swift Package Manager\" /\u003e\n    \u003c/a\u003e\n     \u003ca href=\"https://github.com/lordcodes/swifthooks/releases/latest\"\u003e\n         \u003cimg src=\"https://img.shields.io/github/release/lordcodes/swifthooks.svg?style=flat\" alt=\"Latest release\" /\u003e\n     \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/lordcodes\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/twitter-@lordcodes-blue.svg?style=flat\" alt=\"Twitter: @lordcodes\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nThis is **SwiftHooks** - a CLI tool to install Git hooks that can be distributed alongside a project and shared by all the contributors.\n\n\u0026nbsp;\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e • \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e • \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e • \u003ca href=\"#contributing-or-help\"\u003eContributing\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n\n#### ☑️ Store Git hooks within a project\n\nProvide Git hooks for all project contributors to share.\n\n#### ☑️ Easily install into Git\n\nSimply run a single command and a Git hook will be installed that runs your project-specific Git hooks.\n\n#### ☑️ Easily uninstall\n\nA command is provided to remove any installed hooks.\n\n\u0026nbsp;\n\n## Install\n\n### ▶︎ 🖥 Standalone via Swift Package Manager\n\nSwiftHooks can be easily installed globally using Swift Package Manager.\n\n```terminal\n git clone https://github.com/lordcodes/swifthooks-swift\n cd swifthooks-swift\n make install\n```\n\nThis will install swifthooks into `/usr/local/bin`. If you get a permission error it may be that you don't have permission to write there in which case you just need to adjust permissions using `sudo chown -R $(whoami) /usr/local/bin`.\n\nYou can uninstall it again using `make uninstall` which simply deletes it from `/usr/local/bin`.\n\n### ▶︎ 🍀 Mint\n\nYou can install SwiftHooks on MacOS using [Mint](https://github.com/yonaskolb/Mint) as follows:\n\n```terminal\nmint install lordcodes/swifthooks\n```\n\n### ▶︎ 📦 As a Swift package\n\nTo install SwiftHooks for use in your own Swift code, add it is a Swift Package Manager dependency within your `Package.swift` file. For help in doing this, please check out the Swift Package Manager documentation.\n\n```swift\n.package(url: \"https://github.com/lordcodes/swifthooks\", exact: \"0.4.0\")\n```\n\n\u0026nbsp;\n\n## Usage\n\n### Configure project hooks\n\nGit hooks should be stored inside a `.git-hooks` directory, which should be relative to the working directory. Inside create a folder named according to the required Git hook and then place the scripts you wish to run in an executable form within the hook folder.\n\nFor example:\n\n```terminal\n.git-hooks/commit-msg/prepend-jira-issue-id.sh\n.git-hooks/prepare-commit-msg/prepend-jira-issue-id.sh\n```\n\nEnsure the scripts are executable with `chmod a+x .git-hooks/commit-msg/prepend-jira-issue-id.sh`.\n\n### 🖥 Via the Standalone CLI\n\n```terminal\nUSAGE: swifthooks \u003cinstall|uninstall|version\u003e [-q|--quiet]\n\nARGUMENTS:\n  \u003cinstall\u003e               Installs Git hooks that run's hooks stored in project.\n  \u003cuninstall\u003e             Uninstalls Git hooks that were installed.\n  \u003cversion\u003e               Prints out the current version of the tool.\n\nOPTIONS:\n  -q, --quiet             Silence any output except errors \n```\n\n### 📦 As a Swift Package\n\nTo use SwiftHooks within your own Swift code, import and use the public API of `SwiftHooksKit`.\n\n```swift\nimport SwiftHooksKit\n\n// Configure printing\nSwiftHooks.shared.printer = ConsolePrinter(quiet: false)\n\n// Install hooks\ntry InstallHooksService().run()\n\n// Uninstall hooks\ntry UninstallHooksService().run()\n```\n\n## Contributing or Help\n\nIf you notice any bugs or have a new feature to suggest, please check out the [contributing guide](https://github.com/lordcodes/swifthooks/blob/master/CONTRIBUTING.md). If you want to make changes, please make sure to discuss anything big before putting in the effort of creating the PR.\n\nTo reach out, please contact [@lordcodes on Twitter](https://twitter.com/lordcodes).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordcodes%2Fswifthooks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordcodes%2Fswifthooks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordcodes%2Fswifthooks/lists"}