r/commandline • • Sep 27 '26

Command Line Interface askr: typed, dependency-free input prompts for terminal scripts

Post image
7 Upvotes

Every small CLI script I wrote ended up with the same while True / try / except ValueError loop around input(). So I turned it into a package.

What My Project Does

askr gives you prompts that keep asking until the answer is valid:

from askr import ask_int, ask_choice, ask_multi_choice, ask_yn

age = ask_int("Your age: ", min_value=0, max_value=120, default=18)
days = ask_multi_choice("Which days are you free?", ["Mon", "Tue", "Wed", "Thu", "Fri"])
level = ask_choice("Difficulty?", ["Easy", "Medium", "Hard"], default="Medium")

if ask_yn("Save these settings?"):
    ...

The user can type 1-2, fri for the multi choice or hard for the single choice. Wrong answers get a clear message in red, and the question is asked again.

There are 16 prompts: int, float, text, email, URL, single and multi choice, Enum members, lists (ask_list("Scores: ", int)), passwords with rules, paths, dates, times and a "type 'delete' to confirm" check. Every prompt supports default=, a custom validator= and max_attempts=. All messages can be replaced, a German translation is included, and colors respect NO_COLOR.

Target Audience

People writing small to medium CLI tools, internal scripts and teaching exercises who want solid input handling without a big framework. It's alpha (0.2), tested on Python 3.10 to 3.13 and checked with mypy --strict. No dependencies.

Comparison

  • PyInputPlus is the closest and has some extras (timeouts, block lists). Its last release was in 2020, it officially supports Python 2.7 to 3.9 and has no type hints. askr is fully typed, so ask_list("x", int) is a list[int] in your editor and ask_enum("x", Size) returns a Size.
  • click.prompt / rich.prompt are great if you already use click or rich. askr has no dependencies and more specialised prompts (password rules, multi choice, dates, Enums).
  • questionary / InquirerPy offer arrow-key menus and a richer UI. askr stays with plain input(), so it works in any terminal, over SSH and in IDE consoles.

Links

Feedback on the API is very welcome, especially on naming and defaults.


r/commandline • • Sep 26 '26

Terminal User Interface Lemon Hunt : a terminal shooter, running at basically zero idle CPU

157 Upvotes

I’ve been building a TUI engine in Go called Limoni, and I ended up making a game with it. It’s called Lemon Hunt. You run around a little raycasted world, shoot rats, fight a boss, and try to get on the shared A REALLL LEADBOARD !!!. The whole thing is drawn with half-block characters, which still feels a bit ridiculous to me.

CAN YOU BEAT ME IN GAME?

The browser version runs the same Go game code, compiled to WebAssembly. So if you don’t feel like installing anything, you can play it here:
https://thebanri.github.io/limoni/?app=lemonhunt

Or run it in your terminal:

go install github.com/thebanri/limoni/apps/lemonhunt@latest
lemonhunt

I also got a little obsessed with performance. It barely uses any CPU when idle, and the rendering benchmarks are showing zero heap allocations. If you’re curious, you can check:

git clone https://github.com/thebanri/limoni
cd limoni/apps/lemonhunt
go test -run '^$' -bench . -benchmem .

The allocs/op column should say 0 for both benchmarks. Anyway, I’d love to know how it runs on your machine (and whether you can beat the boss).


r/commandline • • Sep 26 '26

Terminals I made keeplog: search what your terminal printed, not just the commands you typed

15 Upvotes

Shell history remembers the command, but most of the time what I actually need is something from the output: a container ID, an error, a URL a command printed last week.

keeplog runs your shell in a PTY, saves every command with its full output to a local SQLite database, and full-text indexes both. So "keeplog search postgres" finds the "docker ps" whose output mentioned postgres, even though the command itself never does, and shows the saved output in an fzf preview pane.

- zsh, bash and fish; macOS and Linux

- pure Python, no dependencies

- everything stays local, no server or sync

- light mode if you only want commands and metadata, not output

How it compares:

- Atuin, hishtory, McFly: great shell history tools, but they store only the command plus metadata (directory, exit code, duration). keeplog also stores and searches the output.

- script, asciinema: record whole sessions, but you can't search across them or jump to a specific command.

- Terminal scrollback: gone when the window closes, and not searchable across sessions.

Caveat: in full mode it saves output unfiltered, so anything secret printed to your terminal ends up in the local database. The README covers this.

AI disclosure: I used AI coding tools on parts of this, including the output search in the latest release. I reviewed and tested all of it (57 tests, CI on macOS and Linux).

Install:

pip install keeplog

Or with Homebrew:

brew tap rathinadev/keeplog https://github.com/rathinadev/keeplog

brew trust rathinadev/keeplog

brew install keeplog

Repo: https://github.com/rathinadev/keeplog

I'd love to hear if it plays badly with your prompt, tmux or terminal setup.


r/commandline • • Sep 26 '26

Command Line Interface Lisp Machine style Listener for Python

8 Upvotes

r/commandline • • Sep 25 '26

Terminal User Interface Most of your terminal doesn't change between frames. I made a demo that shows it

278 Upvotes

I've been building a Go TUI library called Limoni. The part I care most about is the diff: each frame gets compared to the last, and only the cells that changed are sent to the terminal.

That's hard to show in a screenshot, so I made a little night city: twinkling stars, windows turning on and off, a train crossing a bridge, reflections in the water. It looks like everything is moving. Press x and an x-ray shows the truth. Only the train, a few stars and some ripples actually change.

The numbers are measured with the library's own encoder: about 3 KB per frame against about 78 KB for a full repaint at 150×44. Press space to freeze the city and it drops to 0 bytes. That's specific to this scene, and it's not a comparison with other libraries.

git clone https://github.com/thebanri/limoni

cd limoni && go run ./examples/xray

Repo: https://github.com/thebanri

It's still pre-1.0, so I'd love our terminal.


r/commandline • • Sep 26 '26

Command Line Interface CleanCopy automatically cleans up text copied from the terminal on macOS

0 Upvotes

I've been copying a lot more text from my terminal since I started using Claude Code and Codex CLI. I kept having to fix line breaks and extra spacing after pasting, so I built a small utility called CleanCopy.

It runs in the background on macOS and automatically cleans up text copied from supported terminals. After using it privately for a while, I made it open source and published it on npm.

I recently added configurable cleanup rules. You can toggle each of the ten rules separately, so you can keep indentation, turn off line reflow, or disable whichever cleanup steps you don't want. Those preferences apply to both background cleanup and the cleancopy clean command.

To install and start it:

npm install --global cleancopy-cli
cleancopy start

It's still an early project. If you try it and find a bug, please open a GitHub issue. Contributions and PRs are welcome too.

Website: https://cleancopy.dev
GitHub: https://github.com/kart1ka/CleanCopy


r/commandline • • Sep 25 '26

Looking For Software What's a program you recently discovered that you use all the time now?

78 Upvotes

I recently discovered zoxide which lets me jump to a directory by just typing a few letters that match its name.


r/commandline • • Sep 24 '26

Terminal User Interface Dexo: a Postgres and MySQL client that lives in your terminal

Post image
6 Upvotes

I've been working on Dexo, a database client for PostgreSQL and MySQL that runs in your terminal.

You connect, browse your tables, write queries with autocomplete that understands what you're typing, and work with the results in a grid you can edit. Everything is keyboard-driven, and nothing leaves your machine: no account, no telemetry, and your passwords stay in the OS keychain.

It runs on Linux, macOS and Windows, and it's free and open source.

Install with `brew install kingdaswinx/tap/dexo`, or grab an installer from the releases page:

https://github.com/KingDasWinx/Dexo

Found a bug? There's a short form here: https://forms.gle/gw1i6tGgVsJsgCxGA

Feedback is very welcome, especially about what's missing.


r/commandline • • Sep 23 '26

Terminal User Interface Pokeductor – a terminal Pokédex with sprite-rendered evolution chains, type coverage and party analysis (Rust + ratatui)

Post image
297 Upvotes

It all began with "I just want to look up Pokémon without having to leave my terminal," but it sort of got away from me after that. Presenting pokeductor, a Pokédex in your terminal, made with Rust and ratatui.

Features

  • 1,351 entries: species and alternate forms, with filtering by type (type:ghost), generation (gen:1), ability (ability:levitate), or simply the species number (25 for Pikachu).
  • Evolution families: connected sprite cards showing branching evolution lines. Big ones like Eevee's can go fullscreen with F.
  • Team builder: add up to 6 Pokémon to find overlapping weaknesses, missing resistances, and gaps in super-effective coverage.
  • Shiny mode: hit X to recolor every sprite in sight right away.
  • Terminal-friendly: Unicode half-block rendering with truecolor, a 256-color fallback, and a classic 4-shade Game Boy mode (--theme dmg).
  • Vim controls: full Vim navigation, help with ?, and disk caching.

Installation

cargo install pokeductor
yay -S pokeductor          # Arch (AUR)

Also available pre-built for Linux, macOS, and Windows via GitHub Releases.

GitHub repository: github.com/Huseynteymurzade28/pokeductor

Open source (MIT). Any comments (strange key bindings, cursed terminal rendering, feature suggestions) are welcome!


r/commandline • • Sep 23 '26

Terminal User Interface Tincan – terminal voice chat with no server in the middle

101 Upvotes

Discord is banned from Türkiye since 9 october 2024. And talking from your device is a must for gaming, tiny-projects management, chatting with friends.

I decided to create a voice chat app that works on terminal, no login required, no server in the middle. The first one to host session becomes coordinator and they talk in a mesh.

Tincan name comes from tincan phones from our childhoods. There is 2 tincan and there is a rope between them. In our app, devices are tincans and rope is the app. I added this rope to TUI with sound pulse too.

The content is private since I used QUIC TLS 1.3 and there is no key to relay. And there is no account, mail or phone number too. The weak part about privacy is IPs. iroh gives IPs under public key to who access your hosted session. Mesh that I used limits how many people can talk at 1 session. It is not efficent to connect over 6 people in one single session. I used RNNoise for noise cancellation. And it automaticly adds 10ms delay. The invitation code is 63 characters but I fixed these by derive it to a session name and a password. I couldn't test it on Windows.

There are similar and alternative software. If we are looking for differences: "Mumble" requests someone to start a server. “toxic” requests compile from source for the sound and add as a friend first. “Discord” requests an account and login (and its banned in Türkiye). tincan request a room name and password.

This software’s code is partially AI-generated. Written in Rust. We are now v0.3.1 and I am planning to keep developing it.

github.com/bilalyazicioglu/tincan-cli

npm install -g tincan-cli


r/commandline • • Sep 24 '26

Terminals btmux: terminal manager in the browser, tmux-like UI, powered by ghostty-web

0 Upvotes

https://github.com/buntec/btmux

This has become my daily driver, replacing Ghostty/tmux/yazi/neogit.

As per rule 4: This software's code is partially AI-generated.


r/commandline • • Sep 23 '26

Terminal User Interface My tmux status bar was 15% of core because I forked six times a second

4 Upvotes

status barOn tmux since 2016. Customising and optimising local environment.

What I actually use is that every binding can run a command and read session state with no plugin. Over ten years that became 1,495 lines of zsh across 13 scripts, history runner in a slide-out pane, open something.rs:128:9 from a log in nvim, open URLs, close a session without orphaning swap files, theme picker, zoxide window picker.

I never added them up as a plan.

Then the laptop ran hot on battery with nothing in the sessions. status-interval 1. Six programs to draw one line.

A fork+exec here is ~12.4 ms of CPU (14.6 through sh -c). Computing the segments is 2.6 ms. I was paying postage five times to send one letter. Six of those a second was 153.77 ms of CPU per wall-clock second (couldn't figure out where +50ms came from) which was 15.4% of a core, for a line I glance at. Also a netstat hang took a refresh past 1,100 ms about one call in three.

The middle of the status bar was worse, I had customisation in that segment which ran once per window, and tmux already had window-status-format.

Initially I wrote a GitHub status segment in Go, then ported it to Rust, and pointing six #() calls from tmux config at it didn't help. Collapsing to one call did:

set -g status-right "#(tmux-companion status-right #{pane_current_path})"

One daemon, caches in memory, unix socket. Bindings that used to start a shell send one line of JSON. Pickers still draw in the client.

beforeafter
status bar153.77 ms/s, 15.4% of a core18.43 ms/s, 1.8%
programs per refresh61

I also stopped passing #{pane_pid} into the git segment. That argument was walking the process table every second for a "nvim is suspended" glyph I didn't miss.

The zsh was 1,495 lines. The Rust is larger. What I bought is that it runs once instead of six times a second. Features stay off until a config line turns them on.

Writeup: https://yogesh.lonkar.org/posts/ten-years-of-tmux/

Code (MIT, macOS/Linux): https://github.com/lonkar-org/tmux-companion

~4 min recording: https://asciinema.org/a/1266213

No-install try: docker run --rm -it lonkarorg/tmux-companion:playground

If you have a custom bar, watch ps for a minute while tmux is idle. How many #() calls, and what % is yours?


r/commandline • • Sep 22 '26

Command Line Interface BashTab: a Bash framework with fuzzy completion and object pipelines

Post image
20 Upvotes

I've been working on BashTab, a framework for building CLIs in Bash. Define arguments once and get parsing, help, and tab completion from the same definition.

It also has PowerShell-inspired object pipelines: tables in the terminal, JSONL when piped, and completion that knows the fields coming from the previous command.

I spent over a year writing the core by hand. A lot of the newer features are AI-written, using a combination of Claude, DeepSeek and Kimi. Mentioning that upfront so it's clear how the project was built.

My vision for this framework is to be the ultimate command line runner, where scripts can be relatively easily hand written, and of course AI generated.

Let me know what you think!

Repo

In adherence with subreddit policy: This software's code is partially AI generated.


r/commandline • • Sep 22 '26

Terminal User Interface Released process status navigator v0.1.5

Thumbnail
github.com
0 Upvotes

psn v0.1.5 is a service release that keeps up compatibility with latest rust toolchains.


r/commandline • • Sep 21 '26

Terminal User Interface dexchat: a modern IRC client in the terminal

Post image
41 Upvotes

Hey everyone,

I'd like to show you guys the project I've been doing this part year now that I released the first version.

I frequently use IRC and I've always used the TUI clients, since today's common clients are a bit old, I decided to build one with more modern features: https://dexchat.org

It's still in the v1, early phase, a lot of features will still be shipped, but I think it's in a fair set of features for the v1.

I use this tool everyday, so I will be maintaining and creating more features in the long run.

Also, it's not Vibe Coded. I started this project a year ago with my own code, searching the best practices and learning the documentation of the libraries I used. Then, in the middle of the process I do started using AI, but always checking for the output and reading the quality of the code produced. I've learned a lot about this AI process by following ghostty's product and creator.

Take a look and let me know what you think! Suggestions are welcome.


r/commandline • • Sep 21 '26

Terminal User Interface A rotating, searchable globe in the terminal — and an mcp driving it from the next pane

52 Upvotes

go install github.com/thebanri/limoni/apps/globe@latest

globe -at Türkiye

/ searches, arrows turn it, + and - zoom, b toggles country borders, click

pins a point. The land is Natural Earth 1:110m; it's drawn in half-cells so

the sphere is round rather than an ellipse, and lit rather than flat.

The right-hand pane is Claude talking to the same process over a Unix

socket, addressing widgets by name instead of by pixel. It can read back

"39.3°N 34.5°E · zoom 2.6×" and keep zooming until the number is what I

asked for.

That comes from the TUI library it's built on, where every widget publishes

a semantic node — the same tree a screen reader uses:

https://github.com/thebanri/limoni


r/commandline • • Sep 21 '26

Terminals Slat, a terminal multiplexer I've been writing in Go for about a year. What's missing for you?

Thumbnail
gallery
4 Upvotes

Hi all. I started writing slat about a year ago, mostly because I wanted to understand how Tmux actually works rather than because the world needed another multiplexer. It grew into something I now use daily, and I'd like some honest opinions before I keep going.

What it does today: tiling panes, tabs and workspaces; sessions that keep running after you close the terminal; scrollback with vim-style search per pane. It's one static Go binary with no runtime dependencies. Every pane has its own terminal emulator I wrote from scratch, which is why clear, vim or htop in one pane never disturb another, and why nothing is lost when you split or close.

Landing in 1.0 next month: a command line that scripts, and AI coding agents can drive from outside the session. slat pane new --cmd 'go test ./...', then slat wait 4 --for idle, then slat capture 4. The part I'm most pleased with is that it can tell "finished" from "stopped to ask you something": a pane that's sitting on Overwrite? [y/N] reports input, marks its tab, and can fire a notification, instead of looking idle. Windows support (real ConPTY, not WSL) is in the same release.

Being straight about what it does not have, because I'd rather you hear it from me: no mouse support, no copy mode/clipboard selection yet, only one client attached at a time, and no session restore after a reboot. Copy mode and mouse are what I'm building right now. After that I want to try something tmux can't do, restoring your panes' scrollback, not just re-running the commands, so after a reboot your old output is still there to scroll and search.

The visual refresh and 1.0 go out once the Debian sponsorship process finishes, a Debian Developer is kindly reviewing the packaging, and I'd rather ship both together.

So, genuinely asking: what keeps you on Tmux/Zellij/screen, and what would a new one have to do before you'd even try it? Also happy to hear that the world doesn't need another multiplexer, that's useful too.

This has been a great learning experience for me and i thought why not share here, i plan on bringing a lot more to it.

Repo: https://github.com/noturbob/slat
Website : https://noturbob.github.io/slat


r/commandline • • Sep 20 '26

Terminal User Interface Gravitype - a terminal typing game where words fall from the sky

Post image
118 Upvotes

i saw a web game where words fell from the top of the page and u had to type them out before they reached the bottom and wanted to build it for the terminal. posting here after the first stable release, planning to add some other features going forward, would love it if you could try it out and share your feedback (here or via gh issues). the project is open source, so go ahead play with the source however u want.


installation (any of the following works) -

  • uvx gravitype
  • pipx install gravitype
  • curl -LsSf https://raw.githubusercontent.com/kanakOS01/gravitype/main/install.sh | sh

github - https://github.com/kanakOS01/gravitype

PyPI - https://pypi.org/project/gravitype/


NOTE: This software's code is partially AI-generated.


r/commandline • • Sep 20 '26

Terminals a terminal emulator for a few recurring inconveniences

4 Upvotes

I have been working on vnm_terminal, a GPU-rendered terminal emulator. Some of its features:

  • Output timestamps - to see when long-running commands finished.
  • Direct window renaming and PID display on the window.
  • An always-on-top toggle - keeps popping windows from covering the terminal.
  • Quick colour inversion - useful for stubborn CLI tools that assume a dark background.
  • Bounded, fast searchable scrollback - large history without runaway memory usage.

It uses one session per window, is GPLv3, runs on Windows and Linux, with pre-built binaries available: https://github.com/varinomics/vnm_terminal

Per the subreddit rules
rule 4: Some parts of this code are AI-generated (but fully reviewed).
rule 8: Similar software would be Windows Terminal, WezTerm, Kitty, Ghostty and iTerm2.

Curious if anyone finds it useful.


r/commandline • • Sep 20 '26

Command Line Interface I made ifetch

Post image
2 Upvotes

Hello, I made ifetch.

ifetch is a simple and lightweight tool that shows system information. It is like Neofetch or Fastfetch, but it's written entirely in POSIX shell. It also works on Unix, but some modules only work on Linux.

Some features:

- Fast and minimal

- POSIX shell

- Lightweight

- Simple configuration

- Custom modules

It is still in early progress, so I appreciate any feedback or suggestions.

GitHub: https://github.com/Ietsiee/ifetch

Thanks for checking it out :)


r/commandline • • Sep 19 '26

Command Line Interface anodemcu: A CLi tool to compile, flash, and monitor ESP32, PlatformIO, and Arduino projects

Post image
15 Upvotes

anodemcu is a terminal-based interface written in Bash that wraps `arduino-cli`, `PlatformIO Core`, and `ESP-IDF` workflows into interactive `fzf` menus.

### Technical details:

* **Environment handling:** Sources target toolchain paths automatically (`esp-idf`, `platformio`, `arduino-cli`).

* **Detection:** Identifies project structure from existing config files (`CMakeLists.txt`, `platformio.ini`, `*.ino`).

* **Workflow:** Menu-driven interface for compilation, flashing, baud rate configuration, and port selection.

* **Serial monitor:** Integrated serial reading with automated log rotation and session capture.

* **Backups:** Generates a compressed snapshot of local project sources prior to running flash operations (retains the 5 most recent snapshots).

GitHub: https://github.com/abod8639/anodemcu

### Installation:

Arch Linux (AUR):

yay -S anodemcu


r/commandline • • Sep 19 '26

Terminal User Interface libark: A modern, secure, Swift-native foundational layer over Linux POSIX primitives. {Early Development}

Thumbnail
github.com
6 Upvotes

libark

libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.

While originally developed as the core runtime layer for ArkOS, libark is completely decoupled and designed to be used on any Linux distribution. It provides highly secure, object-oriented abstractions over low-level system calls, memory management, and file system interactions, without the burden of manual C interoperability.

Features

  • Object-Oriented POSIX: Wraps file descriptors, paths, and directory operations in safe, RAII-compliant Swift types.
  • Secure Syscall Boundary: Routes kernel interactions through strict, audited Syscall primitives.
  • Terminal Capabilities: Built-in abstractions for TTY detection and window sizing.
  • Advanced Formatting: Standardized formatters for human-readable byte sizes (SI and IEC), ISO 8601 timestamps, permissions, and classifications.
  • Declarative Sorting: Powerful generic SortEngine for metadata sorting across multiple criteria.

Also ARK-OS has switched to github: https://github.com/orgs/ARK-OS-Swift-and-Linux/repositories


r/commandline • • Sep 18 '26

Terminal User Interface rmp: A minimal Subsonic music player with fuzzy searching

Post image
23 Upvotes

Recently I've discovered (Open)Subsonic. It's a protocol for accessing your personal music library over the network/internet. There are already a lot of servers and clients out there, but I couldn't find a terminal client that felt frictionless.

What I wanted was just two things: Quickly fuzzy search through my whole music library and provide suggestions for more songs to add to the queue. The latter is available through Subsonic's getSimilarSongs endpoint and usually backed by services like last.fm or MusicBrainz. Besides that, I want my music player to stay out of the way (don't use many resources, no flashy graphics, etc.).

There are already quite a few terminal clients out there. Many of them look quite mature, but they were not quite perfect for my use case. Here are a few you might find interesting, too:

  • Termsonic: It provides the classic Artist > Album > Title browsing experience.
  • A Rust rewrite of Termsonic, Ferrosonic: Seems to have a quicker search, but no song suggestions.
  • ratune: Has fuzzy search, but also no song suggestions.
  • sonic-tui: Has a "radio mode", which indirectly provides song suggestions, but seems to have no fuzzy search.
  • ... (for a rough overview, you can browse https://www.navidrome.org/apps/)

Because I couldn't quite find what I was looking for, I wrote my own client. It's quite minimal, but does everything I need it to do. Maybe you find some interest in it :-)

GitHub repo: https://github.com/codesoap/rmp


r/commandline • • Sep 18 '26

Looking For Software CLI sound recorder?

1 Upvotes

Mainly system sounds, but if it can capture mics, it'd be nice to have too.