Skip to content

Jannael/Glinter

Repository files navigation



Glinter

Glinter is a high-performance, transparent Git wrapper built with Bun.

Commands

Aliases

Quick start

Preview

Badge

Preview Copy
Glinter [![Glinter](https://glinter.jannael.com/badge.svg)](https://glinter.jannael.com)
Video.Project.4.mp4

Screenshots

g add g commit
glinter add glinter commit

Security

Security is a top priority for this project.

This project uses Bun as its runtime and package manager. You don't need to worry about package vulnerabilities — the bunfig.toml configuration includes minimumReleaseAge = 259200 (3 days), which prevents newly published packages from being installed automatically. This protects against supply chain attacks that have become increasingly common in the npm ecosystem.

Features

  • Abbreviation: You can use g instead of git.

  • Safe by Default: Automatically filters and prevents accidental staging of sensitive files: .env and node_modules.

  • Transparent Wrapper: For every other command (like commit, push, log, or status), Glinter acts as a direct tunnel to Git. It preserves all original colors, formatting, and interactive features of the native Git CLI.

Test environment

  • for windows i used my own laptop (windows 11) so if you have a problem please create an issue

  • for linux i used WSL (windows subsystem linux) with a kali-linux vm so if you have a problem please create an issue

How it works

Glinter is designed to be as "natural" as possible, meaning it shouldn't feel like a wrapper at all.

1. The Transparent Proxy

In src/index.ts, Glinter uses Bun.spawn with stdio: 'inherit'. This is a low-level operation that connects the standard input, output, and error streams of the Git process directly to your terminal.

  • Result: Git "knows" it's in a real terminal, so it correctly detects colors and allows for interactive prompts (like credential entry).

2. Reliable Status Parsing

For the interactive add feature, Glinter runs git status --porcelain.

  • Why?: Standard git status output is designed for humans and can change based on your Git version or system language. --porcelain is a machine-readable format that is consistent across all environments, making the file detection 100% reliable.

3. Interactive Selection

Using the @clack/prompts library, Glinter transforms the raw status data into a selectable list.

  • The selection logic uses Bun's high-speed shell to execute the final git add command, correctly escaping filenames to handle spaces and special characters.

Installation

To use Glinter as your primary Git interface (e.g., using the command g):

npm install -g @jannael/glinter

For Development

  1. Clone the repo
  2. Install dependencies: bun install
  3. Link the binary: bun link

now you can simply run:

g add           # Opens the interactive selector
g commit        # Opens commit type + message prompt
g add <file>    # Runs standard git add <file>
g commit -m ""  # Runs standard git commit -m ""
g status        # Runs standard git status
g push          # Runs standard git push

About

Git wrapper built with Bun. The best way to work with Git!

Topics

Resources

License

Stars

Watchers

Forks

Contributors