SMAH(1)
SMAH(1)SMAH(1)

Name

smah — SMart As Hell SysteM Admin Helper

SMAH(1)SMAH(1)

Name

smah — SMart As Hell SysteM Admin Helper

Synopsis

smah -q TEXT [options]
command ... | smah -q TEXT
command ... | smah -i FILE
smah --continue | --session ID | --history
smah --configure

Description

Ask a question in plain language and get back the shell command plus an explanation. Pipe in logs or service status and it summarizes them. Sessions persist in a local sqlite database and resume with --continue. Answers are shaped to your background and your system.

It prints and explains. It does not execute anything.

$ man smah · rendered, not photographed

Synopsis

smah -q TEXT [options]
command ... | smah -q TEXT
command ... | smah -i FILE
smah --continue | --session ID | --history
smah --configure

Description

smah is the SMart As Hell SysteM Admin Helper: a command-line assistant for sysadmins, developers, and power users. Ask how to do something and it answers with the shell command and an explanation of what it does. Pipe it something long — auth logs, systemctl status — and it hands back a summary you can actually read.

SMAH prints; it does not run what it suggests. You read the command, you decide, you type it yourself. At first run it takes your background and your system details and shapes its answers to both. It works with Claude and OpenAI models — provider and model are your choice — and it saves every session in a local sqlite database you can resume later.

Options

-h, --help
Print command-line help and exit.
-q, --query TEXT
Ask a question in plain language. SMAH answers with the shell command and an explanation of what it does. Nothing is executed.
-i, --instructions FILE
Take the task from a file instead of an argument. Useful with pipes: the file says what to look for, the pipe supplies the input.
--continue
Resume the most recent session where you left it.
--session ID
Resume a specific earlier session.
--history
List your recent sessions and pick one to resume.
--model MODEL
Override the configured model for this run.
--configure
Walk through setup again: who you are, your system, your provider and key.
-v, --verbose
Repeat for more detail: -v shows the plan, -vv adds request payloads, -vvv dumps settings.
--rich
Render output as formatted Markdown panels instead of plain text.
$ tail -n 500 /var/log/auth.log | smah -q "summarize suspicious ips"

3 IPs made repeated failed SSH attempts in the last hour:

  203.0.113.4   42 failed attempts, root
  198.51.100.9  17 failed attempts, admin
  192.0.2.77     9 failed attempts, root

Suggested command:

$ sudo iptables -A INPUT -s 203.0.113.4 -j DROP

Nothing above was run — copy the command if you want it.

OUTPUT · explained, printed, never executed

Safety

  • 1.SMAH explains and prints commands. It executes nothing — if it shows you a command, running it is your decision.
  • 2.Piped input is read, summarized, and written back out. Your files and services are not touched.
  • 3.This page is a static site: no backend, no accounts, no analytics.

Examples

# pipe logs; ask for what you need
$ tail -n 500 /var/log/auth.log | smah -q "summarize suspicious ips"
# pipe service status; take the task from a file
$ systemctl status | smah -i ~/scan.md
# pick up where you left off
$ smah --continue

Bugs

SMAH is an early prototype: rough edges, gaps, and change without notice. It is built for curious sysadmins and early adopters, not for anyone who needs a finished product. If you find a bug, the repository takes tickets and contributions.

Square mark of a dark terminal window with a tiny robot head, an amber $ smah prompt, and a phosphor-green pixel checkmark.

See also

smah.readthedocs.io — the documentation · github.com/noizu-labs-ml/smah — source and tickets

$ pip install smah

first run walks you through setup: your background, your system, your provider key

The Robot Lives