labnotes

have openai help you use the terminal

slipping in some ai everywhere

tags
openai
gem
cli

I was reading through swyx's new mac setup and stumbled upon this please function written in bash. Lets give it a go.

1
  curl https://raw.githubusercontent.com/pmarreck/dotfiles/refs/heads/master/bin/functions/please.bash > please.bash
1
2
  source please.bash
  please Tell me why 2>&1
I require gum but it's not installed or in PATH; from https://github.com/charmbracelet/gum
please.bash: line 38: s/'/'\\''/g: No such file or directory
please.bash: line 63: gum: command not found
please.bash: line 73: gum: command not found
Aborted.

gum

Lets install gum:

1
  brew install gum

which triggered me to run

1
2
  brew upgrade
  brew cleanup

How about a demo?

1
  wget https://github.com/charmbracelet/gum/raw/refs/heads/main/examples/demo.sh

And then run it

Back to please.bash

Inside of _generate_curl_api_request_for_please make sure you set OPENAI_API_KEY, like

1
2
  OPENAI_API_KEY=$(op read 'op://Personal/OpenAI Key/notesPlain')
  SED=sed

Then you can source please.bash

and do

1
 please search through all the subdirectories of ~/willschenk.com/content for files that contain the phrase asdf

Which looks like

That's a bit wordy but you get the idea.

Previously

labnotes

asciinema for terminal recordings

show don’t tell

tags
asciinema
cli

Next

labnotes

Adding a font to astro

very simple

tags
fonts
astro
tailwind
fontsource