🧰 CLI AI Tools — Start Here

Eleven tools. One toolchain. A path in for SysAdmins.

🎯 What This Collection Is

This section documents eight command-line tools that, taken together, give a Unix/Linux SysAdmin a complete AI-augmented workflow — from asking questions at the prompt, to editing code with AI assistance, to shipping that code to GitHub, to running models entirely on your own hardware.

These are not eight random tools. They form a toolchain. Each one does a specific job, and several of them are designed to work together. Understanding how they connect is more useful than reading each page in isolation.

Every page in this section follows the same philosophy: complete installation steps (no hunting for the EPEL step), real SysAdmin use cases, honest assessments of where each tool helps and where it doesn’t, and copy-paste ready examples. No assumptions.
New to all of this? Start with sgpt — it has the fastest time to value of any tool here. You can be asking AI questions from your shell prompt in under ten minutes.

🗺️ The Toolchain Map

Here is how the eight tools relate to each other:

DAILY DRIVER ──────────── sgpt Natural language at the shell prompt. Ask questions, get commands, pipe log output for analysis. Your first AI tool. AUTOMATION LAYER ──────────────── fabric Reusable prompt patterns that behave like Unix filters. Pipe text through patterns: summarize logs, generate incident reports, extract action items. Build your own patterns for institutional workflows. CODING WORKFLOW ─────────────── aider ──────► gh AI edits your Ships aider's work to GitHub. PRs, issues, releases from files directly. the terminal. When aider finishes a fix, gh delivers it. Every change is a git commit. LOCAL ALTERNATIVE ───────────────── ollama Run LLMs on your own hardware. No API key, no cloud, no data leaving your network. Powers sgpt, aider, or any tool that accepts an OpenAI-compatible endpoint. SUPPORT TOOLS ───────────── fzf Interactive fuzzy selection glue. Pairs with every tool above: search logs, pick git commits, select systemd units, browse AI output interactively. Ctrl+R history search that works. jq Parse JSON output from gh, AI APIs, and modern CLI tools. Extract fields, filter results, reformat data for scripts. Essential once any tool starts producing JSON. github-copilot AI pair programming suggestions at the CLI. Explains pipelines, suggests shell commands, generates bash scripts inline. SESSION LAYER ───────────── tmux Terminal multiplexer. Sessions survive SSH disconnects. Split panes let you run sgpt, aider, or ollama alongside your shell. Not an AI tool — the infrastructure that makes all the others more reliable. SEARCH LAYER ──────────── ripgrep Fast recursive search. grep that gets out of your way. The natural extraction layer — pull the relevant 40 lines from a 50,000 line log before handing content to sgpt or fabric for AI analysis.

📋 Suggested Learning Order

If you are starting from zero, work through these in order. Each step builds on the previous one and adds a distinct capability to your workflow.

  1. 1
    sgpt — Shell GPT
    Fastest time to value. One pip install, one API key, and you are asking AI questions from the prompt. No configuration complexity. Establishes the core habit of reaching for AI at the command line.
  2. 2
    fzf — Fuzzy Finder
    Install it early because everything else gets better with it. Shell integration takes five minutes. Ctrl+R history search alone is worth the install. Once it is in, you will use it constantly without thinking about it.
  3. 3
    jq — JSON Processor
    Learn this before you need it. Modern tools output JSON. gh outputs JSON. AI APIs return JSON. Once you can slice JSON from the command line, scripting against any of these tools becomes straightforward.
  4. 4
    fabric — AI Workflow Automation
    Once you are comfortable with sgpt, fabric gives you reusable patterns. Stop typing the same prompt every day. Build patterns for your specific institutional workflows: log analysis, incident summaries, change request drafts.
  5. 5
    ollama — Local LLM Runner
    When you need AI that never leaves your network. Air-gapped servers, sensitive log analysis, cost control. Also useful for experimenting with different models without API fees. Point sgpt or aider at it as a drop-in backend.
  6. 6
    aider — AI Pair Programming
    AI that edits your actual files. Works with shell scripts, Python, anything in a git repo. Every change is a commit so you can see exactly what the AI did and revert if needed. The step up from asking for code snippets to having AI work directly in your codebase.
  7. 7
    gh — GitHub CLI
    The delivery mechanism for aider’s work. Manage PRs, issues, Actions workflows, and releases from the terminal. Once aider is in your workflow, gh closes the loop from AI edit to merged PR without touching a browser.
  8. 8
    GitHub Copilot CLI
    Useful if your shop already has a GitHub Enterprise or Copilot subscription. Explains commands, suggests shell one-liners, integrates with your existing GitHub authentication. Good complement to the others if the licensing is already in place.

📊 Quick Reference

Tool What it does Install complexity API key needed
sgpt Natural language questions at the shell prompt Low Yes (OpenAI or compatible)
fzf Interactive fuzzy search for anything Low No
jq Parse and transform JSON from the command line Low No
fabric Reusable AI prompt patterns as Unix filters Medium Yes (OpenAI or compatible)
ollama Run LLMs locally on your own hardware Medium No
aider AI edits your files directly from the shell Medium Yes (or use ollama)
gh Manage GitHub from the terminal Medium GitHub token
github-copilot AI command and script suggestions at CLI Medium GitHub Copilot subscription
tmux Session persistence, pane splitting, SSH survival Low No
ripgrep Fast recursive search, AI feed tool, log extraction Low No
curl HTTP at the shell — hit AI APIs directly, test endpoints, script REST Low (already installed) Depends on API

🤔 Which Tool For Which Job

Scenario-based guide — what to reach for when you have a specific task:

I want to… Reach for…
“Explain what this command does” sgpt or github-copilot
“Search my command history for that pipeline I wrote” fzf (Ctrl+R)
“Summarize 500 lines of log output” sgpt or fabric
“Generate an incident report from these logs every day” fabric (custom pattern + cron)
“Fix a bug in my bash script” aider
“Parse JSON output from an API call” jq
“Open a PR for the fix aider just made” gh
“Run AI on a server with no internet access” ollama
“Keep sensitive logs off external API servers” ollama + sgpt or fabric
“Interactively pick which log file to analyze” fzf piped to sgpt
“Extract all PR titles from a repo as a list” gh + jq
“Write and commit new monitoring scripts” aider + gh
“Hit an AI API directly from a shell script” curl + jq
“Test whether an endpoint is responding and how fast” curl (-w %{http_code} %{time_total})

📚 All Tool Pages

Each page covers: installation (distro-specific, complete steps), real SysAdmin use cases, options reference, honest assessment, and how the tool connects to the others.

✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live ✅ Live