🌌⭐cosmo is a wrapper for Git essentially, allowing you to compress multiple commands into one

Overview

Cosmo

❯ Cosmo

Git tooling of the future

New feature: Cosmo hooks!

Click here for more info!

❯ πŸ‘€ Features

  • Config files (with defaults!)
  • Fast
  • Easy to use
  • Friendly errors (how to fix them included!)
  • Multi branch support (defaults to the one you are on!)
  • Beautiful, as if it just rolled in Cosmo!
  • Cosmo Hooks (Git hooks but Cosmo)

❯ πŸ“š Documentation

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

❯ βœ‹ What, how and why should you use Cosmo?

cosmo is a wrapper for Git essentially, allowing you to compress multiple commands into one. Cosmo is written in rust which not only makes it fast but also efficient. We simply parse your .cosmorc (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 cosmo

Linux

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

curl -fsSL https://raw.githubusercontent.com/Jacks123459/cosmo/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/Jacks123459/cosmo
cd cosmo
cargo install --path .

To update:

cd cosmo
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 Cosmo! Leave a ⭐ if you like Cosmo!

Firstly, lets create a .cosmorc - the configuration file for Cosmo.

The cosmorc 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: cosmo 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 cosmo 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 cosmo 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.

❯ 🎣 Cosmo Hooks

Cosmo Hooks are Git hooks without the bash. Here is an example of how we can run cargo fmt before commiting to this codebase.

{
    ...
    "custom_tasks": [
        {
            "name": "fmt",
            "execute": ["cargo fmt"]
        }
    ],
    "hooks": ["fmt"]
}

From this, before we commit, cargo fmt will be executed. You can add more commands to be executed by simply adding another command to the fmt field, or, adding another custom_task and referencing that in hooks. If you need help, you can make a discussion, and if you find a bug, please make a bug report!

❯ πŸ“£ 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.

Hope Cosmo helps you!

You might also like...
Git Explorer: cross-platform git workflow improvement tool inspired by Magit
Git Explorer: cross-platform git workflow improvement tool inspired by Magit

Gex Git workflow improvement CLI tool inspired by Magit. This project is still under initial development, but I am actively dogfooding it and features

A super simple /sbin/init for Linux which allows running one and only one program

Summary High-performance /sbin/init program for Linux This is designed to do literally nothing but accept binaries over the network and run them as a

Turn static CLI commands into TUIs with ease
Turn static CLI commands into TUIs with ease

lazycli Turn static CLI commands into TUIs with ease Demo: Usage Pick a command that spits out either a list or table of content, like ls, docker ps,

Rust wrapper for gphoto2 (mirror of https://git.maxicarlos.de/maxicarlos08/gphoto2-rs)

GPhoto2-rs Rust bindings to libgphoto2 What about gphoto-rs? I know about the other crate (gphoto and gphoto2-sys which was created by @dcuddeback, bu

koyo is a cli tool that lets you run commands as another user. It is similar to doas or sudo.

koyo is a cli tool that lets you run commands as another user. It is similar to doas or sudo.

A cli tool that let's you map commands to a shorter alias
A cli tool that let's you map commands to a shorter alias

Runner πŸ€” What is this? A cli tool that let's you map commands to a shorter alias. Run the mapped command using the ALIAS_NAME. runner ALIAS_NAME

GPT-3 powered CLI tool to help you remember bash commands.

Rusty: GPT-3 Powered CLI Tool Convert natural language into executable commands directly from the terminal! Open source CLI tool powered by OpenAI (br

Yet Another Texture Packer - a small and simple CLI application to pack multiple textures/sprites into a texture atlas/sprite sheet

YATP (Yet Another Texture Packer) A small and simple CLI application to pack multiple textures/sprites into a texture atlas/sprite sheet. Installation

zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.
zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets you're watching easily into watchlists for easy access on your terminal.

zigfi zigfi is an open-source stocks, commodities and cryptocurrencies price monitoring CLI app, written fully in Rust, where you can organize assets

Owner
Jack
hi, im jack β€’ full-stack knowledge β€’ in love with weight lifting
Jack
gfold is a CLI-driven application that helps you keep track of multiple Git repositories.

gfold is a CLI-driven application that helps you keep track of multiple Git repositories.

Nick Gerace 215 Jan 4, 2023
A Rust CLI tool that helps you enforce Git policies through Git hooks both server and client side

GitPolicyEnforcer This is a command line utility written in Rust, that helps you utilize Git hooks, to enforce various policies. It currently supports

Vagelis Prokopiou 4 Aug 14, 2022
Workflows make it easy to browse, search, execute and share commands (or a series of commands)--without needing to leave your terminal.

Workflows The repo for all public Workflows that appear within Warp and within commands.dev. To learn how to create local or repository workflows, see

Warp 369 Jan 2, 2023
Workflows make it easy to browse, search, execute and share commands (or a series of commands)--without needing to leave your terminal.

Workflows The repo for all public Workflows that appear within Warp and within commands.dev. To learn how to create local or repository workflows, see

Warp 227 Jun 1, 2022
Lazygit - simple terminal UI for git commands

A simple terminal UI for git commands, written in Go with the gocui library. Rant time: You've heard it before, git is powerful, but what good is that

Jesse Duffield 31.8k Jan 3, 2023
A crate that allows you to mostly-safely cast one type into another type.

A crate that allows you to mostly-safely cast one type into another type. This is mostly useful for generic functions, e.g. pub fn foo<S>(s: S) {

Bincode 3 Sep 23, 2023
A CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes

This is a CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes, as well as download any pastes you want.

Gabriel Fontes 1 Jan 26, 2022
Dura - You shouldn't ever lose your work if you're using Git

Dura Dura is a background process that watches your Git repositories and commits your uncommitted changes without impacting HEAD, the current branch,

Tim Kellogg 4.1k Jan 8, 2023
git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.⛰️

git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers. The changelog template can be customized with a configuration file to match the desired format.

Orhun ParmaksΔ±z 5k Jan 9, 2023
A git sub-command to view your git repository in the web browser

git-view A git sub-command to view your git repository in the web browser! About Are you also frustrated from moving your hands away from the keyboard

Hamothy 5 Sep 26, 2022