🔧 Where my dotfiles lives in harmony and peace, most of the time

♻️ Centralize llm install and templates

+4
Makefile
··· 53 53 terminal: 54 54 @ $(DOTFILES)/terminal/setup.sh 55 55 56 + .PHONY: llm 57 + llm: 58 + @ $(DOTFILES)/llm/setup.sh 59 + 56 60 .PHONY: hypr 57 61 hypr: 58 62 @ ${DOTFILES}/hypr/setup.sh
llm/cmd.yaml llm/templates/cmd.yaml
llm/gitcommit.yaml llm/templates/gitcommit.yaml
llm/ledit.yaml llm/templates/ledit.yaml
llm/mdclean.yaml llm/templates/mdclean.yaml
llm/pyscript.yaml llm/templates/pyscript.yaml
+25
llm/setup.sh
··· 1 + #!/usr/bin/env bash 2 + set -euo pipefail 3 + 4 + DOTFILES=$(dirname "$(dirname "$(realpath "$0")")") 5 + 6 + llm_plugins=( 7 + llm-anthropic 8 + llm-cmd 9 + llm-fragments-github 10 + llm-fragments-reader 11 + llm-fragments-youtube 12 + llm-gemini 13 + llm-github-copilot 14 + llm-openai-plugin 15 + ) 16 + 17 + llm_with_args=() 18 + for plugin in "${llm_plugins[@]}"; do 19 + llm_with_args+=("--with" "$plugin") 20 + done 21 + 22 + uv tool install --reinstall -U llm "${llm_with_args[@]}" 23 + 24 + mkdir -p "${HOME}/.config/io.datasette.llm" 25 + ln -sfT "${DOTFILES}/llm/templates" "${HOME}/.config/io.datasette.llm/templates"
llm/simplify.yaml llm/templates/simplify.yaml
llm/summarize.yaml llm/templates/summarize.yaml
+2 -21
terminal/setup.sh
··· 27 27 zsh 28 28 ) 29 29 30 - llm_plugins=( 31 - llm-anthropic 32 - llm-cmd 33 - llm-fragments-github 34 - llm-fragments-reader 35 - llm-fragments-youtube 36 - llm-gemini 37 - llm-github-copilot 38 - llm-openai-plugin 39 - ) 40 - 41 30 # Install packages 42 31 paru -S --needed --noconfirm "${packages[@]}" 43 32 44 - # Install llm with plugins 45 - llm_with_args=() 46 - for plugin in "${llm_plugins[@]}"; do 47 - llm_with_args+=("--with" "$plugin") 48 - done 49 - uv tool install --reinstall -U llm "${llm_with_args[@]}" 50 - 51 33 # Install yt-dlp 52 34 uv tool install --reinstall yt-dlp --with secretstorage 53 35 54 36 # Create directories 55 - mkdir -p "${HOME}/.config/alacritty" "${HOME}/.config/io.datasette.llm" "${HOME}/.config/sheldon" "${HOME}/.config/starship" 37 + mkdir -p "${HOME}/.config/alacritty" "${HOME}/.config/sheldon" "${HOME}/.config/starship" 56 38 57 39 # Create symlinks 58 40 ln -sf "${DOTFILES}/terminal/alacritty.toml" "${HOME}/.config/alacritty/alacritty.toml" ··· 61 43 ln -sf "${DOTFILES}/terminal/sheldon/plugins.toml" "${HOME}/.config/sheldon/plugins.toml" 62 44 ln -sf "${DOTFILES}/terminal/inputrc" "${HOME}/.inputrc" 63 45 ln -sf "${DOTFILES}/terminal/starship.toml" "${HOME}/.config/starship.toml" 64 - ln -sfT "${DOTFILES}/llm" "${HOME}/.config/io.datasette.llm/templates" 65 46 66 47 # Optional: ble.sh configuration (link if present) 67 48 if [[ -f "${DOTFILES}/terminal/blerc.sh" ]]; then 68 - ln -sf "${DOTFILES}/terminal/blerc.sh" "${HOME}/.blerc" 49 + ln -sf "${DOTFILES}/terminal/blerc.sh" "${HOME}/.blerc" 69 50 fi