These three scripts can provide you a cursor style CMD+K Like experience in any terminal.
- Set
logged-shell
to be your default shell for your terminal emulator.shell = /path/to/logged-shell
in~/.config/kitty/kitty.conf
for kitty users. - This will stream both the inputs and outputs of your terminal session into a file defined at
$SHELL_LOG_FILE
- The
ai-bash-command
will take a user prompt, add the shell as context, and call OpenAI (with theai
command) to get the bash command that satisfies the prompt. - It will type the results back into your terminal using
wtype
for wayland users.