/r/commandline

Photograph via snooOG

This is for anything regarding the command line, in any operating system. All questions (including dumb ones), tips, and links to interesting programs/console applications you've found or made yourself are welcome. Linux / BSD / OSX / Windows CLI and TUI apps or questions or comments, we're happy to take them all!

  -----------------------------

/ This is for anything
| regarding the command line, | | in any operating system. All | | questions (including dumb | | ones), tips, and interesting | | programs/console applications | | you've found or made yourself | | are welcome. Please read the | | rules, and you're welcome to | | flair your posts if you want |

\ to. /
\   ^__^
 \  (OO)\_______
    (__)\       )\/\
        ||----w |
        ||     ||

commandline@reddit ~ $ _


If you're asking for help, remember to help the community by stating what OS and version you're using, and if at all possible paste any commands you've tried and any errors or output that you've seen.


Related subreddits:

/r/commandline

98,995 Subscribers

1

pip install markdrop

I’m excited to share my Python package, **Markdrop**, which has hit 6.17k+ downloads in just a month, so updated it just now! 🚀 It’s a powerful tool for converting PDF documents into structured formats like Markdown (.md) and HTML (.html) while automatically processing images and tables into descriptions for downstream use. Here's what Markdrop does:

# Key Features:

* **PDF to Markdown/HTML Conversion**: Converts PDFs into clean, structured Markdown files (.md) or HTML outputs, preserving the content layout.

* **AI-Powered Descriptions**: Replaces tables and images with descriptive summaries generated by LLM, making the content fully textual and easy to analyze. Earlier I added support of 6 different LLM Clients, but to improve the inference time, restricted to Gemini and GPT.

* **Downloadable Tables**: Can add accurate download buttons in HTML for tables, allowing users to download them as Excel files.

* **Seamless Table and Image Handling**: Extracts tables and images, generating detailed summaries for each, which are then embedded into the final Markdown document.

At the end, one can have a **.md** file that contains only textual data, including the AI-generated summaries of tables, images, graphs, etc. This results in a highly portable format that can be used directly for several downstream tasks, such as:

* Can be directly integrated into a RAG pipeline for enhanced content understanding and querying on documents containg useful images and tabular data.

* Ideal for automated content summarization and report generation.

* Facilitates extracting key data points from tables and images for further analysis.

* The .md files can serve as input for machine learning tasks or data-driven projects.

* Ideal for data extraction, simplifying the task of gathering key data from tables and images.

* The downloadable table feature is perfect for analysts, reducing the manual task of copying tables into Excel.

Markdrop streamlines workflows for document processing, saving time and enhancing productivity. You can easily install it via:

pip install markdrop

There’s also a **Colab demo** available to try it out directly: [Open in Colab](https://colab.research.google.com/drive/1ZebtmqGB9i4pZzo824aT5KzGuPikw6D9?usp=sharing).

[Github Repo](https://github.com/shoryasethia/markdrop)

If you've used Markdrop or plan to, I’d love to hear your feedback! Share your experience, any improvements, or how it helped in your workflow.

Check it out on [PyPI](https://pypi.org/project/markdrop) and let me know your thoughts!

0 Comments
2025/02/01
03:44 UTC

9

Procedural 2D Terrain Generator

1 Comment
2025/02/01
01:56 UTC

2

switching esc/caps-lock in tty, /etc/vconsole.conf

I'm wondering what you guys do to swap esc and capslock for tty, i don't want to effect x11 or wayland setting which i run when graphical?

is there a shorthand way of accomplishing this in /etc/vconsole.conf?

Running arch linux but am curious about other major distros or even openbsd!

0 Comments
2025/01/31
20:44 UTC

8

zsh-pre-commit-autocomplete

Enhancing your pre-commit experience with seamless hook autocompletion 🎢

GitHub: https://github.com/jason810496/zsh-pre-commit-autocomplete

0 Comments
2025/01/31
13:50 UTC

0

What is the fastest way to switch branches?

I use OMZ, but...

✗ gsw
fatal: missing branch or commit argument

Or

✗ gsw
zsh: do you wish to see all 135 possibilities (135 lines)?

I would really like to push two buttons to go to 1 of the 10 latest branches I worked on.

13 Comments
2025/01/31
13:09 UTC

12

📺 nix-search-tv: integration between nix-search and television

Hello everyone,

I built a small tool I had been wanting for a while: a "television channel" for Nix packages.

You can check it out here: https://github.com/3timeslazy/nix-search-tv

It's built on top of awesome and fast nix-search package. Right now, it allows you to fuzzy search nixpkgs, but I’m considering adding support for home-manager and nix-darwin as well.

Also, I would like to say big thanks to the contributors of nix-search—this project wouldn't exist without their work

2 Comments
2025/01/30
19:24 UTC

2

Notation to switch regular expression to case sensitive matching?

Hi,

I'm working on a command line tool taking regular expressions as arguments:

$ ./app column=regexp1 +regexp2 -regexp3

It basically filters a table of rows, the comand line arguments constraint the relevant/interesting rows:

  • foo=regexp1 matches a row where the column foo value is characterized by regexp1
  • +regexp2 denotes that regexp2 must be included in a certain column (contains)
  • -regexp3 denotes that regexp3 must NOT be included in a certain column (contains not)

By default, the provided regular expressions match some text case insensitive. This is not negotiable, because it's critical to get rather more than to few results.

Now, can you think of an established notation/syntax that switches to case sensitive matching that plays well on the shell / command line?

In the world I know, the default is reverse. Matching happens case sensitive by default and it's possible to switch to case insensitive. For example,

  • in perl, /foo/i matches case insensitive (i for ignore case)
    • what's the opposite of 'i'? :)
  • in vim, one can provide \c and \C to specify the case to use.
    • vim's notation doesn't play well on the command line (e.g. bash) because \c needs to be written as \\rc or "\cregexp1" so the application gets it (escaping), which looks somewhat awkward.

I somewhat like the /foo/ notation, as at least in the unix world it's somewhat known that a regular expression is meant with that. It also opens room for extension (funny letters after the last /).

The other idea I had was to introduce command line options denoting the case sensitivity, but as you see from the example invocation above, that somewhat conflicts with the -regexp3 notation above:

$ ./app column=regexp1 +regexp2 -c -regexp3

the -c could mean: "the following regexes are to be matched case sensitive!".

Is there a notation you know that would fit here? What would be intuitive for you? :)

3 Comments
2025/01/28
21:51 UTC

10

New to command line, how to format tables like this?

Hey all, new to the command line and wanted to start by remotely controlling our site. I have Oh My Zsh installed, but when I run something like `wp plugin list`, it gives me this:

WP Plugin List - no formatting

Conversely, when I run on another program (Local by Flywheel - use the integrated site shell), I get something like this:

Nice and easy to read

I'm using iTerm2. Any ideas how I can achieve result 2?

14 Comments
2025/01/28
14:31 UTC

0

Why does this keep on happening?

My USB pluggin is fine, i tried various methods and other updates and it's still not working, like how to fi it?

2 Comments
2025/01/28
08:20 UTC

0

Please recommend xpath tool. (xpath 2, html files support)

Title.

3 Comments
2025/01/27
22:26 UTC

10

[ANN] rsnip: A Command-Line Snippet Manager with Dynamic Templates and Fuzzy Search

Hey fellow CLI workers!

I'd like to share rsnip, a command-line snippet manager designed to make CLI workflows more efficient. Whether you’re juggling shell commands, git workflows, or custom scripts, rsnip makes searching snippets FAST and more productive.

We’ve all been there: searching for that one command or code snippet we know we used before. While tools like ChatGPT are amazing for new ideas, for repeated tasks, they’re slow and unreliable. Shell history is fast but limited. What I would like to have:

  • Fuzzy Search: very-fast snippet lookup with an fzf-style interface.
  • Dynamic Templating: Jinja2-style syntax for variables, dates, and even shell commands (e.g., {{ env_USER }} or {{ current_date|strftime('%Y-%m-%d') }}).
  • Deep Shell Integration: Customizable aliases, tab-completion, and clipboard support for efficient workflows.

demo

If this sounds like it might also help your workflow give it a try: cargo install rsnip

I'd appreciate your feedback!

0 Comments
2025/01/27
20:38 UTC

195

play v0.3.5 - TUI playground for grep, sed, awk, jq and yq

It now supports color themes too. Which color theme would you like me to add?

11 Comments
2025/01/27
17:07 UTC

2

Open source visual command history from prefix?

I'm using Warp terminal, and I'd like to move to something more private and open (ideally Ghostty).

However, one feature it has me stuck on it is the visual command history. If I type "ls" then up_key, it shows every my command history filtered to that prefix. I'm looking for a good open alternative to this in zsh or fish.

I tried zsh-autosuggestions and it is nice, but only shows the one. I usually have many I want to look at visually.

I do care about the the UX/keybindings. "up" is pretty hooked into history in my mind and will be hard to reprogram myself. Being able to hit "up" after typing the start is also important to me (I don't realize I need this until I'm part way into typing).

After typing \"ls\" then up_key

8 Comments
2025/01/27
16:32 UTC

60

I MADE A SHELL!!1

Idk if anyone remembers me from my kotek os post, but since then i switched to making an alpine based distro and today i was able to make a very basic shell! (Made in arch, and will be implemented into my alpine iso soon!)

28 Comments
2025/01/27
14:16 UTC

0

I want lynx to be able to handle :magnet links for my "linux ISOs". Do not understand how the EXTERNAL configuration stuff works.

Desired outcome is... Select magnet link, pass magnet url to transmission-remote.

I have tried placing test commands in /etc/lynx.cfg, ~/.lynxrc, ~/.lynx/external

Errors I've gotten.

LYrcFile: missing '=' EXTERNAL:magnet:echo "Magnet link clicked: %s" >> /home/luke/Lynx.trace

LYrcFile: ignored EXTERNAL=http:echo "POSTs" >> /home/[name]/test.txt

https://pastebin.com/p218ZNLz

https://imgur.com/a/6iIJTAj

I cannot get ANY functionality out of the EXTERNAL command modules.

I have tried everything I can think of any recommendations would be greatly appreciated.

1 Comment
2025/01/27
07:04 UTC

3

Do You Use Nix and Work on Servers? Spin Up a Quick Modular Editor Setup!

Title: Try My Quick Configured Editor with One Command

Github

nix run "github:niksingh710/nvix#bare"

Also, check out Github.

This is not an editor meant to be used by everyone, but rather a modular setup that anyone who loves it can easily adopt and customize.

0 Comments
2025/01/27
06:50 UTC

49

Browse Your Library From The Terminal (Calibredb tui wrapper) v0.2.0

4 Comments
2025/01/27
05:40 UTC

53

clouddrift: ascii terminal screensaver

5 Comments
2025/01/25
09:14 UTC

1

nslookup

3 Comments
2025/01/24
16:41 UTC

52

Any free monospace fonts that look like Code Saver?

23 Comments
2025/01/24
15:08 UTC

42

terminal-svg-screenshot: Create beautiful, editable SVG screenshots of your terminal output

Hey r/commandline!

I created a tool that captures terminal output as SVG screenshots. It's designed to help developers create high-quality, editable terminal screenshots for documentation, blog posts, and presentations.

Key features:

  • SVG output - fully editable in Figma/Illustrator
  • Customizable themes
  • Font outlining support
  • Clean, professional look

Example screenshots below (Note: These are PNG previews. Check out the GitHub repo for the actual SVG files which are fully editable!)

https://preview.redd.it/tdrktonq6yee1.png?width=1326&format=png&auto=webp&s=ab7787ebd4e6b0925612d03007d19bbb9d46fd53

https://preview.redd.it/irqckpnq6yee1.png?width=1103&format=png&auto=webp&s=4c634f129ad53a7ae117080ed6c494577ca1c9fc

https://preview.redd.it/j7r0znnq6yee1.png?width=1929&format=png&auto=webp&s=0c3d8e316ef8fee7624787f05af780aa36767452

https://preview.redd.it/c24foonq6yee1.png?width=2464&format=png&auto=webp&s=ce73db3f9701f557594f326c9227ce48a0368646

https://preview.redd.it/939xoonq6yee1.png?width=768&format=png&auto=webp&s=40ac0dd078d1d399b93b305a5cbc66ca8d9296fe

The tool uses tmux and Charm's freeze to capture and style the output. You can customize colors, fonts, and other visual elements through a simple JSON config.

GitHub: https://github.com/suin/terminal-svg-screenshot

I'd love to hear your thoughts and feedback!

8 Comments
2025/01/24
13:58 UTC

0

I need sth exactly like this but for my macOS terminal

15 Comments
2025/01/24
06:50 UTC

0

i feel like this should be public knowloge, put on .bashrc on linux

run() { echo "$@" | (nohup ${SHELL:-"/bin/sh"} &) >/dev/null 2>&1; }

it runs programs with nohup, basicaly allows you to run programs without making them dependent on the terminal.

8 Comments
2025/01/24
03:42 UTC

72

Lab: A zero-friction CLI tool for quick code experiments

I made a tool to eliminate the friction when you want to quickly test some code. Type lab with any extension and start coding immediately - no thinking about filenames or directories.

Key features:

  • Instant start: Type lab with any extension to open a new file
  • Smart organization: Files auto-named with date+letter (e.g., 250112a)
  • Quick access: lab 1 opens most recent file
  • Auto cleanup: Files expire after 7 days (configurable)

The goal was to remove all overhead between "I want to try something" and actually writing code. Files live in ~/lab and clean themselves up - no management needed.

https://github.com/lugenx/lab

Feedback welcome! Made with Go.

33 Comments
2025/01/23
22:37 UTC

127

3D Pikachu in console

9 Comments
2025/01/23
20:49 UTC

2

maildir-rank-addr v1.4.0 (now not just for maildir)

maildir-rank-addr is a utility that generates a ranked addressbook from your locally available email. It can be used in MUA's like aerc or mutt by grepping the list, making actual address completion very fast.

Noteable changes are dropping the need for the folder structure to be explicitly maildir and also parsing mboxes, multiple source dirs, and a smarter handling of mailing lists (via the list-id header).

There's also an open issue about adding direct imap/jmap support. It would at quite a bit of complexity, but if it looks like people would use it, then it might be worthwhile to do it, so please chime in if this interests you.

0 Comments
2025/01/23
15:46 UTC

17

Zip-Stream-CLI: Stream and View ZIP File Contents Directly in Your Terminal

Zip-Stream-CLI: Stream and View ZIP File Contents Directly in Your Terminal

👋 Hey everyone!

I’m happy to share a new Node.js tool I’ve been working on, called Zip-Stream-CLI! 🚀

What does it do?

Zip-Stream-CLI allows you to stream, extract, and display the contents of a remote ZIP file directly in your terminal—without downloading the entire archive! 📦 It supports multiple file types, including:

  • 📄 Text files (like .txt, .md, .json)
  • 🎶 Audio files with live waveform display (like .mp3, .wav)
  • 🖼️ Images as pixel art (like .png, .jpg)
  • 📚 PDF files and spreadsheets (like .pdf, .xls)
  • 💻 Code files with syntax highlighting (like .js, .py)
  • And many more, including archives like .tar, .gz.

Demo:

Processing img 2kjdi6jassod1...

Why did I create it?

I wanted a fast and efficient way to preview the contents of ZIP files directly from the terminal, especially when dealing with large archives. Instead of extracting the entire file, you can stream specific files and view them instantly in a visually appropriate format.

Features:

  • Stream content: Extract and display content progressively, perfect for large audio files and images. 📊
  • Modular handler system: Add custom handlers to support new file types. 🛠️
  • Lightweight: No need to install heavy desktop apps—everything is done via the command line. 💻

How it works:

Simply provide a remote URL to a ZIP file, and the CLI tool will list its contents. You can choose a file to stream or view directly in your terminal. 🖥️

Example usage:

zip-stream-cli https://example.com/my-archive.zip

You can also extend the tool by adding custom handlers for any file type that isn’t already supported!

Why you might find it useful:

If you work with ZIP files often, this tool can save you time by allowing you to quickly preview the content without extracting everything.

🔗 Link to the project:

You can find it on GitHub: Zip-Stream-CLI on GitHub

I’d love to get your feedback! 💬 If you have any feature suggestions or ideas, feel free to share them. And if you give it a try, let me know how it works for you!

2 Comments
2025/01/23
11:29 UTC

Back To Top