5 ms·
Ask HN: 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.
- palashkulsh 3y agoI 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 https://github.com/palashkulsh/jira-cmd
- parentheses 3y agoStarring that for Monday. I'll give it a go!
- sandreas 3y agoProbably 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 https://github.com/sandreas/tone 2: https://github.com/sandreas/m4b-tool https://github.com/sandreas/m4b-tool
- pseudo_meta 3y agoI 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 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 } ```
- lijunhao 3y agoI am developing x-cmd. Demo website: https://x-cmd.com https://x-cmd.com Code is here: https://github.com/x-cmd/x-cmd 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.
- rozenmd 3y agoI helped make wrangler v2 - it's a CLI for interacting with Cloudflare's Developer Platform: https://github.com/cloudflare/workers-sdk/blob/main/packages%2Fwrangler%2FREADME.md https://github.com/cloudflare/workers-sdk/blob/main/packages...
- asicsp 3y agoIf TUIs count: https://github.com/learnbyexample/TUI-apps 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.
- eqvinox 3y agohttps://www.youtube.com/watch?v=8psFQCEgA18 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/aa6ceeeb5b1f92280ee79716e68d31c9a8686230/vtysh/vtysh.c#L3912-L3982 https://github.com/FRRouting/frr/blob/aa6ceeeb5b1f92280ee797...
- tomaspollak 3y agohttps://tomas.github.io/jix/ 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.
- hiAndrewQuinn 3y agoIt ain't much, but it's honest work: https://github.com/hiAndrewQuinn/finstem 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!
- n8henrie 3y agohttps://github.com/n8henrie/hc-runner 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.)
- dvcoolarun 3y agoMine: https://github.com/dvcoolarun/web2pdf 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 https://news.ycombinator.com/item?id=39265756
- behnamoh 3y agoAutoCisco: https://aplaceofmind.notion.site/AutoCisco-My-First-Project-in-Rust-c40c831d5eb0447ea9246c0514558195 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.
- ketanmaheshwari 3y agoReposting 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 https://github.com/ketancmaheshwari/pd
- parentheses 3y agoThis is really useful! Some ideas: Use single quotes in all your examples in the docs. '$1' doesn't expand but "$1" does. Also, if you can create a zsh function that can be mapped to a key like Alt-P (for analyze pipelines), then treat the entire line like a string and pass it to `pd`. Or, you could have it wrap and escape the command by editing the command line: `NEW_COMMAND="pd $(printf '%q' "$BUFFER")"` This also solves for mixed use of quotes like single and double quotes. Once I discovered it, I used it in all my scripts for treating strings in bash properly.
- Zaloog 3y agoI 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 https://github.com/Zaloog/kanban-python
- kal247 3y agoInteractive 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 https://github.com/kal247/App-bookmarks
- instantiator 3y agoJsonToSmartCsv: https://github.com/instantiator/json-to-smart-csv 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.
- gsuuon 3y agoI 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 https://github.com/gsuuon/FNav
- JustSteveKing 3y agoI 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 https://github.com/Treblle/treblle-cli