Command Anything lets you create command-line commands using plain English. Instead of remembering complex syntax or flags, just describe what you want to do, and let AI figure out the details.
- Focus on intent: Tell it what you want to accomplish, not how to do it
- Natural language: No need to memorize command syntax or man pages
- Learn as you go: See the actual commands that match your intentions
- Safe execution: Preview commands before running them
-
Clone the repo in your preferred location
-
Install dependencies
pip install -r requirements.txt- Make the script executable:
chmod +x command-anything- Set up an alias for easy access. Add this line to your shell config file:
For Bash (~/.bashrc or ~/.bash_profile):
alias llm="path/to/command-anything"For Zsh (~/.zshrc):
alias llm="path/to/command-anything"After adding the alias:
source ~/.bashrc # or ~/.zshrc if using ZshNow you can use llm from anywhere!
Basic usage:
llm "your request in plain english"Options:
-m MODEL: Choose a different AI model (default: gpt-4o)-l LANGUAGE: Specify output language (default: python)-p PARAMETERS: Add extra context or parameters
For each command:
- Describe what you want to do
- Review the explanation and generated command
- Confirm if you want to run it
- Be specific about what you want to accomplish
- Include relevant details like file types, locations, or conditions
- Review commands before executing, especially for system-changing operations
- Use parameters to provide additional context when needed
- Always review generated commands before execution
- The tool will show you what it plans to do and ask for confirmation
- For system-changing operations, consider running with
--dry-runfirst (just add this to your request)
Find large files in your system:
llm "find files larger than 1GB in my home directory"Manage processes:
llm "kill all processes using more than 2GB of RAM"File operations:
llm "rename all jpg files in current folder to include today's date"System maintenance:
llm "clean up old docker images and containers"Complex tasks:
llm "find all Python files modified in the last week and count their lines of code"- Python 3.x
- OpenAI API key (set in your environment)
- Required Python packages:
openai,pydantic
If you get a "command not found" error:
- Make sure the script is executable (
chmod +x command-anything) - Verify your alias is set up correctly:
which llm- Check if the OpenAI API key is set:
echo $OPENAI_API_KEY