Discover and explore top open-source AI tools and projects—updated daily.
idankCommand-line argument explainer using manpage parsing and LLMs
Top 3.7% on SourcePulse
Summary Explainshell simplifies command-line understanding by matching arguments to help text extracted from manpages. It targets developers, sysadmins, and power users, offering a web interface and backend to demystify command syntax and options, reducing learning curves.
How It Works
The system comprises a manpage reader, an options extractor (roff macros or LLMs), a SQLite backend, and a matcher. It parses command ASTs via bashlex, then matches arguments against stored options. A key feature is its dual extraction strategy: fast source mode (roff parsing) and accurate llm mode (LLM slicing), which prevents hallucinations by directly extracting text.
Quick Start & Requirements
Clone the repo, set up a Python 3 virtual environment (python3 -m venv .venv, source .venv/bin/activate), and install dependencies (pip install -r requirements-dev.txt). Download the live DB (make download-live-db) or parse manpages locally (python -m explainshell.manager extract --mode source <path>). Run the web server with make serve. LLM extraction requires an API key. Demo: explainshell.com.
Highlighted Details
explainshell.db) with tables for raw manpages, parsed options, and command mappings.source (fast roff) and llm:<provider/model> (accurate LLM slicing) strategies; LLM mode supports batch processing.manager CLI handles DB operations, manpage processing, and extraction comparison (diff).tools/llm_bench.py for evaluating LLM extractor performance.Maintenance & Community The README lacks specific details on maintainers, community channels (e.g., Discord, Slack), or recent activity, which are important project health indicators.
Licensing & Compatibility The license for Explainshell is not specified in the README. This omission requires further investigation before commercial use or integration.
Limitations & Caveats
The source extraction method may fail on non-standard manpages. LLM extraction requires API keys, incurs costs, and may show minor run-to-run variance. Reliance on external manpage archives means availability is subject to those sources.
17 hours ago
Inactive
romansky
nlmatics