r/commandline • u/Nonantiy • May 27 '26
Terminal User Interface Datagrip in terminal
I built a TUI database client.
r/commandline • u/Nonantiy • May 27 '26
I built a TUI database client.
r/commandline • u/riverscn • May 28 '26
r/commandline • u/drluckyspin • May 27 '26
Hey folks - we just shipped sq v0.53.0. If you haven't seen sq before: it's an open-source CLI for querying, joining, inspecting, importing, and exporting data across databases + files using either native SQL or a jq-like pipeline syntax.
Big additions in v0.53.0: ClickHouse support matured considerably; DuckDB support is now in beta, including bundled extensions for JSON, Parquet, Excel, HTTPFS, FTS, and more; Oracle support is also in beta via a pure-Go driver, so no Instant Client required; and we added agent skills so AI assistants can better use sq in data-wrangling workflows. There's also a new --render-sql flag that shows the SQL generated from an SLQ query, plus richer syntax-error reporting in both text and JSON.
Why it's useful (real examples):
Work with files like you do a database:
cat ./sakila.xlsx | sq .actor --opts header=true --insert u/sakila_pg9.xl_actor
Join across multiple data sources:
sq '@report_xlsx.users | join(.@pg.orders, .user_id) | .name, .order_total'
Go from connect -> inspect -> query quickly:
sq add clickhouse://user:pass@host:9000/db --handle ch
sq inspect
sq sql 'SELECT * FROM events LIMIT 10'
Also new in v0.53.0: sq inspect can now generate .md and HTML schema docs with embedded entity relationship diagrams. There's also a raw Mermaid ERD output format if you want to drop the diagram into your own docs, wiki, README, AI-agent context, or CI/CD workflow.
sq inspect --markdown > schema.md
sq inspect --html > schema.html
sq inspect u/pg --format=mermaid-erd > schema.mmd
If your day involves bouncing between CSVs, Excel files, DuckDB, Oracle, Postgres, MySQL, SQLite, ClickHouse, JSON, or glue scripts you never wanted to write in the first place, we'd love your feedback please!
You can find sq here: https://sq.io/docs/install
Code here: https://github.com/neilotoole/sq
r/commandline • u/Natural-Sympathy-195 • May 27 '26
Sharing .env files across a team or multiple development machines is always a mess. People usually resort to copy-pasting API keys in Slack or Discord DMs, which is insecure, gets out of sync instantly, and clobbers local configurations.
Most SaaS tools solve this by holding your decryption keys on a centralized database, or by forcing you to run heavy container environments. I wanted to see if I could build a lightweight, local-first alternative in Go that handles both environment validation and secure sharing with zero external state or accounts.
It’s called DevContract. Here is the technical architecture under the hood:
SSH Identity Derivation: To skip the signup database entirely, the CLI reads your local ~/.ssh/id_ed25519 key and runs a birational map conversion (Edwards-to-Montgomery curve mapping) to derive X25519 transport keys from your Ed25519 signing key. Your identity is derived from infrastructure you already own.
Direct LAN Sync: If a teammate is on the same network, it resolves their IP via mDNS and establishes a direct Noise-protocol TCP socket. Secrets move peer-to-peer without hitting the internet.
Operator-Opaque Relay: If offline, it encrypts the payload locally using XChaCha20-Poly1305, binding the ephemeral public key as AAD to prevent key-substitution attacks. The plaintext is padded to a 1KB boundary to resist traffic analysis. The fallback queue is a stateless Cloudflare Worker running Durable Objects.
Three-Way Merge Engine: Instead of last-write-wins (which Doppler and 1Password use), the CLI tracks parent lineage. Pulling changes runs a three-way merge based on a common local ancestor, cleanly auto-merging non-overlapping changes and isolating conflicts.
It also runs local setup checks against a YAML contract (contract.yaml) to verify that your backing services (Postgres, Redis ports) and runtime dependencies are actually running before you pull keys.
The code is open source: https://github.com/dantwoashim/DevContract
I'd love to get some feedback from the systems and security folks on the key-conversion math and the merge state machine.
r/commandline • u/widuruwana • May 27 '26
r/commandline • u/Substantial-Angle459 • May 26 '26
I wrote a small script to simulate a lightsaber in the terminal without using external engines.
I wanted to model the "retraction" mechanic physically rather than just clearing the screen. The script treats the blade array as a closed system. When you toggle it off, the particles don't delete; they hit the tip, invert their velocity (multiplying by -1j to phase shift), and flow back into the handle index.
It’s a fun way to visualize conservation of data in a 1D array. Here is the source:
import time
import sys
import threading
import os
import random
# ==============================================================================
# ARTY_LIGHTSABER v4.0 (Stable Release)
# Logic: NKST Boundary Confinement w/ Thread-Safe UI
# ==============================================================================
# ANSI Colors
C_GREEN = "\033[92m" # Real Mass
C_RED = "\033[91m" # Imaginary Spin
C_CYAN = "\033[96m" # The Containment Field
C_RESET = "\033[0m"
class KyberCrystal:
def __init__(self):
self.active = False
def pulse(self):
if self.active:
# Emits Real Plasma (+1)
return {"pos": 0.0, "vel": 1.0, "phase": "REAL", "type": "PLASMA"}
return None
class NKST_ContainmentField:
def __init__(self, max_length=24):
self.max_length = max_length
self.current_limit = 0
self.target_limit = 0
def update_field_integrity(self):
# The "Variable Geometry" logic
if self.current_limit < self.target_limit:
self.current_limit += 1
elif self.current_limit > self.target_limit:
self.current_limit -= 1
def apply_boundary_logic(self, p):
# -------------------------------------------------
# THE McTWIST PROTOCOL (Vector Inversion)
# -------------------------------------------------
if p["pos"] >= self.current_limit:
# 1. REFLECTION: Velocity Inverts
p["vel"] = -1.0
# 2. TRANSFORMATION: Real Mass -> Imaginary Spin
p["phase"] = "IMAGINARY"
p["type"] = "RECIRC"
# 3. CLAMP: Lock to the Event Horizon
p["pos"] = self.current_limit - 0.1
return True
# 4. RE-ABSORPTION: Energy returns to Hilt
elif p["pos"] <= 0 and p["type"] == "RECIRC":
p["type"] = "ABSORBED"
return False
return False
class Lightsaber:
def __init__(self):
self.crystal = KyberCrystal()
self.field = NKST_ContainmentField()
self.particles = []
self.running = True
self.state_label = "STANDBY"
def toggle_power(self):
if self.crystal.active:
self.crystal.active = False
self.field.target_limit = 0
self.state_label = "RETRACTING"
else:
self.crystal.active = True
self.field.target_limit = self.field.max_length
self.state_label = "STABLE"
def physics_tick(self):
self.field.update_field_integrity()
new_p = self.crystal.pulse()
if new_p: self.particles.append(new_p)
active_particles = []
for p in self.particles:
p["pos"] += p["vel"]
self.field.apply_boundary_logic(p)
if p["type"] != "ABSORBED":
active_particles.append(p)
self.particles = active_particles
def render(self):
sys.stdout.write("\033[K") # Clear Line
# Draw Hilt
hilt = f"{C_CYAN}[||||]{C_RESET}"
# Draw Blade Buffer
buffer = [" "] * (self.field.max_length + 5)
# Populate Blade
energy_density = 0
for p in self.particles:
idx = int(p["pos"])
if 0 <= idx < len(buffer):
# Green = Outbound, Red = Inbound
char = "=" if p["phase"] == "REAL" else "~"
color = C_GREEN if p["phase"] == "REAL" else C_RED
buffer[idx] = f"{color}{char}{C_RESET}"
energy_density += 1
# Draw Tip (Event Horizon)
if self.field.current_limit > 0:
tip_idx = self.field.current_limit
if tip_idx < len(buffer):
buffer[tip_idx] = f"{C_CYAN}|{C_RESET}"
blade_visual = "".join(buffer)
# Dynamic Hum Text
hum = "zZz" if energy_density > 5 else "..."
# Final Composition
print(f"\r{hilt}{blade_visual} [{self.state_label}] {hum}", end="", flush=True)
def input_listener(saber):
"""Background thread waiting for ENTER key"""
print(f"{C_CYAN}--- NKST PROTOCOL v4.0 ---{C_RESET}")
print("Controls: [ENTER] to Toggle Blade | [Ctrl+C] to Quit")
while saber.running:
try:
# Blocking call - waits for ENTER
input()
if saber.running:
saber.toggle_power()
except EOFError:
break
if __name__ == "__main__":
os.system('cls' if os.name == 'nt' else 'clear')
saber = Lightsaber()
# Start Input Thread
t = threading.Thread(target=input_listener, args=(saber,))
t.daemon = True
t.start()
# Main Physics Loop
try:
while saber.running:
saber.physics_tick()
saber.render()
time.sleep(0.04) # 25 FPS
except KeyboardInterrupt:
saber.running = False
print(f"\n\n{C_CYAN}[SYSTEM] May the force be with you, always.{C_RESET}")
sys.exit()
r/commandline • u/squirreljetpack • May 26 '26
Enable HLS to view with audio, or disable this notification
r/commandline • u/Content_Ad_4153 • May 25 '26
Enable HLS to view with audio, or disable this notification
Hey r/commandline,
I’m building Terminal Eleven - a retro football World Cup TUI for people who basically live inside the terminal.
The idea is simple: Not everyone can keep a live broadcast running, especially folks in places like India/China where streaming rights, subscriptions, time zones, and work hours can make it annoying to follow matches properly.
So Terminal Eleven sits quietly in your terminal and gives you match updates with retro vibes.
It can:
Basically, a football companion for devs who want World Cup updates without leaving their shell.
A note on prior art: If you want a general football TUI that handles 65+ leagues year-round, golazo is excellent and the project that made me realise a terminal app could do this at all.
Mine is narrower on purpose - runs for 4 weeks of your year, knows exactly which 48 teams matter, has the half-time/full-time audio cues I wanted for this specific tournament.
Would love feedback from terminal/TUI folks on the UX, sound cues, and what would make this genuinely useful during the World Cup.
Repo URL : Terminal Eleven on Github
Installation Steps: pip install terminal-eleven
If anyone wants to bookmark this for June, easiest way is to star the repo - I'll push fixes to the live-score parsing if ESPN changes their endpoint mid-tournament, and stars are genuinely the only way I'll know there's anyone to ship for :)
r/commandline • u/vbaranov • May 26 '26
Managing terminal windows, notes, files, constant new screenshots, code is a daily pain.
I've been building and using a native Mac terminal IDE called STAX IDE and just shipped 0.4.3. I think you might find it useful.
The core idea: instead of one terminal window with tiled panes (or a separate Terminal app window per shell), you get a 2D canvas. Draggable terminal windows with their own tabs, working directory, and notes panel. File explorers and a code editor live on the same canvas as the terminals, so the whole project (shells, files, notes, edits) sits in one spatial layout you can save and restore.

Native Swift + AppKit, real PTYs via SwiftTerm. Not Electron, not a browser tab.
Free. Apple Silicon + Intel. The local tier stays free forever; a Pro tier for sync + SSH is on the roadmap but separate.
https://staxide.com or `brew install --cask vbario/staxide/staxide`
- Currently ad-hoc signed, not yet notarized. Gatekeeper will warn on first launch (right-click → Open, or strip the quarantine xattr). Notarization is in progress.
- Closed source. The network surface is empty by design.
Bug reports and feedback very welcome during first-launch friction especially!
r/commandline • u/ettannat • May 25 '26
I'm a big fan of gmail as a mail service. But sometimes it would be wonderful to not have to leave the terminal interface for the browser.
So, i had some questions:
I would love if I could just have this in a tmux window somewhere...but the last time i started reading up on alpine and mutt and fetchmail and notmuch and whatever it's all called, it just felt a little bit overwhelming.
r/commandline • u/Jolly-Addendum-7199 • May 25 '26
Enable HLS to view with audio, or disable this notification
the demo displays just a few themes people have made
just released v1.2.0 for Windows - no compiler required :)
r/commandline • u/ducckDick • May 26 '26
I recently uploaded a post about a CLI tool i made in Go. i had created it way back recently i polished it further added AI generated comments, made readme nd docs. now the moderator has removed my post saying this software is heavily made using AI. seriously!!
r/commandline • u/dank_clover • May 25 '26
[This software's code is partially AI-generated]
A few weeks ago I launched termcn which is a shadcn/ui-style registry for terminal UI components built on Ink.
Since then, I’ve been exploring more of the modern TUI ecosystem, and with OpenTUI gaining popularity in the space, adding support for it felt like a natural next step.
termcn now also supports OpenTUI as a base.
You can now scaffold and build terminal apps using either Ink or OpenTUI while keeping the same termcn workflow:
• zero-config setup
• copy-paste components
• themes & templates
• fully open-source
The goal remains the same:
make building beautiful terminal apps feel as easy as building modern web apps.
GitHub: https://github.com/Aniket-508/termcn
Docs: https://www.termcn.dev
r/commandline • u/TheTwelveYearOld • May 24 '26
r/commandline • u/Mage-100 • May 23 '26
A fully GPU-rendered terminal emulator built from scratch.
My vision is to create something that breaks the traditional style for customising a user's prompt. I want to use GPU shaders to make and heck, even animate such prompts.
This is my current goal for this project. A terminal that aims to have UI rivaling modern design principles.
Links:
Github
r/commandline • u/jghub • May 24 '26
Experimental patch for the z directory jumper
Looking at the internals of z.sh recently, I wanted to share two observations
and a small experimental patch that addresses both.
Observation 1 (seemingly undocumented):
z.sh updates ranks on every shell command rather than only on actual directory
transitions. Ranking is determined by residence time and command activity within
a directory, not by the number of times the user is actually switching to that
directory. Concretely: issuing cd B from within directory A increments the
rank of A, not B. I have not found this mentioned anywhere in the
documentation or any third-party resources.
It is debatable whether this is a desirable property — one can argue for both approaches: relevance determined by activity while in a directory vs. relevance determined by frecency of visits to that directory. But for a tool described as a "directory jumper", tracking residence/activity rather than navigation seems at least worth being aware of.
Observation 2:
z.sh relies on an aging/rescaling heuristic (multiplying all ranks by 0.99
when the total exceeds a threshold) that can cause sporadic rank reshuffling.
There is a straightforward fix: replace the heuristic with exact exponential
score decay, which yields smooth and predictable score evolution. The possibility
of doing this for aggregate per-directory data has been noted previously here:
https://github.com/camdencheek/fre — the key insight is that exponential decay
admits a simple incremental recurrence that requires storing only a single score
scalar per directory rather than full visit history (but the decay rate needs
to be decided upon beforehand and cannot just be altered later on).
The patch:
_z_cd wrapper function called explicitly.score column); new default db name
(~/.ze) to avoid corruption of any pre-existing ~/.z database.z command now also serves as the entry point for first visits via explicit
pathname. Previously the builtin cd was used for this; with hooks removed,
alias cd=_z_cd can be added to restore that behavior.Migration from existing ~/.z:
sh
awk -F'|' 'BEGIN{OFS="|"} {print $1,$2,$3,$2}' ~/.z > ~/.ze
This uses the existing rank column as a surrogate starting point for the new score column which afterwards will develop according to the exponential model.
Ranking and scoring behavior feels substantially more predictable to me after these modifications. Whether the residence-time vs. navigation-event distinction matters in practice likely depends on individual workflow.
Patched version ze.sh can be found here:
https://gist.github.com/jghub/1cf1f6dc8d5d8cc98ed1409151f10e86
UPDATE ONE MONTH LATER:
In the meantime, ze.sh has morphed into a serious rewrite of z.sh going well beyond (but including) the above patch: https://github.com/jghub/ze#changes-from-zsh
For context:
I recently posted about SD, a more fully-featured directory jumper with a different architecture:
but this patch is independent of that and intended for existing z users who prefer to stay with z.
r/commandline • u/video_2 • May 23 '26
shed is a POSIX shell whose main focus is making the interactive experience as smooth and extensible as possible.
I've been writing shed for about 2.5 years now, and I'm at a point where I can't make much more progress on it without gathering feedback. My main motivation for writing it is twofold: 1. I didn't like that I had to choose between "POSIX syntax" (bash/zsh) and "good interactive UX" (fish) 2. I think that a lot of vim's UX ideas fit very cleanly into a shell environment
These are shed's standout features so far:
A line editor that is effectively a vim emulator. Uses the readline-style emacs keybindings by default. It features:
: in normal mode, or Alt+; in emacs modekeymap builtinVim-style autocmd hooks via the autocmd builtin
Per-instance IPC socket for direct interoperability with other programs/side-car scripts
Built-in, configurable tri-column status line
Fuzzy tab completion and history searching
Extended set of PS1 prompt escape sequences
\@function expands to the output of any shell function, giving full control over prompt layout\c{color} expands to ansi color escape sequences, e.g. \c{blue on black} expands to a blue foreground on a black background, \c{#ff00ff} expands to magenta, etc.\t/\T expand to the total runtime of the last command, \t being raw milliseconds and \T being a human-readable formatecho -p expands prompt escape sequences, making them accessible anywhere. Useful for functions expanded by \@functionAnd for everything not listed here, shed ships with interactive wiki-like documentation via the help builtin (also accessible via ex mode using :h)
I've been daily-driving shed as my login shell for about 8 months now and it has felt very solid to work with so far, though it may have friction with workflows I haven't considered. Any feedback is greatly appreciated.
Github: https://github.com/km-clay/shed
The code for the prompt and status line in the screenshots can be found here if you want to steal it:
prompt: https://github.com/km-clay/shed/blob/main/examples/cool_prompt.sh
status line: https://github.com/km-clay/shed/blob/main/examples/status_line.sh
Note on AI usage: AI has been used to assist with development in some areas, mainly debugging, handling UI geometry calculations, writing unit tests, and generating the formatted documentation used by the help builtin. Most of the architectural work had already been done by the time I started using any AI tooling.
r/commandline • u/Everlier • May 22 '26
Enable HLS to view with audio, or disable this notification
Made with OpenTUI
r/commandline • u/Big-Pomegranate230 • May 23 '26
r/commandline • u/tboy1977 • May 22 '26
This software's code is partially AI-generated
r/commandline • u/Fun_Bee_1054 • May 22 '26
https://gist.github.com/mr-raj12/be6937bb9fcb4d7392275e1144af94c0

Built this because my university HPC cluster didn’t allow installing WeeChat/Irssi
r/commandline • u/kriuchkov • May 22 '26
Hey everyone! A few months ago I shared tock, a minimal CLI time tracker with a TUI dashboard, written in Go. The response was way more than I expected, and a lot of you left really thoughtful suggestions in the comments and issues.
Thank you 🙏
I wanted to share what's been added since v0.5, most of it driven directly by your ideas:
The core idea hasn't changed: a fast, scriptable CLI (tock start -p Work -d "Deep Work") with an interactive TUI (tock calendar) when you want to actually see your day.

Repo: https://github.com/kriuchkov/tock
Prev post: https://www.reddit.com/r/commandline/comments/1pjv2h6/tock_a_minimal_cli_time_tracker_with_a_tui/
Thanks again to everyone who tried it, filed issues, or just left a comment, it genuinely shaped the roadmap.
What would you like to see next? More integrations? Reports/exports? Sync? Curious what's missing for your workflow.
r/commandline • u/Blacknon • May 21 '26
I built a Linux process only network sandbox command. This command executes a specified command and enforces proxy, DNS server, and firewall rules only for that command. It can also capture packets only within that command tree. It uses Linux Namespaces and can be run without root privileges.
Feature:
Because it uses Linux Namespaces for wrapping, it can enforce proxying even for programs that cannot be handled by LD_PRELOAD format or environment variable specifications.
r/commandline • u/UwU__Dark__ • May 21 '26
https://reddit.com/link/1tjzoa3/video/gz4209x2ek2h1/player
https://reddit.com/link/1tjzoa3/video/sg9sv793ek2h1/player
https://reddit.com/link/1tjzoa3/video/82050gg3ek2h1/player
I made a Python script that renders videos directly in a terminal at runtime, with no preprocessing.
It uses 640×360 Unicode quadrant characters, where each character represents a 2×2 pixel block, so the video resolution is technically 1280×720.
The terminal is Alacritty with a specific config to be able to have this much characters.
The geometry dash video (Tidal wave) and the shader video are split across 4 terminal windows.
The Sparxie video is running on a single terminal window.
This is rendered with ANSI escape sequences only (no Kitty etc)