Repository navigation
Conversation
- manual.py reads the local man page (or --help when there is none) and pulls out the NAME summary and each used flag's description. Offline. - explain: dictionary, then the local manual, then AI. Dictionary entries fill unknown flags from the manual. - AI suggestions show what the manual says about each flag and warn about flags it doesn't mention. - --help is never run for power, disk or deletion tools, or for names the safety check flags. Brain tests stub the manual so they don't depend on the host's man pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes Clishe's knowledge come from the user's own machine instead of the network or a model's memory.
Explain anything that's installed, offline
explainused to know 43 commands. After those, it went to AI or gave up. Now the order is:man <command>, or<command> --helpwhen there's no man page,Short flags written together (
-xzvf) are looked up one by one. Commands likefindthat use one dash for whole words (-size) are handled. Descriptions are cut to their first sentence. Dictionary entries now fill in flags they don't cover from the manual, instead of "try: man X".AI suggestions are checked against the manual
Small local models usually go wrong by making up flags. This catches that, and the user learns from the real documentation.
Safety
--helpruns a program, so it's never run for power, disk or deletion tools (reboot,dd,mkfs*,rm…). It's also skipped for anything the safety check flags, or any name that isn't a plain command name. Each call has a 2–4s timeout and gets no stdin.Tests
tests/test_manual.pyuses sample GNU man and--helptext, so the tests don't depend on the CI machine's man pages.mainon macOS bash 3.2; CI runs them all on Linux.ls,tar,find,du,grepandchmod.🤖 Generated with Claude Code