Shell Command Explainer
Paste any shell command line and get every token (command, flags, flag-values, positionals, operators) explained from a bundled offline manpage/tldr dataset. Splits combined short flags (ls -la → -l + -a), knows which flags take a value, decomposes pipelines (|, &&, ||, ;), redirections (> >> < 2>&1 &>), and flags destructive commands (rm -rf, dd of=/dev/sdX, mkfs, chmod 777, fork bombs). 100% client-side; nothing uploaded.
About Shell Command Explainer
Paste any shell command line and get every token (command, flags, flag-values, positionals, operators) explained from a bundled offline manpage/tldr dataset. Splits combined short flags (ls -la → -l + -a), knows which flags take a value, decomposes pipelines (|, &&, ||, ;), redirections (> >> < 2>&1 &>), and flags destructive commands (rm -rf, dd of=/dev/sdX, mkfs, chmod 777, fork bombs). 100% client-side; nothing uploaded. Everything runs locally in your browser — your data never leaves your device.
How to use
- Enter your input in the tool above.
- Adjust any options to your preference.
- Use the Copy or Download buttons to save the result.
- Everything happens locally — your data never leaves your browser.
FAQ
How does the shell command explainer work?
First a shell-aware tokenizer splits your command line into tokens (respecting single/double quotes, backslash escapes, and the -- separator). Each command's flags are looked up in a bundled offline manpage/tldr snapshot. Combined short flags like `ls -la` are split into `-l` and `-a`. The explainer knows which flags consume the next argument (`grep -e PATTERN`, `find -name GLOB`), so flag-values are classified correctly. Pipelines, redirections, and the &&, ||, ;, & operators are each broken out as separate stages.
Does it warn me about dangerous commands?
Yes. The danger linter flags: `rm -rf` (especially on /, ~, or $HOME), `dd of=/dev/sd*` or any raw-disk write, `mkfs` on a real device, `chmod 777`, fork bombs (`:(){ :|:& };:`), `kill -9 -1`, pipe-to-shell (`curl … | sh`), and `> /dev/sda`. Each warning explains what the command does and suggests a safer alternative where one exists.
Can it handle pipelines and redirections?
Yes. The tokenizer recognizes `|`, `>`, `>>`, `<`, `2>`, `2>&1`, `&>`, `&&`, `||`, `;`, and trailing `&`. Each segment between operators becomes a pipeline stage with its own per-token breakdown, and the operators themselves are annotated with their shell semantics.
What if a command isn't in the bundled dataset?
The structure of the command is still parsed and explained token-by-token — the command itself is marked 'not in dataset' and you get a hint to install tldr/man locally for the canonical reference. Honesty clause: the bundled snapshot is a curated subset of common GNU/BSD tools; it can lag your exact local version.
What extra features does this tool have versus explainshell?
(1) 100% client-side — no server, no manpage scraping, works offline. (2) Shell-grammar-aware tokenizer handling quotes, escapes, $() and backticks. (3) Combined short-flag splitter (`-la` → `-l -a`). (4) Per-flag 'takes a value' detection so flag-values aren't misclassified as positionals. (5) Pipeline & redirection decomposition with per-stage explanation. (6) Danger linter for rm -rf / dd / mkfs / chmod 777 / fork bombs / pipe-to-shell. (7) Plain-English whole-line summary. (8) GNU vs BSD variant toggle where flags differ. (9) Subcommand awareness (git log, docker run). (10) Hover/click-to-highlight a token. (11) Copy annotated explanation as text. (12) localStorage history (max 20). (13) Shareable URL. (14) `--` separator handling. 100% offline once loaded.
Related tools
.bashrc / .zshrc Alias & Config Manager
Build shell aliases, functions, exports, and PATH edits in a visual editor, then export a clean, commented .aliases file sourced from both .bashrc and .zshrc — with shadowing detection against shell builtins and common CLI tools, function suggestions when args are needed, starter packs (git, docker, kubectl, navigation, safety, ls, dev, devops, data science), import of existing rc files, dedupe, history (localStorage), and shareable URL. 100% client-side.
Add / Subtract Date Calculator
Add or subtract years, months, weeks, days, hours, minutes and seconds from a starting date/time. Calendar-day or business-day mode with custom weekend + holiday list. Month-end policy toggle (clamp to last day vs overflow). Repeat/series mode (e.g. every 2 weeks x 10) with CSV export. Shareable URL. 100% client-side.
Age Calculator
Calculate exact age from a birth date in calendar years/months/days (no negative-day bugs) plus totals in months/weeks/days/hours/minutes/seconds. Next-birthday countdown with weekday. Feb-29 birthday policy toggle. Milestones (1,000 days, 10,000 days, 1 billion seconds). Zodiac sign + Chinese zodiac. Age gap comparison. Shareable URL. 100% client-side.