{"id":16338421,"url":"https://github.com/milo123459/glitter","last_synced_at":"2025-04-06T18:13:42.405Z","repository":{"id":36960168,"uuid":"338325723","full_name":"Milo123459/glitter","owner":"Milo123459","description":"🌌⭐ Git tooling of the future.","archived":false,"fork":false,"pushed_at":"2024-04-05T17:38:10.000Z","size":435,"stargazers_count":245,"open_issues_count":3,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T17:09:22.892Z","etag":null,"topics":["cargo","git","glitter","hacktoberfest","rust"],"latest_commit_sha":null,"homepage":"","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/Milo123459.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Milo123459"}},"created_at":"2021-02-12T13:23:11.000Z","updated_at":"2024-11-27T08:33:28.000Z","dependencies_parsed_at":"2024-08-04T08:08:31.676Z","dependency_job_id":"0b5e0ac9-cffc-4b75-9284-03900b9c4223","html_url":"https://github.com/Milo123459/glitter","commit_stats":{"total_commits":468,"total_committers":9,"mean_commits":52.0,"dds":0.4658119658119658,"last_synced_commit":"2b6230084c6cf15e59ca3c1e9c934d2e976802fb"},"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milo123459%2Fglitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milo123459%2Fglitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milo123459%2Fglitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Milo123459%2Fglitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Milo123459","download_url":"https://codeload.github.com/Milo123459/glitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526753,"owners_count":20953143,"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":["cargo","git","glitter","hacktoberfest","rust"],"created_at":"2024-10-10T23:50:31.851Z","updated_at":"2025-04-06T18:13:42.381Z","avatar_url":"https://github.com/Milo123459.png","language":"Rust","funding_links":["https://github.com/sponsors/Milo123459"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\r\n  \u003cimg src=\"./assets/glitter.png\" alt=\"Glitter\" /\u003e\r\n\u003c/p\u003e\r\n\u003ch1 align=\"center\"\u003e❯ Glitter\u003c/h1\u003e\r\n\u003ch3 align=\"center\"\u003e\r\nGit tooling of the future\r\n\u003ch3\u003e\r\n\u003ch1\u003e\u003c/h1\u003e\r\n\r\n## Features\r\n- Config files\r\n- Simple errors\r\n- Glitter Hooks (Git hooks natively built into Glitter)\r\n\r\n## What is glitter?\r\n\r\nGlitter is a tool for generating and structuring commit messages via arguments passed to the tool. It allows you to configure it extensively and easily.\r\n\r\n## Installation\r\n\r\n**Windows**\r\n\r\n[Scoop](https://scoop.sh)\r\n\r\n```\r\nscoop install glitter\r\n```\r\n\r\n**Linux**\r\n\r\n*This is a bash script that can install on **any** platform other than **windows**, not just linux.*\r\n\r\n```\r\ncurl -fsSL https://raw.githubusercontent.com/Milo123459/glitter/master/install.sh | bash\r\n```\r\n\r\n**Other**\r\n\r\nCheck the [releases](https://github.com/Milo123459/glitter/releases) and download the appropriate binary. Or build from source.\r\n\r\nTo build from source run this:\r\n\r\n*You need rust installed!*\r\n\r\n```\r\ncargo install --git https://github.com/Milo123459/glitter\r\n```\r\n\r\n## Get started\r\n\r\nA simple example when using glitter would be a 3 step commit template. For example, something to turn `glitter push fix docs fix typo` into `fix: docs: fix typo`.\r\n\r\nThis example covers using type_enums, hooks and how glitters argument system works.\r\n\r\nFirstly, we can define our `.glitterrc` to support 2 or more arguments.\r\n\r\n```json\r\n{\r\n    \"commit_message\": \"$1: $2: $3+\"\r\n}\r\n```\r\nThis snippet alone now allows us to do `glitter push fix docs fix typo` and would template to `fix: docs: fix typo`. $1 is the first argument passed to glitter push, $2 is the second, and $3+ means that the third argument and anything after that should take it's place.\r\n\r\nNow, lets take a look at `type_enums` - a way of validating arguments.\r\n\r\nLet's add a `commit_message_arguments` to our `.glitterrc`:\r\n```json\r\n{\r\n    \"commit_message\": \"$1: $2: $3+\",\r\n    \"commit_message_arguments\": [\r\n        {\r\n            \"argument\": 1,\r\n            \"case\": \"lower\",\r\n            \"type_enums\": [\r\n                \"fix\",\r\n                \"feat\"\r\n            ]\r\n        }\r\n    ]\r\n}\r\n```\r\nThis snippet now means that the first argument will:\r\n- be converted to lower-case\r\n- matched against the type_enums, and if it does not match, it fails\r\n\r\nFor example, `glitter push fix docs fix typo` would work, but `glitter push chore docs fix typo` would not, because `chore` isn't in the type enums.\r\n\r\nNext: glitter hooks.\r\n\r\nGlitter hooks are like git hooks, but always run before `git add` - it allows you to run/make your own hooks with ease.\r\n\r\nAn example of a hook to run `cargo fmt` would look like this:\r\n```json\r\n{\r\n    \"custom_tasks\": [\r\n        {\r\n            \"name\": \"fmt\",\r\n            \"execute\": [\r\n                \"cargo fmt\"\r\n            ]\r\n        },\r\n    ],\r\n    \"hooks\": [\"fmt\"]\r\n}\r\n```\r\nThis defines a custom task, which can also be run via `glitter cc` (for example `glitter cc fmt` would run `cargo fmt`). We then have a hooks array which specifies a custom task to run before running `git add`.\r\n\r\n## FAQ\r\n\r\n\u003e Does **\"this hello\"** count as 1 or 2 arguments?\r\n\r\n**This example counts as 1.** For example `glitter push hello \"world how\" are you` would give the following arguments:\r\n```\r\n1: hello\r\n2: world how\r\n3: are\r\n4: you\r\n```\r\n\r\n## Available Cases\r\n\r\n- lower\r\n- upper\r\n- snake\r\n- screaming-snake\r\n- kebab\r\n- train\r\n- sentence\r\n- title\r\n- class\r\n- pascal\r\n\r\n![Alt](https://repobeats.axiom.co/api/embed/94616a17e7b0081aad0b1634999ac54c23bd5e5c.svg \"Repobeats analytics image\")\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilo123459%2Fglitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilo123459%2Fglitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilo123459%2Fglitter/lists"}