https://github.com/safetimamovic/grit
General Rust Interface Tool β A do-it-all CLI built with Rust. GRIT is a modular, general-purpose command-line tool written in Rust, designed to provide a variety of small but powerful utilities under one interface. It's intended to grow into a flexible toolbox of developer-friendly commands.
https://github.com/safetimamovic/grit
cli cli-tool general-purpose personal-project rust
Last synced: 3 months ago
JSON representation
General Rust Interface Tool β A do-it-all CLI built with Rust. GRIT is a modular, general-purpose command-line tool written in Rust, designed to provide a variety of small but powerful utilities under one interface. It's intended to grow into a flexible toolbox of developer-friendly commands.
- Host: GitHub
- URL: https://github.com/safetimamovic/grit
- Owner: SafetImamovic
- Created: 2025-06-17T14:36:09.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-07-19T22:49:47.000Z (3 months ago)
- Last Synced: 2025-07-19T22:58:21.121Z (3 months ago)
- Topics: cli, cli-tool, general-purpose, personal-project, rust
- Language: Rust
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GRIT
**G**eneral **R**ust **I**nterface **T**ool β A do-it-all CLI built with Rust.
**GRIT** is a modular, general-purpose command-line tool written in Rust, designed to provide a variety of small but powerful utilities under one interface. It's intended to grow into a flexible toolbox of developer-friendly commands.
> But it's mostly a personal project built for personal needs :)
---
## π Installation
### From source
Make sure you have Rust installed. Then run:
```bash
cargo install --path .
````Or clone and install manually:
```bash
git clone https://github.com/SafetImamovic/GRIT
cd grit
cargo install --path .
```---
## π Usage
```bash
grit
```### Examples
```bash
grit -l
```
**Output:**
```bash.g8"""bgd `7MM"""Mq. `7MMF'MMP""MM""YMM
.dP' `M MM `MM. MM P' MM `7
dM' ` MM ,M9 MM MM
MM MMmmdM9 MM MM
MM. `7MMF' MM YM. MM MM
`Mb. MM MM `Mb. MM MM
`"bmmmdPY .JMML. .JMM..JMML. .JMML.General Rust Interface Tool
multi-purpose CLI utility written in Rust
(ASCII art generated @ https://www.patorjk.com/software/taag/
[font: Georgia11])Usage: grit [NAME] [ARGS]... [COMMAND]
Commands:
pwd Print the present working directory
sysinfo Detailed info about the system
apps List all installed applications
list-secret List all hidden commands
help Print this message or the help of the given subcommand(s)Arguments:
[NAME] Execute a secret command defined in ~/.config/.grit-secret.toml
[ARGS]... Pass additional arguments to the secret commandOptions:
-h, --help Print help
-V, --version Print version
``````bash
grit pwd
```**Output:**
```
/home/youruser/projects/grit
```---
## π§ Features
- β `grit pwd`
Prints the current working directory as a single clean line β just like `pwd` on Unix-based systems.
#### β Why this exists
In PowerShell, running the built-in `Get-Location` (or its alias `pwd`) returns output in a *formatted object* table:
```powershell
PS > pwdPath
----
C:\Users\Safet\Projects\grit
```This format is not ideal when you're scripting or trying to pipe it into something like `clip.exe`. For example, to get just the path as plain text, you'd need to do something awkward like:
```powershell
(pwd).Path | Select-Object -Last 1 | Set-Clipboard
```Or even more verbose:
```powershell
(Get-Location).Path | ForEach-Object { $_ } | clip.exe
```This is frustrating when you're used to the Unix (More like `WSL`) experience of:
```bash
pwd | clip.exe
```With `grit pwd`, you get consistent, cross-platform output β no table formatting, no extra properties β just the raw path.
#### π¦ Example
```powershell
PS > grit pwd | clip.exe
```Thatβs it. Clean and pipeable. No weird formatting. No extra parsing.
---
Let me know if youβd like to add similar Unix-friendly fixes or pipe-safe utilities to GRIT β itβs a great theme for building small but impactful tools.
More functionality will be added over time, each one designed to be intuitive and easily accessible through subcommands.
---
## Defining Secret Commands
**GRIT** CLI supports **secret commands** that can be dynamically loaded from a configuration file called `.grit-secret.toml`. This allows you to add custom commands without modifying the code.
### File Location and Name
Within your `home`/`~` directory create a `.config` directory, then create `.grit-secret.toml` within that directory.
```
mkdir -p ~/.config
touch ~/.config/.grit-secret.toml
``````
~/
βββ .config/
βββ .grit-secret.toml
```### File Format
The `.grit-secret.toml` file uses the TOML format, with each secret command defined as a table.
Example `.grit-secret.toml`:
```toml
[greet]
description = "Greets the user"
command = "echo Hello from TOML"[date]
description = "Shows the current date"
command = "date"
```### Fields
* **description**: A short description of the command, displayed when listing secret commands.
* **command**: The shell command that will be executed when the secret command is invoked.### Using Secret Commands
* To **list** all secret commands:
```bash
grit list-secrets
```* To **run** a secret command:
```bash
grit greet
```This will execute the shell command defined for `greet`.
### Notes
* Secret commands are executed via the system shell (`sh` on Unix, `powershell` on Windows).
* You can pass additional arguments after the secret command name if your implementation supports argument substitution.
* Keep your `.grit-secret.toml` file secure, especially if it contains sensitive commands.
* The CLI tool will show an error if you try to run an undefined secret command.## π¦ Planned Commands
* `grit find ` β A fast file search tool
* `grit sysinfo` β Show basic system information
* `grit uuid` β Generate a UUID
* `grit hash ` β Hash a file using SHA algorithms
* ...and more---
## π€ Contributing
Got a neat idea or small utility that would fit? Feel free to open a PR or issue. GRIT is designed to be modular, making it easy to add new subcommands.
---
## π License
MIT License Β© 2025 \[@SafetImamovic]
---
## π‘ Inspiration
Like its name suggests, **GRIT** is about resilience and utility β a tool that grows with you and your workflow.