Sane Utils (sn) is an opinionated CLI suite to streamline many command line work.
- Music Conversion: Convert audio files (FLAC, Opus) to MP3 format with embedded cover art, and format M3U playlists for compatibility.
- Archive Operations: Compress and extract files using 7z, with support for password protection.
- YouTube Audio Download: Download audio from YouTube URLs using
yt-dlpwith embedded thumbnails and metadata. - File and Directory Search: Search for words within files, or locate files and directories by name, with optional deletion of matched items.
- Todo Management: An interactive terminal-based application for managing todo lists with contexts, priorities, and more.
- Smart CD: Change directory with TUI and aliases.
If you want to quickly try it without installing it permanently:
- Ensure Nix is installed on your system with flake support enabled.
- Run the CLI directly from GitHub:
You can run the stable build:
(Replace
nix run github:infraflakes/sutils -- [args]
[args]with any command and its arguments, e.g.,nix run github:infraflakes/sutils -- music convert mp3 /path/to/dir)
For users not using Nix, the CLI can be downloaded as a single executable binary.
-
Download the latest release: Visit the GitHub Releases page and download the wanted binary.
-
Make the binary executable:
chmod +x sn
-
Move the binary to your PATH (optional but recommended):
sudo mv sn /usr/local/bin/
-
Or if you want quick script:
curl -fsSL https://raw.githubusercontent.com/infraflakes/sutils/main/install.sh -o install.sh chmod +x install.sh ./install.sh
If you have a Go environment set up, you can build from source.
-
Clone the repo:
git clone https://github.com/infraflakes/sutils cd sutils -
Build the binary: The included
Makefileprovides an easy way to build the application:make build
Alternatively, you can use the standard Go command:
go build -o sn .
In order for sn cd to work you need to generate shell functions:
Add these to your shell config:
Bash:
```
eval "$(sn cd init bash)"
```
Zsh:
```
eval "$(sn cd init zsh)"
```
Fish:
```
sn cd init fish | source
```
Contributions are welcome! Feel free to open issues or submit pull requests.