MCPcopy Index your code
hub / github.com/Milo123459/glitter

github.com/Milo123459/glitter @v1.6.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.6.6 ↗ · + Follow
35 symbols 50 edges 5 files 3 documented · 9% updated 2y agov1.6.6 · 2024-04-05★ 243
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Glitter

❯ Glitter

Git tooling of the future

## Features - Config files - Simple errors - Glitter Hooks (Git hooks natively built into Glitter) ## What is glitter? Glitter is a tool for generating and structuring commit messages via arguments passed to the tool. It allows you to configure it extensively and easily. ## Installation **Windows** [Scoop](https://scoop.sh)
scoop install glitter
**Linux** *This is a bash script that can install on **any** platform other than **windows**, not just linux.*
curl -fsSL https://raw.githubusercontent.com/Milo123459/glitter/master/install.sh | bash
**Other** Check the [releases](https://github.com/Milo123459/glitter/releases) and download the appropriate binary. Or build from source. To build from source run this: *You need rust installed!*
cargo install --git https://github.com/Milo123459/glitter
## Get started A 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`. This example covers using type_enums, hooks and how glitters argument system works. Firstly, we can define our `.glitterrc` to support 2 or more arguments.
{
    "commit_message": "$1: $2: $3+"
}
This 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. Now, lets take a look at `type_enums` - a way of validating arguments. Let's add a `commit_message_arguments` to our `.glitterrc`:
{
    "commit_message": "$1: $2: $3+",
    "commit_message_arguments": [
        {
            "argument": 1,
            "case": "lower",
            "type_enums": [
                "fix",
                "feat"
            ]
        }
    ]
}
This snippet now means that the first argument will: - be converted to lower-case - matched against the type_enums, and if it does not match, it fails For 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. Next: glitter hooks. Glitter hooks are like git hooks, but always run before `git add` - it allows you to run/make your own hooks with ease. An example of a hook to run `cargo fmt` would look like this:
{
    "custom_tasks": [
        {
            "name": "fmt",
            "execute": [
                "cargo fmt"
            ]
        },
    ],
    "hooks": ["fmt"]
}
This 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`. ## FAQ > Does **"this hello"** count as 1 or 2 arguments? **This example counts as 1.** For example `glitter push hello "world how" are you` would give the following arguments:
1: hello
2: world how
3: are
4: you
## Available Cases - lower - upper - snake - screaming-snake - kebab - train - sentence - title - class - pascal ![Alt](https://repobeats.axiom.co/api/embed/94616a17e7b0081aad0b1634999ac54c23bd5e5c.svg "Repobeats analytics image")

Core symbols most depended-on inside this repo

run_cmd
called by 7
src/cli.rs
get_current_epoch
called by 3
src/cli.rs
run
called by 2
src/lib.rs
get_commit_message
called by 2
src/cli.rs
parse
called by 1
src/get_and_parse.rs
dry
called by 1
src/config.rs
raw
called by 1
src/config.rs
no_verify
called by 1
src/config.rs

Shape

Function 25
Class 5
Method 5

Languages

Rust100%

Modules by API surface

src/cli.rs15 symbols
src/config.rs12 symbols
src/get_and_parse.rs4 symbols
src/main.rs2 symbols
src/lib.rs2 symbols

For agents

$ claude mcp add glitter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page