I created git repos on my main workstation for each homelab server/service I maintain that keeps:
- documentation
- notes
- lessons learned
- scripts, configs
- runbooks
- backup details
- security audit details
- log items that need attention
- infrastructure
I just point a local LLM (offline model that runs on my workststion) into those repos and ask it to perform certain things on those servers. It can do things like update packages, install packages, make config changes, set/check permissions, read logs (and fix errors in real time), and check the health of the overall system.
I have it run pre backups before making changes, then post backups once its done.
Once changes are in place and everything is running okay, I ask it to update documentation in the repo and tag the release.
I use opencode that connects to a llama.cpp service. opencode lets me gate the AI so that any elevated commands that it needs to run (e.g. sudo or ssh), I have to approve it. It cant just go around making changes without permission.