Posts tagged: cli

All posts with the tag "cli"

100 posts latest post 2026-06-29
Publishing rhythm
Jun 2026 | 2 posts

git push without setting upstream

Finally after years of hand typing out a full I found there is a setting to automatcally push to the current branch. More realisitically I just did a let git yell at me, and copying the suggestion. git config # This one setting will now to the current branch without yelling at you that your upstream does not match your current branch. This helps me ship chnages faster as I am constantly chnaging projects and branches.
1 min read

simple click

cli tools are super handy and easy to add to your python libraries to supercharge them. Even if your library is not a cli tool there are a number of things that a cli can do to your library. Example Ideas # Things a cli can do to enhance your library. 🆚 print version 🕶 print readme 📝 print changelog 📃 print config ✏ change config 👩‍🎓 run a tutorial 🏗 scaffold a project with cookiecutter 🖱 Click # Click is the most popular python cli tool framework for python. There are others, some old, some new comers that make take the crown. For now Click is the gold standard if you want to make a powerful cli quickly. If you are dependency conscious and dont need a lot of tooling, use argparse. Project Structure # ❯ cli.py # ✨ init.py # For our simple_click library can be left empty. It is here purely to signify that simple_click is a library. It is likely that you will import other modules here that need to reside at the top level of your library api, your cli does not need to be at the top of of…

cmd.exe tips

I spend a lot of my time at the terminal for my daily work, mostly in Linux or wsl. One big reason for using wsl over cmd.exe is the ease of walking through history that fzf provides. This week we had a windows bug in a cli and I was stuck in vanilla cmd.exe 😭 > Cmder # First off if you are stuck using cmd.exe, do yourself a favor and get cmder. It makes life just a bit easier. It is super confugurable and comes with several power ups that make it a bit more enjoyable than cmd.exe. History # F7 - Scroll through history F8 - Search history based Example #.bat # The next simple technique is to save your commands into a.bat file. Any valid command ran with cmd.exe can be saved into a bat file and called again later by running it in the terminal. save your command use f7/f8 to get your command back add at the end, hit the home key and add echo to the front. Do not wrap with quotes. This is not bash. » append type not cat # To ensure that you got the command right… and didn’t forget that yo…
2 min read

Supercharge Zsh Startup

I have been using oh-my-zsh successfully for about 2 years now. But lately my startup time has been really bothersome. It has grown to the point where it was taking about 5.5s to startup a shell! This is ok if I am going to spend some time in here for awhile and do some work that benefits from all of the autocompletions, plugins, and shortcuts that oh-my-zsh brings. But to only jump in to run a handful of commands is infuriating. 📑 My Setup # I believe the real issue is io speed on wsl. I have some remote servers with similar configs that are 10x faster or more, loading in 100s of milliseconds rather than seconds. Sourcing all of the individual plugin files are just too much for it. 💨 How Fast can it be # Quick side note: your zsh config is controled by your ~/.zshrc file. This file can source other files, load plugins, or run literally anything. Time the initial time Move your ~/.zshrc config file. Time the fastest startup possible with nothing in your ~/.zshrc config file. Move your…

Amazon Web Services

I started using aws in March 2019. Here are some of my notes. aws-cli # ec-2 # SageMaker # S3 #
1 min read

📝 Bash Notes

Bash is super powerful. File System Full # Show Remaining Space on Drives show largest files in current directory Move files then symlink them Fuzzy One Liners # edit in vim cat a file bash execute git add git reset Kill a process Finding things # Files # fd-find is amazing for finding files, it even respects your file 😲. Install with. ++Vanilla Bonus Content # ** show matching text ** ++Vanilla Bonus ** show file names only ** ++Vanilla Bonus Recursively Replace text # ++Vanilla Bonus Extending or There are so many options inside of,, and that you could many an enormous amount of these if you really wanted to, but I like to keep it simple. These cover 90% of my usage. If I wanted to change something in the second half I would just paste in this command and edit it. More often though I want to limit the input, say only replace word1 to word2 inside of markdown files. Limited Scope ++Vanilla Bonus Large Refactor At The Command Line I use these replace commands heavily when doing large r…

Keyboard Driven VSCode

Throw that mouse Away its time to setup some keyboard shortcuts. These sortcuts were the baseline for switching from tmux/vim to vscode. Most folks posts I was able to find gave great tips on replacing vim, but very few have focused on the hackability of tmux. tmux allows me to rapidly fire up a workspace, create new windows and splits. Then When I switch tasks I can leave that workspace open and and jump right back in later exactly where I left off. There is nothing quite like it. The shortcuts listed here make the transition a bit better. The worst thing I found when using vscode at first was no way to switch between the terminal and editor without the mouse. This first set of keybindings solve that issue. The worst thing I found when using vscode at first was no way to switch between the terminal and editor without the mouse.!!! see-also I have an updated article in my tmux workflow How I navigate tmux in 2021 Alt+[hjkl] # navigation ⬅ jump to left split alt+h ⬇ jump to terminal fro…