Skip to content

Releases: Yehya-Elsawy/explain

Release v2.0.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 18:34

explain v2.0.0 : The Active Terminal Safety Shield & Autocompletion Update

We are thrilled to announce explain v2.0.0, the biggest milestone release for explain yet!

While previous versions excelled at explaining commands on demand, v2.0.0 transforms explain into an active, zero-latency safety shield for your terminal, alongside native shell autocompletion support across all major shells.


What's New in v2.0.0 :

1. explain guard Active Shell Safety Shield

Protect your system from catastrophic accidents before they happen. explain guard intercepts commands at the shell level in real-time.

  • Zero Latency: Everyday safe commands (ls, cd, git, docker, etc.) execute at native speed without any perceptible delay.
  • Unconditional Hard Block for Lethal Commands:
    Commands with zero legitimate use cases that destroy operating systems or home directories (rm -rf /, rm -rf ~, rm -rf --no-preserve-root, fork bombs :(){ :|:& };:, chmod -R 777 /) are permanently and unconditionally blocked.
  • Typed Confirmation for High-Risk Operations:
    Dangerous low-level disk operations (such as dd of=/dev/sda, mkfs.ext4, raw disk overwriting) display a clear risk breakdown and require explicitly typing CONFIRM to proceed.

How to use:

# Enable active terminal protection
explain guard enable

# Check protection status
explain guard status

# Disable protection at any time
explain guard disable

2. Native Shell Tab Autocompletion (Bash, Zsh, Fish)

Full autocompletion support is now built right into explain!

  • Intelligent Subcommand & Flag Completion: Pressing <Tab> completes guard, update, uninstall, flags (-i, --run, --json, etc.), and multi-level arguments (enable, disable, status, bash, zsh, fish).
  • Zero Setup (AutoEnsure): explain automatically detects your shell and registers user-level completion scripts on first run (~/.config/fish/completions/explain.fish, ~/.local/share/bash-completion/completions/explain, etc.).
    Manual Management: Install completion files directly anytime using:
explain completion install

How to Update:

If you already have explain installed, simply run:

explain update

Or install fresh via the one-line installer:

curl -fsSL https://raw.githubusercontent.com/Yehya-Elsawy/explain/main/scripts/install.sh | bash

Release v1.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Aug 11:59
1.2.0.Release.mp4

What's New in v1.2.0

This release brings massive improvements to the dynamic fallback engine, making explain smarter, faster, and truly cross-platform! A huge shoutout to our amazing contributors for driving these features.

New Features & Improvements

  • Full macOS/BSD & GNU Support: The dynamic man-page parser now perfectly understands BSD, macOS, and GNU option layouts, handling en-dashes, em-dashes, and wrapped descriptions flawlessly.
  • Blazing Fast Caching: Introduced sync.Map caching. explain now loads a command's man page only once per execution, significantly speeding up the analysis of complex commands (e.g., tar -czvf).
  • Smarter --help Fallback: The parser now smartly captures help output even if it's written to stderr or returns a non-zero exit code.
  • Advanced Value Inference: Accurately infers whether an unknown flag consumes a value directly from the SYNOPSIS or inline declarations (e.g., handles caffeinate -t 10800 correctly).
  • Robust Clustered Flags: Full support for attached short-flag values (e.g., mysql -uroot) and separate long-flag values.
  • UX Polish: Improved handling of empty inputs to show the help menu directly, and smartly truncates long descriptions at sentence boundaries for a cleaner terminal output.

Testing & Stability

  • Added comprehensive, platform-independent regression fixtures for BSD and GNU layouts.
  • Expanded AST parser tests with better coverage for edge cases.

❤️ Special thanks to the contributors who made this release possible!

Release v1.1.1

Choose a tag to compare

@github-actions github-actions released this 29 Aug 09:59

What's Changed

  • fix: Better handling for empty input, Test: Improve parser and ast test coverage. by @MoSaleh91 in #1

New Contributors

Full Changelog: v1.1.0...v1.1.1

Release v1.1.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 19:46

Full Changelog: v1.0.3...v1.1.0

Full Changelog: v1.0.3...v1.1.0

Full Changelog: v1.0.3...v1.1.0

Full Changelog: v1.0.3...v1.1.0

Release v1.0.0

Choose a tag to compare

@github-actions github-actions released this 21 Aug 16:10