From eb18e9b4c1279ee2b7702b069582fb1ff58a9258 Mon Sep 17 00:00:00 2001 From: Nathan Schneider Date: Tue, 3 Feb 2026 13:44:55 -0700 Subject: [PATCH] Added optional AI setup --- .bash_aliases | 5 +++++ .scripts/ai.sh | 11 +++++++++++ .scripts/install-arch.sh | 5 ++++- .scripts/install-deb.sh | 4 ++++ .scripts/install-fed.sh | 4 ++++ 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .scripts/ai.sh diff --git a/.bash_aliases b/.bash_aliases index 6e21bbb..ceac10c 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,6 +1,7 @@ # Custom aliases for ntnsndr # Be sure this is referred to in .bashrc +# Vi mode for the terminal set -o vi # More or less permanent file aliases: @@ -35,7 +36,11 @@ alias search='grep -i' alias trash='~/.scripts/trash.sh' # AI agents +llm models default gemma3 +export OLLAMA_MODELS=/var/lib/ollama/models alias c='llm -c' alias chat='llm -s "You are running locally in a terminal on a modestly resourced computer, so please keep responses concise and efficient. If necessary, provide brief options for further exploration before proceeding with them at any length."' # Uses default alias transcribe='llm -m qwen2.5vl "Transcribe the handwriting in the attached image into Markdown text with no other output." -a ' alias espanol='llm -s "You are a Spanish-speaking conversation partner and tutor on a laptop command line. Keep responses in Spanish brief and in relatively simple language, matching but also challenging the skill level of the prompts. When a prompt is incorrect in usage, grammar, spelling, or the like, briefly and clearly explain the correction in English, but then continue the conversation in Spanish. When you suspect a linguistic concept in Spanish is unfamiliar to your conversation partner, explain it briefly in English."' + +# Environment variables diff --git a/.scripts/ai.sh b/.scripts/ai.sh new file mode 100644 index 0000000..49a2154 --- /dev/null +++ b/.scripts/ai.sh @@ -0,0 +1,11 @@ +# Local AI system installation + +# Install ollama +curl -fsSL https://ollama.com/install.sh | sh +# OLLAMA_MODELS variable is set in ~/.bash_aliases + +# Install llm +pipx install llm +llm install llm-ollama + +echo "After restart, install some models with `ollama pull MODELNAME`!" diff --git a/.scripts/install-arch.sh b/.scripts/install-arch.sh index 33b96eb..668d8dd 100755 --- a/.scripts/install-arch.sh +++ b/.scripts/install-arch.sh @@ -8,7 +8,7 @@ sudo pacman -S xdg-utils sudo pacman -S nextcloud-client sudo pacman -S keepassxc sudo pacman -S git -sudo pacman -S nodejs npm +sudo pacman -S nodejs npm pipx # Ensure .bash_aliases works, not default on Arch cat > ~/.bashrc << EOF @@ -62,4 +62,7 @@ echo "https://www.latofonts.com/lato-free-fonts/ (office system)" echo "Good?" read response +# ai +echo "Run ~/.scripts/ai.sh to install local AI stuff" + echo "Installation script complete" diff --git a/.scripts/install-deb.sh b/.scripts/install-deb.sh index 8920c12..6b3dd2f 100755 --- a/.scripts/install-deb.sh +++ b/.scripts/install-deb.sh @@ -10,6 +10,7 @@ sudo apt -y update && apt upgrade sudo apt -y install git sudo apt -y install xdg-open sudo apt -y install nodejs +sudo apt -y install pipx # nvim sudo apt -y install neovim @@ -51,4 +52,7 @@ echo "https://github.com/be5invis/Iosevka/releases/latest (home terminal)" echo "Good?" read response +# ai +echo "Run ~/.scripts/ai.sh to install local AI stuff" + echo "Installation script complete" diff --git a/.scripts/install-fed.sh b/.scripts/install-fed.sh index f51886e..79ca936 100755 --- a/.scripts/install-fed.sh +++ b/.scripts/install-fed.sh @@ -17,6 +17,7 @@ sudo dnf -y update && dnf upgrade sudo dnf -y install git sudo dnf -y install xdg-open sudo dnf -y install nodejs +sudo dnf -y install pipx sudo dnf -y install gnome-shell-extension-appindicator # nvim @@ -49,4 +50,7 @@ sudo flatpak install org.zotero.Zotero echo "See ~/Cloud/Notes/Config.md for Zotero setup instructions" read response +# ai +echo "Run ~/.scripts/ai.sh to install local AI stuff" + echo "Installation script complete"