GithubHelp home page GithubHelp logo

integratergithub / glitter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from milo123459/glitter

0.0 0.0 0.0 272 KB

๐ŸŒŒโญ Git tooling of the future.

License: MIT License

Rust 69.70% Shell 30.30%

glitter's Introduction

Glitter

โฏ Glitter

Git tooling of the future.

โฏ ๐Ÿ‘€ Features

  • Config files (with defaults!)
  • Fast
  • Easy to use
  • Friendly errors
  • Multi branch support
  • Beautiful, as if it just rolled in Glitter!

โฏ ๐Ÿ“š Documentation

For proper docs, see here, this also includes examples.

โฏ โœ‹ What, how and why?

Glitter is a wrapper for Git essentially, allowing you to compress multiple commands into one. Glitter is written in rust which not only makes it fast but also efficient. We simply parse your .glitterrc (if it exists, if not it'll use the default config) and run a few git commands under the hood. Why? Simplicity. If you maintain a project, this is probably the thing for you.

โฏ ๐Ÿ˜€ Installation

Windows

Scoop

scoop install glitter

MacOS

Brew

brew tap eternalmoon1234/brew
brew install glitter

Linux

This is a bash script that can install on any platform other then windows, not just linux.

curl -fsSL https://raw.githubusercontent.com/Milo123459/glitter/master/install.sh | bash

Other

Check the releases and download the appropriate binary. Or build from source.

To build from source run this:

You need rust installed!

git clone https://github.com/Milo123459/glitter
cd glitter
cargo install --path .

To update:

cd glitter
git pull
cargo install --path .

๐Ÿ›‘ Please report any bug reports in issues, I'll try and respond ASAP

โฏ ๐ŸŽ‰ Get started

We're so happy to see your interest in Glitter! Leave a โญ if you like Glitter!

Firstly, lets create a .glitterrc - the configuration file for Glitter.

The glitterrc is basically JSON but a fancy extension. If we want to make it so it automatically templates our commit message we can do it like so:

{
    "commit_message": "$1($2): $3+"
}

and you can use it like so: glitter push chore deps bump deps, this would produce the message chore(deps): bump deps. As you probably understand, $ is the prefix of arguments, ie, you can do $1 for the first argument, $2 for the second, etc. The + basically means all arguments after the one you specify will be placed there. Lets say we want it to be chore(Deps): bump deps and it formats with that case. How? Easy. Lets add another key to our file:

{
    ...
    "commit_message_arguments": []
}

inside this key we can then add the argument to configure, in this case, the 2nd one, let's add that.

{
    ...
    "commit_message_arguments": [
        {
            "argument": 2
        }
    ]
}

and then, to configure the case, add the key case and watch the magic!

{
    ...
    "commit_message_arguments": [
        {
            "argument": 2,
            "case": "pascal"
        }
    ]

}

Running glitter push chore deps bump deps would then give us the commit message of chore(Deps): bump deps ๐ŸŽ‰!

โฏ ๐Ÿ“ท 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

Why is it fast sometimes but not the next?

That's reliant on your internet connection. - We are just running git commands under the hood. Git will be the thing taking it's sweet time.

โฏ ๐Ÿ“ฃ Available Cases

  • lower
  • upper
  • snake
  • screaming-snake
  • kebab
  • train
  • sentence
  • title
  • class
  • pascal

.. got a suggestion? Please make a discussion.

INSTALLATION ERRORS are to go in issues.

glitter's People

Contributors

milo123459 avatar suyashtnt avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.