Your First Command
Now that you have Magic Shell installed and configured, let’s try your first command!
Choose Your Mode
Section titled “Choose Your Mode”Magic Shell offers two ways to work:
Launch the interactive terminal interface:
mshellThe TUI gives you:
- A persistent interface for multiple queries
- Command history and context
- Live model and theme switching
- Safety analysis display
- Keyboard shortcuts for everything
Simply type your query and press Enter. The translated command appears with safety info, ready to execute or copy.
For quick one-off translations:
msh "find all JavaScript files"Output:
find . -name "*.js"Use -x to execute directly:
msh -x "show disk usage"TUI Workflow
Section titled “TUI Workflow”- Launch with
mshell - Type your query in natural language
- Review the translated command and safety analysis
- Press Enter to execute, or use keyboard shortcuts to copy/modify
CLI Quick Reference
Section titled “CLI Quick Reference”| Command | Description |
|---|---|
msh "query" | Translate and print |
msh -x "query" | Translate and execute |
msh -n "query" | Dry run with safety analysis |
Example Queries
Section titled “Example Queries”Try these in either mode:
File Operations
Section titled “File Operations”- “find files larger than 100MB”
- “count lines of code in this project”
- “show the 10 most recently modified files”
Git Operations
Section titled “Git Operations”- “undo my last commit but keep changes”
- “show commits from the last week”
- “what files changed in the last commit”
System Operations
Section titled “System Operations”- “what process is using port 3000”
- “show memory usage”
- “list all running docker containers”
-
Be specific: “find files larger than 100MB in downloads” is better than “find large files”
-
Use TUI for exploration: The interactive mode makes it easy to refine queries and see history
-
Check safety analysis: Commands are analyzed for risk before execution
-
Switch models: Different models have different strengths. Use
Ctrl+X Min TUI to switch
Next Steps
Section titled “Next Steps”- Explore TUI mode features and shortcuts
- Learn about AI providers and which models to use
- Understand the safety system that protects you