Posts tagged: cli

All posts with the tag "cli"

54 posts latest post 2026-03-04
Publishing rhythm
Mar 2026 | 2 posts

Ses_3444b09b1ffexter3elfg5qqtg

Session ID: ses_3444b09b1ffeXTEr3ELFg5qqtg Created: 3/4/2026, 7:55:24 PM Updated: 3/4/2026, 8:52:32 PM

I want to spec out a cli for tmux session switching in go.

keymap

...

17 min read

I Built A Tmux Session Switcher

I’ve been thinking about this for awhile now. For years now, fuzzy pickers and last session have been my go to. They have served me well. I can typically only keep so much in my head anyways. I’m often doing a hub and spoke pattern between main project, notes, and infra repo, maybe two projects. Don’t get me wrong, I regularly run with a dozen or more sessions running at a time, but only two to three are in my immediate context at any point anyways.

harpoon for tmux

SIMPLE, FAST, thats of upmost importance, what I want are sessions that I can press a hotkey followed by one more keystroke, currently any left hand letter can be assigned in order of importance from middle row, top row, bottom row.

...

3 min read

Yeah there’s some basics, you know things you might expect like using standard error and standard out correctly. One thing I’ll say on that because I think this is commonly misunderstood, standard error is not for errors, it’s for any information that isn’t part of the normal output. So you know often times that’s warnings and errors, but it might just be progress information. You know anytime that you just need to have something go to the user that’s what it’s there for." (6:15 - 6:42)

I’ve definitely done this sin in my own tooling before, and it does make things harder to use. I think I still take err/out at face value. I really like the translation Jeff gave here, one is for normal output, i.e. what the user asked for and the other is extra information. So if I wanted to list something and pipe it into something else, stdout only captures the list, thats it. if you have a bunch of information about config warnings, showing environment, are you sure questions, none of that is captured.

When using two GitHub accounts the gh cli gives very easy gh auth switch workflow from the cli.

gh auth switch –help Switch the active account for a GitHub host.

This command changes the authentication configuration that will be used when running commands targeting the specified GitHub host.

If the specified host has two accounts, the active account will be switched automatically. If there are more than two accounts, disambiguation will be required either through the --user flag or an interactive prompt.

The tea command for gitea (used by forgejo) has a flag for login. With gitea you can have multiple accounts logged in. When you try to run a command such as repo create it will prompt you which login to use, but I learned that you can bake it in to all of them with --login <login-name>

Atuin desktop sounds dope AF, tried to install it off the AUR and it was broken for me. Seems early and the dev team is all in on mac. They have an official .deb and .rpm. I’ll have to try again later, maybe the binary will work.

The idea of building out runbooks from my Atuin data sounds dope AF. It sounds like a mix of markdown and executable cells like a jupyter notebook, but not. Really pitching hard to those of us in the system administration, dev ops, SRE space. Having something that you walk through when a system goes down and you are feeling panicked in DR mode sounds relieving.

Using pbpaste for command substitution keeps sensitive or long URLs out of your shell history. Instead of typing git clone https://github.com/user/repo-with-long-name.git, copy the URL to clipboard and run git clone "$(pbpaste)". This prevents the URL from appearing in ~/.bash_history or ~/.zsh_history.

To get pbpaste working on both Xorg and Wayland, add this to your shell config:

if [[ $(command -v wl-copy) ]]; then alias pbcopy='wl-copy' pbpaste() { wl-paste; } elif [[ $(command -v xclip) ]]; then alias pbcopy='xclip -selection clipboard' pbpaste() { xclip -selection clipboard -o; } fi

The function approach (instead of alias) enables command substitution, while the quotes around $(pbpaste) handle spaces and special characters safely.

Now you can use it.

...

dust is one of my favorite rust rewrite tools. Its so useful for narrowing down file system bloat and cleaning up some disk space on your nearly full disks. It runs right in your terminal and gives you a nice bar graph on the top directories in use.

50 minutes into this episode they start a discussion on seo, and naming posts. They give Jerod the task of googling for tmux and see how high up the ranking they find Nick, expecting a number one post, and he cant even get to Nick.

The problem? Jerod is such a beginner he doesn’t even know what to search, he starts with a long query about getting started with tmux, but all of Nick’s videos are why you should use advanced features of tmux, but Jerod has yet to discover that these exist.

As experts we often come up wtih a post title for the exact thing that we are trying to teach someone how to do, but yet, they haven’t discussed that they need that feature yet, they just want the getting started guide, or tell me why I should start using tmux. Not why sessions are better than windows, and tabs suck all together.

Definitely an eye opening conversation listening to two experts sit in shock as the beginner just gets dropped big tech articles, and Nick Jani-freakin-takis doesn’t even hit the query page after page.

...

I think just, might just be the thing I have been looking for. I’ve been looking for some ci/cd that I can host myself, but everything looks pretty big, so for now I am going to use just as my task runner.

I installed with installer.

curl https://i.wayl.one/casey/just | bash

I set up my devtainer builds with just. Here is my justfile, yes you just need the cli and a file named justfile.