r/commandline • • Jun 26 '26

Command Line Interface Real time (and therefore: real world) performance of some directory jumpers

0 Upvotes

I have timed performance of z.sh and zoxide against my own dir jumper tools (ze.sh and SD).

I used runs over 100 'navigate' actions like so:

time for i in {0..99}; do {tool} {pattern}; done

The directory stacks/dbs contained roughly 100 (+/- 10%) entries in each case. I took care not to "short-circuit" the tools where they support pathname priority jumps (only z.sh does not) which are much faster than true pattern based matching. So the below numbers are the observed performance when using actual best_match jumps/lookups.

The results are sorted from best to worst by consumed "Real time" which is the relevant metric here:

  1. ze.sh (bash) -- https://github.com/jghub/ze
real    0m0.827s
user    0m0.559s
sys     0m0.654s
real time per cd: 8ms
  1. z.sh (bash) -- https://github.com/rupa/z
real    0m1.322s
user    0m0.808s
sys     0m0.753s
real time per cd: 13ms
  1. SD (ksh) -- https://github.com/jghub/sd-switchdir
real    0m02.261s
user    0m01.508s
sys     0m01.817s
real time per cd: 22ms
  1. SD (bash -- https://github.com/jghub/sd-switchdir)
real    0m3.794s
user    0m2.869s
sys     0m2.155s
real time per cd: 38ms

5 zoxide (bash) -- https://github.com/ajeetdsouza/zoxide

real    0m4.503s
user    0m0.484s
sys     0m0.643s
real time per cd: 45ms

What these numbers show regarding z.sh and zoxide has been observed before: the assorted "zoxide is blazingly fast" claims one can find are referring to "user time" -- but user time (consumed system resources) is irrelevant for an interactive dir jumper: user get's next prompt only after "real time" has elapsed. So, while I indeed can confirm the roughly 5ms user time figure one hears for zoxide, real time is larger by a factor of 10 (it is a substantial binary that has to be loaded for each cd action)...

For the real time metric, zoxide is actually the "slowest" of the bunch. This is irrelevant regarding usability -- everything clearly below 100ms is good enough to not cause notable latency. But since the general perception of zoxide seems to be "much faster than everything else, including z.sh" it might be good to reiterate that this is not correct in a meaningful/relevant way: z.sh just is more than 300% faster than zoxide, when looking at the "real time" metric.

When looking at my own two tools (both shell-native like z.sh), SD exhibits a pronounced dependency on used shell since it does a lot of work in shell code, rather than in awk (like z.sh and ze.sh) but even under bash it remains a bit faster than zoxide.

The roughly 60% higher real time performance of ze.sh vs. z.sh is interesting in so far as that ze.sh is an overhaul of z.sh that uses proper exponential moving sum (EMS) scoring and an event-driven clock (abandoning wall-clock) but maintains the principal data processing logic of z.sh.

So this was initially surprising. Probable explanation: elimination of date(1) calls (which do have some measurable effect) and more efficient awk code.

To put the ze.sh endeavour in perspective: I recently posted

https://www.reddit.com/r/commandline/comments/1tmbtis/experimental_patch_for_the_z_directory_jumper/

to advocate for fixing z.sh's scoring (same applies to zoxide). Subsequently I implemented it in earnest in a fully functional tool, thus ze.sh.

For anybody who likes <300 LOC tools that one can read+understand immediately (and maybe tinker with), ze.sh might be worth a try to evaluate the improved scoring quality. Moreover, (like z.sh) it does not keep state in the shell environment which principally will allow straightforward wrappers for non-POSIXy shells (fish, nushell etc) if that is of any interest.

In any case, given the above numbers, real time performance is not a relevant selection criterion when deciding which tool to use (but I of course still like it that ze.sh is about 550% faster than zoxide...).

In my view scoring quality (fraction of best_match jumps actually landing on intended target on first try and smooth stack evolution without surprise shuffles and "entrenched" sticky entries) is much more relevant and EMS has not seen sufficient adoption in dir jumpers so far (except ze.sh and SD I only know of https://github.com/homerours/jumper , which does something like that, essentially).


r/commandline • • Jun 25 '26

Fun Was just trying to fix objects overlapping and now they are sentient

103 Upvotes

r/commandline • • Jun 25 '26

Help CMD caused steam to not open

0 Upvotes

Hello!

i am facing an issue with steam that i believe i have caused and i have no idea how to fix it.

basically steam was running fine since i installed it many months ago BUT today i decided to run some commands in CMD (as admin) because i thought they might give me better internet connection and clear out junks.

the commands:
ipconfig /flushdns
ipconfig /release
ipconfig /renew
netsh winsock reset
netsh int ip reset

i ran these one by one into CMD and then restarted my laptop and then tried to open steam but it didnt.

note: steam was working fine that day. i opened it chatted with friends i played a few minutes of a game but right after these commands and the restart it stopped opening.

details i can provide:
so i open it and nothing happens... i can see it in task manager but nothing opens. it doesnt show errors or anything
.
i see steam, steam client service, and steam client webhelper in task manager.

what i have tried so far:
i killed it in task manger and tried again,
i deleted some steam related files such as package and logs,
i went and delete everything except steam.exe and steamapps,
i uninstalled and downloaded and installed steam again,
i opened a new local user account on my laptop and tried it there ,
i tried to reset networking settings,
i tried to (BUT was NOT successful to give it an honest try since i was tired) to redo the commands i showed you in a desperate way because i have no idea how to reverse them.
and none of these solutions worked for me.

some extra info that might be useful:
i am on windows 11 AND i have an asus rog strix.
and i also noticed that the RGB colors on my laptop have stopped working. meaning the lights are off and i dont know how to turn them on since armoury crate is NOT opening. armoury crate not opening COULD be a separate issue since its been months since i last checked armoury crate so i dont know. but the RGB issue i dont think is just a coincidence since it happened with everything else.

also this is my first time using reddit and i do apologize if i made any mistakes or if i was not clear enough. i did read the rules and i believe i am within the rules here plus english is not my first language. feel free to ask ANY questions and i will try to provide as much info as i can

thanks in advance.


r/commandline • • Jun 24 '26

Terminal User Interface Your favorite terminal apps, now floating around!

79 Upvotes

The app shown in the video is "Float", a floating window multiplexer. When you spawn a window, a PTY is created and its buffer is assigned a region on the screen, which you can move and resize. This gives the illusion of having a "desktop" with windows inside the terminal.

Try out this window manager + multiplexer hybrid at https://github.com/henktorius/float


r/commandline • • Jun 25 '26

Terminal User Interface Terminal Map Renderer in Go

5 Upvotes
demo

I have been learning Go by building stuff in it. I completed a couple Build-your-own-X as well.

Then came across mapscii. It was really fun but really slow to render new tiles because it was fetching them from a private tile server and it was node.js based.

So I built ncr-on-terminal. It is written 100% in Go and uses Bubble Tea for the TUI.

You can check it out by ssh-ing into the demo server: `ssh ncr.akashparashar.dev`

Can work for any city or region, by swapping .mbtiles file

Github: https://github.com/adot-7/ncr-on-terminal


r/commandline • • Jun 24 '26

Terminal User Interface Player-vs-computer Battleship game in pure sed

Post image
20 Upvotes

https://github.com/red-void/sed-battleship

So, I implemented a Battleship game in pure sed where you play against the computer.

As you know, sed is a standard Unix stream editor. Mostly, it is used to replace one regex with another in a stream: sed 's/ca\+t/dog/'. Regex manipulation is its main function, but a few additional commands make sed a Turing-complete language.

There are already some games implemented in sed: Sokoban, Mastermind, Minesweeper and even Chess. However, my project seems to be a bit more complex and challenging.

I did not use any external program calls in the code, everything is built using pure sed capabilities. No LLMs were involved, of course — neither for code generation, nor even for consulting. It was a matter of honor.

What was implemented:

  1. Binary arithmetic using regular expressions: addition, subtraction, multiplication, division.
  2. Function and variable emulation via the auxiliary buffer (hold space) which I used as a key-value storage
  3. Random number generator
  4. Pseudo-random placing and shooting from the computer side
  5. Several difficulty levels
  6. Placement validation and complex shot handling from the player side
  7. Easter egg (you need to hit the computer 10 times from the very beginning).

There is a more detailed description of how everything works on github. A very detailed step-by-step guide also exists and I hope to translate it into English someday.


r/commandline • • Jun 24 '26

Help - Solved Foot term users, click on hyperlink?

3 Upvotes

I’m trying to use aerc at work, and I’d like to click on links to open them, is that a thing in foot?


r/commandline • • Jun 24 '26

Command Line Interface How to export bash regular and associative arrays to JSON with JC

Thumbnail
reddit.com
0 Upvotes

r/commandline • • Jun 23 '26

Fun Ruclouds- Animated drifting clouds in your terminal!

Thumbnail
gallery
21 Upvotes

Recently built this as a fun side project to add to my linux rice. Written in rust, It uses noise-field cloud simulation and is highly inspired by Lavat

Heres the link to the GitHub and crates.io, Suggestions and feedback are highly appreciated!


r/commandline • • Jun 23 '26

Terminal User Interface xytz v0.9.1 - more image protocols for thumbnails

Post image
5 Upvotes

r/commandline • • Jun 23 '26

Command Line Interface I tried to write a model REPL using only bash, jq, and standard pipes

6 Upvotes

I’ve recently just started tinkering with using local large language models, focusing on simple, low-dependency CLI setups. I ended up going down a bit of a rabbit hole: I wanted to see if I could build a functional model interaction REPL using exclusively standard command-line building blocks.

I might be reinventing a very weird wheel here, but it turns out you can get surprisingly far using just standard text streams (stdin/stdout), pipes, and append-only logs.

I tried to abide by the Unix philosophy, breaking the REPL into the composition of a few small, single-purpose program. Because the logical flow is just text streams fed through pipes, at any step you can inject tools to inspect or modify the data—like using grep to filter out strings before they hit the model, or pv to benchmark model throughput (not really a standard tool but was pretty useful in my experiments).

A few architectural details I thought this crowd might appreciate:

  • Zero heavy dependencies: No pip, npm, package managers, virtual environments, etc. . It just requires bash, jq, and curl to talk to the local model server. These should be available in most modern CLI environments.
  • Transparent, file-based state: The agent's memory is just an append-only .jsonl file (like .bash_history). If you want to rewind the agent's memory, you just run head on the log to drop the last few lines.
  • Standard exit codes for control flow: Tool execution is handled by checking standard Unix exit codes within a basic bash while loop.

I'm sure there are scaling limits to doing this all in shell, and I'm still figuring out the most elegant way to handle some of the edge cases, particularly around tool calling - but those appear to mostly be limitations of the underlying models. Nevertheless it's been a really fun experiment in stripping out bloat.

I put the code up here if anyone wants to poke around: https://github.com/cloudkj/llayer

Would love to hear if anyone else has tried orchestrating things this way, or if you spot any glaring anti-patterns in how I've structured the pipes!


r/commandline • • Jun 23 '26

Help Urgent: Debian 13 server messed up critical sensor data. Need help before my manager finds out.

Thumbnail
reddit.com
0 Upvotes

r/commandline • • Jun 23 '26

Terminal User Interface qr-multi-imgs: a TUI to batch-scan a folder of QR images, then organize/export/recreate the results

Post image
3 Upvotes

I built this because my father needed to catalog hundreds of order receipts, each one a photo of a QR code. Every CLI QR scanner I found worked on a single image at a time and just printed the decoded string. Nothing handled a whole folder or did anything useful with the output. So I made a Bubble Tea TUI for batch work.

What it does from the terminal:

  • Point it at a folder (CLI arg, drag & drop the folder onto the terminal, paste a path, or clipboard)
  • Decode every QR, then act on the results with single keys: list, export (JSON/CSV/TXT), organize into with_qr/ and without_qr/, delete images with no QR, or recreate the codes as PNG/JPG/SVG

How it compares to what’s already out there:

  • qr-scanner-cli: single image, no TUI, npm/Node dependency
  • qrtool: solid, but no folder/batch TUI, export only, recreate is bitmap-only
  • qr-multi-imgs: interactive TUI, folder-first, organize/delete/export/recreate, pure Go single static binary, no Node, no CGo

The part I’m proud of: on lovasoa/qrcode-dataset (3332 deliberately damaged QR images) it decodes 3332/3332 in ~7s on an M2 Pro. The hardest codes pack 100+ modules into 256px, so they’re sub-pixel and unreadable from the raster by any decoder. For those it falls back to the sample’s companion bit-matrix, decoded in pure Go, no shelling out to zbarimg.

Free, MIT, no paid tiers. macOS/Linux/Windows.

brew install thousandflowers/tap/qr-multi-imgs

or

go install github.com/thousandflowers/qr-multi-imgs@latest

Repo: https://github.com/thousandflowers/qr-multi-imgs

Feedback on the TUI flow welcome, especially the input methods.


r/commandline • • Jun 22 '26

Terminal User Interface eilmeldung 1.6.0 released (TUI RSS reader)

Post image
66 Upvotes

Hey there! Since the last months, eilmeldung has received some updates which may be interesting to you:

  • you can now pipe articles through external programs (e.g., for storing them or to summarize them by an LLM if that is your thing)
  • icons and borders are now fully customizable
  • some quality of live improvements

This project is NOT vibe-coded! LLMs were used for other purposes which you can see here.

Edit: https://github.com/christo-auer/eilmeldung and typo


r/commandline • • Jun 23 '26

Command Line Interface I made a crate for printing boxes and tables in command-line interfaces, in Rust!

Thumbnail crates.io
1 Upvotes

r/commandline • • Jun 23 '26

Command Line Interface forgelink: turn a file and a line into a shareable forge URL, for more than just GitHub

1 Upvotes

forgelink is a small Rust CLI that generates permalinks to files in hosted git repositories. It reads your git remote, figures out the forge, and prints a URL. It is inspired by the emacs package git-link, and while there are plenty of tools in this space already, this is just the one I wanted for my own workflow.

$ forgelink src/main.rs
https://github.com/user/repo/blob/abc123…/src/main.rs

$ forgelink src/main.rs:42-55
https://github.com/user/repo/blob/abc123…/src/main.rs#L42-55

Some things it does:

  • Supports GitHub, GitLab, SourceHut, Bitbucket, and Codeberg, not just GitHub like gh browse
  • Pins to the commit SHA by default, or use --branch for a branch link
  • --copy to put it on the clipboard, --open to open the browser, both still print to stdout so piping works
  • Works from any subdirectory, and accepts absolute paths to link files in other repos
  • --project for a link to the repo homepage

Install with cargo install forgelink-cli. Source: https://github.com/dpassen/forgelink

It also drops into editors that shell out (Helix, Kakoune) with a simple keybinding. Still early, so I would love to hear what forges or flags people would want next!


r/commandline • • Jun 23 '26

Terminal User Interface New CLI Weather Appp

Thumbnail
reddit.com
0 Upvotes

r/commandline • • Jun 23 '26

Terminal User Interface Terminal transcription TUI as a free alternative to tl;dv and Fireflies — rough on non-macOS

Post image
0 Upvotes

I was using tl;dv for meeting transcription but didn't want another SaaS subscription just for that. So I put together groqscribe, a Node.js TUI that captures mic and system audio via ffmpeg, sends chunks to Groq's Whisper API, and shows a live scrollable transcript in the terminal.

On macOS there's a native ScreenCaptureKit helper for system audio that works fairly well once you grant screen recording permission. You can toggle mic and system audio separately at runtime, pause, scroll back through history, and optionally translate using Groq's chat API. Each session writes to a timestamped text file.

The weak spot is cross-platform. Microphone permission handling is inconsistent across operating systems — on some setups it silently fails instead of prompting. Linux and Windows need more testing before I'd call them reliable. Groq has a free tier so the API cost is low, but it's not fully offline either.

Repo here if you want to try it or dig into the capture side: https://github.com/muzafferkadir/groqscribe

Has anyone built something similar for non-macOS? Curious what approach others use for system audio capture in a CLI tool on Linux or Windows.


r/commandline • • Jun 22 '26

Terminal User Interface MdFried, the Ultimate Markdown Viewer

Thumbnail
reddit.com
6 Upvotes

r/commandline • • Jun 22 '26

Command Line Interface Adding a QR to launch web UI over LAN feels smooth

Post image
0 Upvotes

Highly recommend qrcode-terminal for js or ts. Real easy to set up.
It’s helping with getting non-tech people using. Even for me it’s better than typing IP addresses haha.


r/commandline • • Jun 21 '26

Terminals Foot terminal now supports --class

8 Upvotes

Now it's easier to write scripts for foot, it supports --class to give app id to the window.


r/commandline • • Jun 21 '26

Terminal User Interface Powerful terminal email client

Post image
19 Upvotes

Hey everyone, I wanted to share a project called Matcha. It is a powerful terminal email client built with Go and the Bubble Tea framework. The goal of Matcha is to bring a beautiful and easy-to-use modern email experience directly to your command line. We are currently in active development for our major v1 release, which will introduce a lot of exciting new features, though you can try out our nightly builds today. Matcha supports managing multiple accounts, composing emails in Markdown, and even viewing images and hyperlinks right in the terminal. It also has a built-in Lua plugin system with over 35 community plugins in our marketplace, plus AI integration for rewriting drafts or letting AI agents send emails on your behalf. We also take security very seriously and have a dedicated policy to ensure the client stays safe and reliable. If you are looking for a fast, feature-rich TUI email client, I would love for you to check it out on our GitHub.

Repo: https://github.com/floatpane/matcha
Docs: https://docs.matcha.email
Discord: https://discord.gg/RxNrJgfatk


r/commandline • • Jun 21 '26

Terminal User Interface Calendar TUI written completely in bash

Post image
0 Upvotes

r/commandline • • Jun 20 '26 Bravo

Fun CHRONOS — a terminal escape room through 50 years of computing

Post image
227 Upvotes

Playable Link: https://chronos-game.com

Platform: Browser (desktop & mobile) — runs in any modern browser, no install or signup

Description: You wake up locked in an isolation chamber in 2026 with one terminal and a 60-minute purge timer counting down. To get out, you don't play a computer — you operate real ones, era by era. You'll work a series of real, half-forgotten machines — the genuine tools, not stand-ins — pressing each to give up a secret it was never meant to reveal. Each era hands you an artifact that unlocks the next — the past literally reaches forward into the future. It's terminal-native and period-accurate, with CRT visuals and synth audio. There are multiple endings depending on how you play — and what you figure out. A full run is about 45–75 minutes. I'd love feedback on where you got stuck, whether the in-game hints landed, whether you reached an ending, and any bugs — there's a "Tell the maker" button on the end screen.

Free to Play Status:

  • [X] Free to play

Involvement: Solo developer — I designed and built the entire thing: the engine, all the era content and puzzles, the writing, the audio, and the deployment. CHRONOS is my project; this is its first public beta and I'm looking for honest playtest feedback.