{"id":25287768,"url":"https://github.com/kshitiz-mhto/mock-my-commit","last_synced_at":"2026-05-09T10:07:34.154Z","repository":{"id":276844697,"uuid":"929946578","full_name":"Kshitiz-Mhto/mock-my-commit","owner":"Kshitiz-Mhto","description":"A Git commit message validator that roasts your bad commit messages with sarcastic, passive-aggressive one-liners.","archived":false,"fork":false,"pushed_at":"2025-02-18T01:42:56.000Z","size":305,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T02:37:04.893Z","etag":null,"topics":["cobra","emojis","git","git-hooks","golang","mistral-api","text-generation-model"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kshitiz-Mhto.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":"2025-02-09T19:02:35.000Z","updated_at":"2025-02-18T01:42:59.000Z","dependencies_parsed_at":"2025-02-10T19:31:40.057Z","dependency_job_id":"409f8f91-a11e-486e-b80a-03110f72299c","html_url":"https://github.com/Kshitiz-Mhto/mock-my-commit","commit_stats":null,"previous_names":["kshitiz-mhto/mock-my-commit"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fmock-my-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fmock-my-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fmock-my-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kshitiz-Mhto%2Fmock-my-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kshitiz-Mhto","download_url":"https://codeload.github.com/Kshitiz-Mhto/mock-my-commit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247517917,"owners_count":20951719,"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":["cobra","emojis","git","git-hooks","golang","mistral-api","text-generation-model"],"created_at":"2025-02-12T22:51:48.087Z","updated_at":"2026-05-09T10:07:34.140Z","avatar_url":"https://github.com/Kshitiz-Mhto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"./assets/logo.png\" alt=\"mock-my-commit logo\" width=280\u003e\n\u003c/p\u003e\n\nIntroducing **mock-my-commit** tool because your 'fixed stuff' commit messages clearly needed a reality check. Powered by the GEMINI text generation model API, this tool ensures that no matter how lazy your commits are, you'll get the judgment you deserve🤐.\n\n---\n\n### Installation\n\n\u003e Required\n\n- **Go (version 1.22 or higher):** [Go installation guide](https://go.dev/doc/install)\n- **GEMINI API Key:** [GEMINI API Keys console](https://aistudio.google.com/app/apikey)\n\n\u003cdetails\u003e\n  \u003csummary\u003eFor Linux OS, Mac OS and Windows\u003c/summary\u003e\n\n  ```bash\n  go install github.com/Kshitiz-Mhto/mock-my-commit@latest\n  ```\n\u003c/details\u003e\n\n\n---\n\n### Features\n\n- **Automated Validation**: Enforces Git commit message best practices before commits are registered.\n\n- **Cross-Platform Support**:  Supports **Linux**, **Mac** and **Windows** integration.\n\n- **Sarcastic Reviews**: Generates passive-aggressive feedback using GEMINI's API for poorly crafted messages.\n\n- **Seamless Integration**: Functions as a Git `commit-msg` hook to validate messages within your existing workflow.\n\n---\n\n### Project: mock-my-commit\n\nThis project, `mock-my-commit`, is built using the Go programming language. Below is a list of the commands offered by this tool.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/home.png\" alt=\"mock-my-commit Logo\" width=\"800\"\u003e\n\u003c/p\u003e\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/user-attachments/assets/0cbb068a-c37b-4798-bb22-985c0189bede\"\u003e\n    Watch Demo\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n### *Brief Command Screenshot*\n\n\u003e *setup-API-key*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/setup.png\" alt=\"mock-my-commit setup\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003e *install*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/install.png\" alt=\"mock-my-commit install \u003cscope\u003e\" width=\"800\"\u003e\n\u003c/p\u003e\n\n\u003e *run-hook*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/run_hook.png\" alt=\"mock-my-commit rub-hho\" width=\"800\"\u003e\n\u003c/p\u003e\n\n---\n\n## Technologies Used\n\n- [cobra](https://github.com/spf13/cobra) – CLI framework for handling commands.\n- [term](https://golang.org/x/term) – Terminal handling utilities.\n- [emoji](https://github.com/enescakir/emoji) – For adding emoji reactions to roasts.\n- [terminfo](https://github.com/xo/terminfo) – Terminal capabilities information.\n- [gookit/color](https://github.com/gookit/color) – Colored terminal output.\n\n---\n\n### Flowchart\n\n\u003e *setup flow-diagram*\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/setup_flow.png\" alt=\"mock-my-commit rub-hho\" width=\"800\"\u003e\n\u003c/p\u003e\n\n---\n\n## Local setup\n\n\u003cdetails\u003e\n  \u003csummary\u003esetup for Linux OS\u003c/summary\u003e\n\n  ### Prerequisites\n  \n  - **Go (version 1.22 or higher):** [Go installation guide](https://go.dev/doc/install).\n  - **Make:** Install using (e.g., `sudo apt-get install make` on Debian/Ubuntu).\n  - **GEMINI API Key:** [GEMINI API Keys console](https://aistudio.google.com/app/apikey).\n\n  ### Installation\n\n  1. Navigate to the project repo and run \n\n  ```bash\n  make build\n  ```\n\n  2. Create a symlink using \n\n  ```bash\n  sudo ln -s /path/to/bin/mock-my-commit /usr/local/bin/mock-my-commit\n  ```\n\n  3. Test the Executable\n\n  ```bash\n  mock-my-commit\n  ```\n\n  4. View the Manual\n\n  ```bash\n  mock-my-commit -h\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSetup for macOS\u003c/summary\u003e\n\n  ### Prerequisites\n  \n  - **Go (version 1.22 or higher)**: Install via [Homebrew](https://brew.sh/) (`brew install go`) or [official package](https://go.dev/doc/install)\n  - **Make**: Pre-installed with Xcode Command Line Tools (run `xcode-select --install` if missing)\n  - **GEMINI API Key**: [Get from GEMINI console](https://aistudio.google.com/app/apikey)\n\n  ### Installation\n\n  1. **Build the binary**  \n     ```bash\n     make build\n     ```\n     *For M1/M2 Macs: Ensure Rosetta isn't interfering with ARM builds*\n\n  2. **Create system symlink**  \n     ```bash\n     sudo ln -s $HOME/path/to/project/bin/mock-my-commit /usr/local/bin/mock-my-commit\n     ```\n\n  ### Verification\n  ```bash\n  mock-my-commit --version  # Check installation\n  mock-my-commit -h         # View manual\n  ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003esetup for Window OS\u003c/summary\u003e\n\n  ### Prerequisites\n  \n  - **Go (version 1.22 or higher):** [Go installation guide](https://go.dev/doc/install)\n  - **GEMINI API Key:** [GEMINI API Keys console](https://aistudio.google.com/app/apikey)\n\n  ### Installation\n\n  1. **Build the Project**  \n     Open PowerShell in the project directory and run:\n     ```bash\n     go build -o bin/mock-my-commit.exe main.go\n     ```\n\n  2. **Add to System PATH**  \n     Either:\n     - Move the `bin/mock-my-commit.exe` to a directory already in your PATH, **or**\n\n     - Create a symlink using:\n\n       ```powershell\n       # PowerShell (Admin)\n       New-Item -ItemType SymbolicLink -Path \"$env:SYSTEMROOT\\System32\\mock-my-commit.exe\" -Target \"C:\\full\\path\\to\\bin\\mock-my-commit.exe\"\n       ```\n\n  3. **Test the Executable**\n     ```bash\n     mock-my-commit\n     ```\n\n  4. **View the Manual**\n     ```bash\n     mock-my-commit -h\n     ```\n\n  \u003e **Note:** \n\n  \u003e - For symlinks, run PowerShell as Administrator\n  \u003e - Replace `C:\\full\\path\\to\\bin` with your actual binary path\n  \u003e - `$env:SYSTEMROOT`/`%SYSTEMROOT%` automatically resolves to `C:\\Windows` (or system root)\n\n\u003c/details\u003e\n\n---\n\n## Makefile Documentation  \n\nThis `Makefile` simplifies building, testing, installing, and cleaning the **mock-my-commit** project.  \n\n### Variables  \n- **BINARY_NAME**: Output binary name (`mock-my-commit`).  \n- **OUTPUT_DIR**: Directory for the built binary (`bin`).  \n- **MAIN_FILE**: Entry point of the Go project (`./main.go`).  \n- **INSTALL_DIR**: Installation path (`$GOBIN` or `$HOME/go/bin`).  \n\n### Targets\n\nThe Makefile has the following targets that automate the build process:\n\n#### `build`\n\n- **Description**: Builds the binary from the main Go file and outputs it to the `bin` directory.\n\n```bash\nmake build\n```\n\n#### `test`\n\n- **Description**: Runs the tests for the project using `go test`.\n\n```bash\nmake test\n```\n\n### `install`\n\n- **Description**: Builds the project and installs the binary to the `GOBIN` directory.\n\n```bash\nmake install\n```\n\n### `clean`\n\n  ```bash\n  make clean\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshitiz-mhto%2Fmock-my-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkshitiz-mhto%2Fmock-my-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshitiz-mhto%2Fmock-my-commit/lists"}