cmdlens
v0.1.1
Published
Explain shell commands and generate them from plain English using Codex
Downloads
181
Maintainers
Readme
cmdlens
cmdlens is a POSIX-focused command line assistant that works in two directions:
- explain an existing shell command in plain English
- turn a natural-language request into a shell command
Before cmdlens executes anything, it shows the exact command, highlights risks, and asks for confirmation.
While cmdlens is waiting on Codex, it shows progress on stderr. If Codex stalls or fails, cmdlens stops waiting and prints retry guidance such as codex login status.
Requirements
- Node.js 22+
- A local
codexCLI installation - An active Codex/ChatGPT login in the local
codexclient
If you have not signed in yet, run:
codex logincmdlens uses the local codex client for model-backed explanation and command generation, so the primary setup path does not require manually creating an API key.
Install
npm installUsage
Explain a command:
npm run dev -- explain "tar -czf backup.tgz ~/Documents"Generate a command from plain English:
npm run dev -- make "archive my Documents folder into backup.tgz"Auto-detect command vs natural language:
npm run dev -- run "find all jpg files modified today"Start interactive mode:
npm run devFlags
--jsonprints the structured result as JSON--yesskips the execution confirmation prompt
Verification
Run the full test suite with:
npm run check