Inspired by llm-cmd
LLM Cmd 2 generates shell commands based on natural language prompts. The output is loaded into the user's shell:
You can also use llm-cmd to fix commands that resulted in an error, without having to retype anything:
LLM Cmd 2 iterates on the original package:
- Includes OS information in prompts for more accurate command generation.
- Loads output into the shell rather than executing directly, so commands appear in history.
- First, install the llm CLI tool
- Run the installation script:
curl -fsSL https://raw.githubusercontent.com/tombedor/llm-cmd2/refs/heads/main/install.sh | /bin/bash - Restart your terminal or run:
source ~/.zshrc
llmcmd "your natural language request"# Find files
llmcmd "find all Python files in current directory"
# Process management
llmcmd "kill process on port 3000"
# File operations
llmcmd "compress this folder to a zip file"
llmcmd "extract archive.tar.gz"
# Git operations
llmcmd "undo last git commit"
llmcmd "create new branch called feature-auth"
# System information
llmcmd "show disk usage"
llmcmd "list running processes sorted by memory usage"
