Including atuin wrapped, your year in shell history 🐢
thanks @daveeddy.com for the suggestion!
Atuin v18.4 is out with an atuin wrapped command.
Here’s Ellie’s Wrapped.
...
All posts with the tag "cli"
Including atuin wrapped, your year in shell history 🐢
thanks @daveeddy.com for the suggestion!
Atuin v18.4 is out with an atuin wrapped command.
Here’s Ellie’s Wrapped.
...
new versions of just now come with color variables already set.
I found this nugget in thechangelogs justfile, it lets you add color to your justfile with variables quite easily.
# https://linux.101hacks.com/ps1-examples/prompt-color-using-tput/ _BOLD := "$(tput bold)" _RESET := "$(tput sgr0)" _BLACK := "$(tput bold)$(tput setaf 0)" _RED := "$(tput bold)$(tput setaf 1)" _GREEN := "$(tput bold)$(tput setaf 2)" _YELLOW := "$(tput bold)$(tput setaf 3)" _BLUE := "$(tput bold)$(tput setaf 4)" _MAGENTA := "$(tput bold)$(tput setaf 5)" _CYAN := "$(tput bold)$(tput setaf 6)" _WHITE := "$(tput bold)$(tput setaf 7)" _BLACKB := "$(tput bold)$(tput setab 0)" _REDB := "$(tput setab 1)$(tput setaf 0)" _GREENB := "$(tput setab 2)$(tput setaf 0)" _YELLOWB := "$(tput setab 3)$(tput setaf 0)" _BLUEB := "$(tput setab 4)$(tput setaf 0)" _MAGENTAB := "$(tput setab 5)$(tput setaf 0)" _CYANB := "$(tput setab 6)$(tput setaf 0)" _WHITEB := "$(tput setab 7)$(tput setaf 0)"
Usage
Today I discovered the Urllink function in bash from the ujust tool from ublue.it. Seems like a cool trick, but might not work everywhere.
For some reason the ublue ecosystem does not prompt you to set your hostname on install and you get a hostname like bazzite showing up. Looks like this is the fix.
hostnamectl –static hostname babyblue-aurora
Today I learned that you cannot pass negative integers as values to typer. in this case context_settings={"ignore_unknown_options": True} is required so that the - does not look like a flag.
This new demo of textual is wildly awesome, so many widgets and features being added into the main library. The themes and animations are on point and far surpass my expectations of a tui.
This page is gold. It lays out all of the distrobox assemble api with some good examples of how to get access to things like podman and kind from inside of containers.
Especially this example.
Today I learned that you can use init_hooks to access host machine commands from inside a distrobox container. This is super handy for things that you cannot get to from inside the container and need ran outside (docker, podman, flatpak, xdg-open).
I’ve had a couple of uploads to twitter fail recently and has been a pain. I tried some online converters for convenience, but none of them worked. I reached out to chatgpt and found succeess with this ffmpeg command.
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.
...
This is a pretty sick set of guidelines to help you write better cli programs, I’m definitely coming back to reading this one more in depth later.
This looks like a sweet tui postman clone. Darren is really rolling with these tui’s. Cant wait to see where this one goes.
distrobox gives you distrobox-host-exec to run commands on the host. This is handy to get access to host level clis that you probably wouldn’t want to run from the container like podman, docker, flatpak.
DESCRIPTION distrobox-host-exec lets one execute command on the host, while inside of a container.
Under the hood, distrobox-host-exec uses host-spawn a project that lets us execute commands back on the host. If the tool is not found the user will be prompted to install it.
This is my go to rich response container for clis written in python. It creates a nice box around the content on the screen and provides some nice separation in the output. It can be overdone, but comes in clutch when looking for that print statement in a long output.
Joe has a sick cli.labs site for deploying tui applications.
Authentication from cli tools can be a bit of a bear, and I have to look it up every time. This is my reference guide for future me to remember how to easily do it.
I set up a fastapi server running on port 8000, it uses a basic auth with waylonwalker as the username and asdf as the password. The server follows along with what comes out of the docs. I have it setup to take basic auth, form username and password, or a bearer token for authentication.
The og of command line url tools.
# basic auth curl -u 'waylonwalker:asdf' -X POST localhost:8000/token # basic auth with password prompt curl -u 'waylonwalker' -X POST localhost:8000/token # token curl -H 'Authorization: bearer...
...
Full list of imagemagick color names.
Textual is so sick, Will just made a live markdown editor in the terminal!
hashi vault lets you manage secrets right from your cli.