2026-10-10 补充校核:umask 077 限制文件权限,不加密、也不隔离模型网络请求。Groq 免费层有账号与速率条件;本次未验证实际免费调用。 1 · 2
Bash4LLM+
GitHub: https://github.com/kamaludu/bash4llm (⭐37) HN: https://news.ycombinator.com/item?id=48710827 (⬆53) Language: Shell | Created: 2026-01-18
What It Is
A 5kLOC pure Bash script wrapping Groq’s OpenAI-compatible Chat Completions API. Single self-contained file, requires bash, coreutils, curl and jq; the single-file layout does not mean zero dependencies.
Key Features
- No /tmp, no eval — restrictive filesystem permissions (umask 077); this does not encrypt session contents
- Dynamic model list — fetched from Groq API, no hardcoded models
- Session memory — NDJSON-based persistent context with configurable window
- UI state system — JSON metadata files for GUI/Home Assistant integration
- Portable — Linux, macOS, WSL, Termux (Android), BSD
Architecture
PRECORE_BOOT → PRECORE_RUN → PROVIDER → CORE_SETUP → CORE_PROVIDER modular sections. Default provider is Groq (free tier), extendable via extras (Gemini, Hugging Face, Mistral).
Relevance to Hermes
- Pattern of bash-native LLM client useful for terminal/cron scenarios
- Groq’s free tier is worth exploring for low-cost LLM access
- Security design patterns (umask 077, no /tmp) applicable to Hermes scripts
- The implementation itself is debated (community calls it overkill at 5kLOC)