Terminal & Shell Assistance
Natural-language → shell command translation, terminal-based AI workflows. tldr-clones, Warp AI, ShellGPT.
Setup walkthrough
- Install Ollama →
ollama pull qwen2.5-coder:7b(~5 GB — fast, code-literate). - Terminal-native AI via
pip install shell-gpt(ShellGPT — open-source CLI AI assistant). - Configure ShellGPT to use Ollama:
sgpt --model ollama/qwen2.5-coder:7b. - Natural language to shell:
sgpt "find all files modified in the last 24 hours larger than 10 MB and list them with human-readable sizes"→ Output:find . -type f -mtime 0 -size +10M -exec ls -lh {} \; - First command generated in 2-5 seconds.
- For bash-integrated AI: install
joshutoor configure your shell to pipe errors to the model:command 2>&1 | sgpt "explain this error and suggest a fix". - For Windows PowerShell:
pip install shell-gptworks in PowerShell too. Or use Warp terminal (warp.dev) with built-in AI for a GUI alternative. - The model also explains commands:
sgpt "what does 'tar -xzvf archive.tar.gz' do?"— great for learning.
The cheap setup
Terminal assistance is extremely lightweight. Qwen 2.5 Coder 7B runs at 20-40 tok/s on a $300 laptop CPU via llama.cpp. ShellGPT + Ollama + 7B model runs comfortably on any development machine. No GPU needed for basic terminal AI. For faster responses: a used GTX 1060 6 GB (~$60) runs 7B coding models at 60-80 tok/s — near-instant command generation. Terminal assistance is the most practical entry point for local AI — if you have a terminal, you can benefit. Total incremental cost: $0 (CPU) to $60 (used GPU).
The serious setup
Used RTX 3060 12 GB (~$200-250, see /hardware/rtx-3060-12gb) handles Qwen 2.5 Coder 14B at 25-35 tok/s for terminal assistance with deeper technical understanding — the 14B correctly handles complex pipelines, sed/awk one-liners, and multi-step operations that confuse the 7B. For a DevOps workstation: RTX 3060 + Ryzen 7 7700X + 32 GB DDR5 + 1TB NVMe. Total: ~$800-1,000. Terminal assistance doesn't need "serious" hardware — the 7B model handles 90% of terminal questions. Invest in a good monitor and mechanical keyboard before investing in a GPU for terminal AI.
Common beginner mistake
The mistake: Blindly running the AI-generated shell command, especially ones with rm, dd, mkfs, or chmod -R. Why it fails: LLMs generate plausible-but-wrong commands. The model might say rm -rf / tmp/old_files (note the space before tmp — that wipes your entire system). It might generate find . -delete when you meant find . -name "*.tmp" -delete. The model doesn't know your file system — it generates text, not safe operations. The fix: Always read the generated command before running it. Understand each flag. For destructive operations (rm, dd, mkfs), manually verify the paths. Better: use ShellGPT with --no-execute flag (prints the command, you decide to run it). Set alias sgpt='sgpt --no-execute' in your bashrc. Terminal AI should be "suggest and verify" not "generate and execute." One bad rm -rf erases the time savings of 10,000 good commands.
Recommended setup for terminal & shell assistance
Browse all tools for runtimes that fit this workload.
Reality check
Code models are LLM workloads — same VRAM math applies. 16 GB runs 13-32B Q4 (Qwen 2.5 Coder, DeepSeek Coder); 24 GB unlocks 70B-class code models. The killer detail is context window — code review wants 32K+, which pushes KV cache beyond 16 GB on 70B.
Common mistakes
- Skipping context-window math (KV cache eats VRAM at scale)
- Using base instruct models for code (specialized code models 30-50% better)
- Running coding agent loops on 8 GB (works for 7B but agent loops compound)
- Forgetting flash-attention impacts code workflows more than chat
What breaks first
The errors most operators hit when running terminal & shell assistance locally. Each links to a diagnose+fix walkthrough.
Before you buy
Verify your specific hardware can handle terminal & shell assistance before committing money.