This guide covers the basic usage of wish-sh
, an LLM-assisted shell that helps users execute commands by translating natural language "wishes" into executable shell commands.
After setting up wish-sh, you can start it by running:
wish
Or on macOS:
wish-sh
When you start wish-sh, you'll see a text-based user interface (TUI) with the following components:
- Input area: Where you type your wishes
- Suggestion area: Where wish-sh displays suggested commands
- Execution area: Where command execution results are displayed
- Status bar: Shows the current status and available actions
Type your wish in natural language in the input area. For example:
Find all PDF files in the current directory and its subdirectories
Press Enter to submit your wish.
wish-sh will process your wish and suggest one or more shell commands that accomplish your task. For example:
find . -type f -name "*.pdf"
Review the suggested commands carefully before proceeding.
- Press
Enter
to execute the suggested command - Press
Esc
to reject the suggestion and return to the input area
Once you execute a command, wish-sh will display:
- The command being executed
- Real-time output from the command
- Exit code and execution status
- A summary of the command's results
Here are some example wishes you can try:
List all running processes sorted by memory usage
Create a backup of all .txt files in a new directory called backups
Show system information including CPU and memory
Find all files modified in the last 24 hours
Once you're comfortable with the basic usage of wish-sh, you can enhance its capabilities by:
- Loading knowledge bases to improve command suggestions
- Using advanced features for more complex tasks