HACKER Q&A
📣 parentheses

Best thing you've made in CLI


Mine: https://github.com/bigH/git-fuzzy

Bonus points if you have something you're currently working on.


  👤 pseudo_meta Accepted Answer ✓
I once made a pretty dashboard: press `enter` on an empty terminal buffer to display a short git log, overview of files, and git diff stats, all colorized and iconized. https://github.com/chrisgrieser/zsh-magic-dashboard

Otherwise, I have a bunch of small utilities in my dotfiles. One of my favorites is this one for interactive staging/unstaging of files with git. Thanks to `fzf`, implemented with only ~15 loc.

```bash function ga { local dir="$PWD" cd "$(git rev-parse --show-toplevel)" || return 1 local check_staged='if git diff --cached --name-only | grep -q "^"{2..}"$" ; ' local add_or_unadd='then git restore --stage -- {2..} ; else git add -- {2..} ; fi' local file_diff='{ git diff --color=always -- {2..} ; git diff --staged --color=always -- {2..} }' local git_status_cmd="git -c core.quotePath=false -c status.color=always status --short --untracked-files" selection=$( eval "$git_status_cmd" | fzf \ --ansi --nth=2.. --track \ --preview="$file_diff | delta --file-style=omit" \ --bind="enter:reload($check_staged $add_or_unadd ; $git_status_cmd)" ) cd "$dir" || return 1 return 0 # no exiting 130 } ```


👤 dvcoolarun
Mine: https://github.com/dvcoolarun/web2pdf

Small command-line tool to convert webpages to beautifully formatted PDFs. It supports batch conversion, custom styling, appending CSS, complex layouts, page numbers, table of contents, and pagination, among other features.

Recently: https://news.ycombinator.com/item?id=39265756


👤 hiAndrewQuinn
It ain't much, but it's honest work: https://github.com/hiAndrewQuinn/finstem

I moved to Finland a few years ago to be with my then-fiancee, now-wife. I started learning Finnish and found that constantly going to Wiktionary to search for the root forms of their words was tough. Finnish nouns can have stem changes, vowel harmony, 15 declensions, possessive endings, clitics similar to Japanese particles... Brutal!

I wrote this to let me very quickly strip away all of that and get just the original dictionary forms of words. Later I wrapped it into a little `fzf` script to make it easy to analyze entire sentences or paragraphs at once.

The code is nothing special at all, but I use this thing dozens of times daily, and it's never let me down. I'm especially happy that it is useful for non-programmers as well -- I'd like to wrap it into a simple web app and throw that online too someday, once I've reached my own language goals of course!


👤 sandreas
Probably tone[1] (audio tagger) or m4b-tool[2] (audio book merger), although both projects could use a little love :-)

1: https://github.com/sandreas/tone

2: https://github.com/sandreas/m4b-tool


👤 asicsp
If TUIs count: https://github.com/learnbyexample/TUI-apps - interactive exercises for Python regex and CLI text processing tools (grep, sed, awk, perl, head, tail, paste, pr, etc). Made with Textual, a Python framework.

👤 ketanmaheshwari
Reposting my comment from earlier: I once created a bash pipeline debugger that preserves the intermediate outputs. Has a few limitations but maybe generally useful: https://github.com/ketancmaheshwari/pd

👤 eqvinox
https://www.youtube.com/watch?v=8psFQCEgA18

The fact that our CLI client (talking to multiple daemons) can pull and display log messages from the daemons, live, without breaking interactive user input.

It's such a simple idea, not quite as simple to implement, but such a massive UX improvement.

https://github.com/FRRouting/frr/blob/aa6ceeeb5b1f92280ee797...


👤 gsuuon
I spent way too long looking for an xplat lf/ranger that I can just use with cd without having to write the selected directory to a temp file (which then gets complicated if you want something portable across shells) so I made a directory navigator that renders to stderr and only the final directory selection goes to stdout https://github.com/gsuuon/FNav

👤 behnamoh
AutoCisco: https://aplaceofmind.notion.site/AutoCisco-My-First-Project-...

I used Rust to automate the process of opening the company's VPN app, entering credentials, and disconnecting after I'm done. I did it because the company uses SSO and it's a PITA to enter long usernames and passwords each time you want to simply ssh into a machine for a few minutes. Autocisco takes care of that.

macOS only. Also available on Homebrew.


👤 kal247
Interactive fuzzy search of bookmarks, with multiple selection (thanks to fzf). Various sources (browsers, files) and URI schemes are supported.

Bookmarks should stay where they belong. I wrote this script to avoid duplicating them to another database/file (as most bookmark managers do).

Tip : macOS `open` command handles URI schemes, meaning it's possible to search, select and open at once links for http, ssh, ftp, local directories, etc..

https://github.com/kal247/App-bookmarks


👤 lijunhao
I am developing x-cmd.

Demo website: https://x-cmd.com Code is here: https://github.com/x-cmd/x-cmd

I have spent 3 years on this project. A lot of important modules using sh/awk are introduced, like json parser module, tui module, which make implementing rich but lightweight cli with sh/awk/curl possible.

X-cmd also providing a pkg system with 500+ pkgs. No root priviledge required when installing x-cmd and x-cmd's pkg.


👤 JustSteveKing
I am launching a CLI tool this week that allows you to get insights into your Open API specification. It is currently a beta pre-release, but built using Go and pTerm - it was a lot of fun if I am honest!

https://github.com/Treblle/treblle-cli


👤 palashkulsh
I inherited jira-cmd from it's original author and added ton of functionalities to make my office life easier. I've been using it daily for the past 8 years.

The most used feature for me is i can save templates for jira like creating same type of jira (epic tagged, with labels, mandatory fields,and any other constant components, ) with multiple titles.

https://github.com/palashkulsh/jira-cmd


👤 instantiator
JsonToSmartCsv: https://github.com/instantiator/json-to-smart-csv

It's a little tool to help flatten JSON down to rows of CSV data.

If necessary it'll duplicate data in rows to achieve that (ie. if you need to iterate through objects within objects...)

It's highly configurable, so things can get fun and complicated if you need them to.


👤 rozenmd
I helped make wrangler v2 - it's a CLI for interacting with Cloudflare's Developer Platform: https://github.com/cloudflare/workers-sdk/blob/main/packages...

👤 Zaloog
I developed a kanban cli tool with some features like report creation and automatic task scanning.

You can jnstall it with: pipx install kanban-python

Source Screenshots +Feature list under: https://github.com/Zaloog/kanban-python


👤 n8henrie
https://github.com/n8henrie/hc-runner

Another wrapper for piping things to healthchecks.io, my first exercise to wrangling CLI and layered config in rust (and frankly -- in spite of my love for rust -- made me miss some of the better established / batteries-included options in python / go).

In large part inspired by the privacy / sandboxing in modern MacOS, for which you can "allowlist" a binary (meaning you'd have to e.g. allow the whole python interpreter as allowing a .py script doesn't work), so I can allowlist the hc-runner binary and anything it runs will not further prompt me for permissions.

(Which has obvious security implications.)


👤 tomaspollak
https://tomas.github.io/jix/

Yet another Git client for the terminal. ;)

It's been on "coming soon" mode for some time now, because I haven't gotten the time to finish some stuff that's missing (handling merges, conflicts, rebasing, etc).

Still, I use it on a daily basis! It really makes crafting commits much faster.