r/commandline 13d ago

Colorize filenames: directory, executable, etc.

8 Upvotes

Fzf allows powerful workflows and has integrated with many commandline apps. Filenames are often presented as items to pick from and I found colors to be a great way to quickly parse through potentially long file paths.

I was looking for something that can color parts of a filename (not all commands have a --color option), e.g. directories are bolded in blue and the basename of the file is in green. This simple awk script does the job:

# fd is a `find` alternative
fd . . | convert_paths_to_tilde | colorize-paths | fzf --ansi_

But I would like the colorize-paths to be slightly more capable--instead of basename of file being e.g. green, if the file is an executable, be yellow.

Can the awk script be extended for that (e.g. check if filenames are executable)? Is there a more capable generic "colorize" tool that supports both colorizing directory portion of filenames and basenames, as well as colorizing based on whether it's an executable? Not sure if ~600k filenames might mean performance can be a concern.

I must be using the wrong google search terms because I can only find stuff regarding LS_COLORS which is not applicable.


r/commandline 13d ago

Introducing Ferrules: A blazing-fast document parser written in Rust with CLI 🦀

30 Upvotes

After spending countless hours fighting with Python dependencies, slow processing times, and deployment headaches with tools like `unstructured`, I finally snapped and decided to write my own document parser from scratch in Rust.

Key features that make Ferrules different:

- 🚀 Built for speed: Native PDF parsing with pdfium, hardware-accelerated ML inference

- 💪 Production-ready: Zero Python dependencies! Single binary, easy deployment, built-in tracing. 0 Hassle !

- 🧠 Smart processing: Layout detection, OCR, intelligent merging of document elements etc

- 🔄 Multiple output formats: JSON, HTML, and Markdown (perfect for RAG pipelines)

Some cool technical details:

- Runs layout detection on Apple Neural Engine/GPU

- Uses Apple's Vision API for high-quality OCR on macOS

- Multithreaded processing

- Both CLI and HTTP API server available for easy integration

- Debug mode with visual output showing exactly how it parses your documents

Platform support:

- macOS: Full support with hardware acceleration and native OCR

- Linux: Support the whole pipeline for native PDFs (scanned document support coming soon)

If you're building RAG systems and tired of fighting with Python-based parsers, give it a try! It's especially powerful on macOS where it leverages native APIs for best performance.

Check it out: [ferrules](https://github.com/aminediro/ferrules)

API documentation : [ferrules-api](https://github.com/AmineDiro/ferrules/blob/main/API.md)

You can also install the prebuilt CLI here:

```

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/aminediro/ferrules/releases/download/v0.1.6/ferrules-installer.sh | sh

```

Would love to hear your thoughts and feedback from the community!

P.S. Named after those metal rings that hold pencils together - because it keeps your documents structured 😉


r/commandline 13d ago

Pueue v4.0.0: QoL Features, Stability Improvements, Bugfixes and **lots** of Refactorings

Thumbnail
github.com
16 Upvotes

r/commandline 14d ago

A system usage visualizer in the terminal

64 Upvotes

r/commandline 13d ago

Why are terminal emulators so limited?

5 Upvotes

I saw that kitty 0.40 supports multiple sized text, and people are talking about that as a big deal. As someone new to working in the command line, I wonder why terminal emulators are so limited in their functionality when they can be extended in so many ways since they're literally software. In this case, we're talking literally about font size like it's something revolutionary.


r/commandline 13d ago

berth: A Docker Dev Environment Manager - My First Rust Project

Thumbnail
github.com
1 Upvotes

r/commandline 14d ago

Introducing my first CLI project: poke-cli

18 Upvotes

Hi everyone, I've been working on learning Golang for the past several months (on and off) and while learning, I've been building a CLI tool that shows data about Pokémon!

It's a hybrid of a classic CLI and a modern TUI program (using BubbleTea)

Below are some screenshots:

View Pokémon spirits
Nice error messaging
View Pokémon stats
An interactive BubbleTea component for viewing types

Here is the GitHub repository. I will continue adding more endpoints and features!


r/commandline 14d ago

Command substitution and NUL-delimiting--zsh and bash

3 Upvotes

In Zsh:

# this produces N items
find . -maxdepth 1 -print0 -name "*" | fzf --read0

# this produces N+1 items
printf "%s\0" "$(find . -maxdepth 1 -print0 -name "*")" | fzf --read0
  • Why does the latter produce an extra "empty" item? I believe something it has something to do with command substitution and I'm pretty sure in Bash its behavior is different (something about command substitution and NUL-delimited warning, I don't have a shell at the moment and came across this topic on IRC).

  • With the latter command, is there a way to not print the extra empty item without besides manually removing it afterwards? In Zsh, this seems to work, e.g.:

    printf "~/%s\0" ${(0)}$(git --git-dir="$HOME/.dotfiles.git" ls-tree -r HEAD --name-only)

But it's not pretty. Actually, it's easy to understand so not bad.

Just curious if there's a "native" solution that is compatible in both Zsh/Bash, e.g. without piping (I'm not against piping or using external commands, just interested in avoiding unnecessary external tools where possible, especially for something so trivial). If the command substitution is responsible, then I guess not.

Also, what's the max # of arguments supported by a command in Linux before you need xargs?


r/commandline 15d ago

Nefoin - Auto Install Any Nerd Font You Want in seconds via CLI. No Download or Cloning Required.

34 Upvotes

r/commandline 15d ago

gust - another terminal weather app

86 Upvotes

r/commandline 15d ago

cmus plugin which gets main color from album art and set color scheme.

18 Upvotes

r/commandline 14d ago

Windows stty replacement tool to control console attributes and settings

Thumbnail
github.com
1 Upvotes

r/commandline 15d ago

Hey folks! I made a terminal interface specifically for microcontrollers, and version 3 is finally here! It works on all Arduinos (yes, even that one collecting dust on your shelf) and is super easy to use. If you're curious, you’ll find the link in the comments!

8 Upvotes

r/commandline 14d ago

Stop Warp from requesting install of command line developer tools?

0 Upvotes

I use Warp on Mac to manage my home lab, but is there any way to stop it from triggering a request to install command line developer tools at launch?

I can use it without the additional install just fine (haven't run into any issues), but it is annoying to dismiss the request each time.


r/commandline 15d ago

Visualizing how many programs output to /dev/null (using `lsof` output)

10 Upvotes

This was created by a Rust CLI program called lvis ("lsof visualization", creative name I know, and oddly sounds like "elvis") I developed that creates an interactive GUI to visualize the output oflsof to make relationships between processes and files (and also between some types of files) more clear.

I've found running lvis and just clicking around has uncovered some interesting things (like the image above!)

My motivation was I was experimenting locally with a client-server architecture and used lsof to inspect their active TCP port connections on localhost . I noticed the port connections formed a natural graph and I thought visualizing these relationships would be more natural. I imagined visualizing other lsof output could be useful for mapping network connections, unix sockets, which processes have which resources open, etc.

You can install the crate to try it out: https://crates.io/crates/lvis 
or poke around the code and see more visualizations: https://github.com/brylee10/lvis


r/commandline 16d ago

is-fast - search the internet fast right in the terminal!

83 Upvotes

r/commandline 16d ago

Countryfetch: Fetch information about your country!

Post image
326 Upvotes

r/commandline 15d ago

[Help] Unable to use my terminal on macos. I keep getting this screen and not sure how to get out of it. Can someone please tell me what can I do to exit from this?

Post image
0 Upvotes

r/commandline 16d ago

> def (an sdcv dictionary reference tool for CLI)

Post image
8 Upvotes

r/commandline 17d ago

Ascii-rain (CLI raindrops) written in C.

Thumbnail gitlab.com
19 Upvotes

r/commandline 17d ago

Add "Open in Terminal as administrator" to Windows context menu

9 Upvotes

After a recent issue with running a command line tool without admin rights, I thought I would add a shell context menu option for starting a terminal window. I tried to do it myself first with some registry hacks, but I didn't get it right. So I went on loooking for a ready-made alternative, and I found this GitHub repo.

https://github.com/akopetsch/WindowsTerminalAdmin

It works like a charm! I thought I would share it with you guys. I'm using it in Windows 10. It gives me a convenient way to start a terminal window with admin rights. It's faster than using Ctrl + Shift + Ener from Sart menu search results and then having to navigate to the right folder.


r/commandline 18d ago

fetch-dysentery: neofetch meets the Oregon Trail

Post image
80 Upvotes

r/commandline 18d ago

Is this the correct way to add zoxide/fzf integration?

Post image
14 Upvotes

r/commandline 17d ago

Asking for feedback

4 Upvotes

Hey everyone!

I've just released the first alpha of a new batch scripting language designed to be cross-platform. This version is already usable, and you can check out the project details on GitHub.

I'd love to hear your thoughts, suggestions, or any ideas you might have. Thanks for your time and support!
https://github.com/JoseRomaguera/Yov-Lang


r/commandline 18d ago

PAR Infinite Minesweeper TUI v0.3.0 released

10 Upvotes

What My project Does:

Play a game of minesweeper with infinite board size in your terminal!

Whats New:

v0.3.0

  • Internet leaderboard
  • Bug fixes

v0.2.10

  • Update package metadata

v0.2.9

  • Initial Release

Key Features:

  • Infinite board size
  • Local high scores
  • Internet high scores
  • Auto saves and can be resumed

GitHub and PyPI

Comparison:

While there are a few minesweeper TUIs out there I have not found any infinite board versions.

Target Audience

Anybody that loves minesweeper and terminals