first commit
This commit is contained in:
217
README.md
Normal file
217
README.md
Normal file
@@ -0,0 +1,217 @@
|
||||
# Enhanced Terminal v3.0
|
||||
|
||||
A feature-rich macOS terminal emulator built with Swift and Cocoa.
|
||||
|
||||
## ✨ New Features in v3.0
|
||||
|
||||
### 🔍 Command History Search (Cmd+R)
|
||||
- **Fuzzy search** through your entire command history
|
||||
- Search as you type with instant results
|
||||
- Navigate through thousands of previous commands
|
||||
- Double-click or press Enter to use a command
|
||||
|
||||
### 📑 Multiple Tabs (Cmd+T)
|
||||
- Open multiple terminal sessions in tabs
|
||||
- Easy tab switching with mouse clicks
|
||||
- Each tab maintains its own shell session
|
||||
- Close tabs with Cmd+W
|
||||
|
||||
### 💡 Auto-suggestions
|
||||
- **Fish-shell style** command suggestions
|
||||
- Suggestions appear as you type based on history
|
||||
- Press **Tab** to accept a suggestion
|
||||
- Toggle on/off in Settings
|
||||
|
||||
### 🎨 Enhanced Themes
|
||||
- **Dracula** - Modern dark purple theme (default)
|
||||
- **Solarized Dark** - Popular low-contrast theme
|
||||
- **Nord** - Beautiful arctic-inspired theme
|
||||
- **Classic** - Retro green-on-black terminal
|
||||
|
||||
### 🤖 AI Command Generation (Cmd+K)
|
||||
Generate terminal commands from natural language descriptions.
|
||||
|
||||
**Supported AI Providers:**
|
||||
- **OpenAI** (GPT-3.5-turbo) - Requires API key
|
||||
- **Ollama** (Local, Free) - Requires Ollama running locally
|
||||
|
||||
**Examples:**
|
||||
- "find all PDF files larger than 10MB"
|
||||
- "show me disk usage sorted by size"
|
||||
- "list all running docker containers"
|
||||
|
||||
### 📚 Command Snippets (Cmd+P)
|
||||
Pre-configured useful commands organized by category:
|
||||
- **Files**: List files, find large files, disk usage
|
||||
- **Git**: Status, log, commit commands
|
||||
- **Docker**: Container and image management
|
||||
- **Network**: Port management, connections
|
||||
- **System**: Process list, system info
|
||||
- Add your own custom snippets!
|
||||
|
||||
### ⚙️ Better Shell Integration
|
||||
- Fixed "fg: no job control" messages
|
||||
- Cleaner prompt display
|
||||
- Proper environment variable handling
|
||||
- Better ANSI escape code filtering
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Building
|
||||
```bash
|
||||
./build.sh
|
||||
```
|
||||
|
||||
This will compile all Swift files and create `EnhancedTerminal.app`.
|
||||
|
||||
### Running
|
||||
```bash
|
||||
open EnhancedTerminal.app
|
||||
```
|
||||
|
||||
Or double-click `EnhancedTerminal.app` in Finder.
|
||||
|
||||
## ⚙️ AI Setup
|
||||
|
||||
### Option 1: Ollama (Recommended - Free & Local)
|
||||
1. Install Ollama from https://ollama.ai
|
||||
2. Pull a model: `ollama pull llama3.2:latest`
|
||||
3. Ollama runs automatically in the background
|
||||
4. Press `Cmd+,` to open Settings
|
||||
5. Select "Ollama" as AI Provider
|
||||
6. Verify URL is `http://localhost:11434`
|
||||
7. Set model to `llama3.2:latest`
|
||||
8. Press `Cmd+K` to use AI command generation
|
||||
|
||||
### Option 2: OpenAI
|
||||
1. Get an API key from https://platform.openai.com/api-keys
|
||||
2. Press `Cmd+,` to open Settings
|
||||
3. Select "OpenAI" as AI Provider
|
||||
4. Enter your API key
|
||||
5. Press `Cmd+K` to use AI command generation
|
||||
|
||||
## ⌨️ Keyboard Shortcuts
|
||||
|
||||
### Tabs & Navigation
|
||||
- `Cmd+T` - New tab
|
||||
- `Cmd+W` - Close current tab
|
||||
- Click tab buttons to switch between tabs
|
||||
|
||||
### Search & Tools
|
||||
- `Cmd+R` - Search command history (fuzzy search)
|
||||
- `Cmd+K` - AI Command Generator
|
||||
- `Cmd+P` - Command Snippets
|
||||
- `Tab` - Accept auto-suggestion
|
||||
|
||||
### View
|
||||
- `Cmd+Plus` - Increase font size
|
||||
- `Cmd+Minus` - Decrease font size
|
||||
- `Cmd+0` - Reset font size
|
||||
- `Cmd+F` - Toggle fullscreen
|
||||
|
||||
### Settings & Help
|
||||
- `Cmd+,` - Settings
|
||||
- `Cmd+Q` - Quit
|
||||
- Type `help` - Show help in terminal
|
||||
|
||||
## 💻 Built-in Commands
|
||||
|
||||
- `clear` - Clear the screen
|
||||
- `help` - Show help and keyboard shortcuts
|
||||
- `exit` - Quit the application
|
||||
|
||||
All standard shell commands work as expected!
|
||||
|
||||
## 📋 Requirements
|
||||
|
||||
- macOS 10.15 (Catalina) or later
|
||||
- Swift compiler (comes with Xcode Command Line Tools)
|
||||
- Optional: OpenAI API key or Ollama for AI features
|
||||
|
||||
## 📁 Project Structure
|
||||
|
||||
```
|
||||
.
|
||||
├── EnhancedTerminal.app/ # Built application
|
||||
├── EnhancedTerminalApp.swift # Main entry point
|
||||
├── Settings.swift # Settings & theme management
|
||||
├── HistoryManager.swift # Command history with fuzzy search
|
||||
├── SnippetManager.swift # Command snippets library
|
||||
├── AIManager.swift # AI service integration
|
||||
├── TerminalSession.swift # Terminal session & auto-suggestions
|
||||
├── Panels.swift # UI panels (history, snippets, AI, settings)
|
||||
├── MainWindowController.swift # Main window with tabs
|
||||
├── build.sh # Build script
|
||||
└── README.md # This file
|
||||
```
|
||||
|
||||
## ✅ Features Implemented
|
||||
|
||||
### Core Terminal
|
||||
- ✅ Real zsh shell integration with proper environment
|
||||
- ✅ Multiple tabs support
|
||||
- ✅ Scrollable output with proper text handling
|
||||
- ✅ Clean ANSI escape code filtering
|
||||
- ✅ Copy/paste support
|
||||
|
||||
### Advanced Features
|
||||
- ✅ **Command history search** with fuzzy matching (Cmd+R)
|
||||
- ✅ **Auto-suggestions** based on history (Tab to accept)
|
||||
- ✅ **Multiple tabs** for parallel sessions
|
||||
- ✅ **AI command generation** (OpenAI & Ollama)
|
||||
- ✅ **Command snippets** with categories
|
||||
- ✅ **Multiple themes** (Dracula, Solarized, Nord, Classic)
|
||||
- ✅ **Customizable settings** (font size, AI provider, etc.)
|
||||
- ✅ **Better shell integration** (no job control errors)
|
||||
|
||||
### UI/UX
|
||||
- ✅ Clean, modern interface
|
||||
- ✅ Keyboard shortcuts for all features
|
||||
- ✅ Resizable windows
|
||||
- ✅ Fullscreen support
|
||||
- ✅ Font size adjustment
|
||||
- ✅ Theme switching
|
||||
|
||||
## 🔮 Future Enhancements
|
||||
|
||||
Potential features for future versions:
|
||||
- Split panes (vertical/horizontal) - UI framework ready
|
||||
- Session save/restore
|
||||
- Custom key bindings
|
||||
- Syntax highlighting for output
|
||||
- Hyperlink support (clickable URLs)
|
||||
- Image display (Sixel protocol)
|
||||
- Git integration in prompt
|
||||
- Performance monitoring overlay
|
||||
- Notifications for long-running commands
|
||||
- Command completion suggestions
|
||||
- Tmux/Screen integration
|
||||
|
||||
## 🐛 Known Issues
|
||||
|
||||
- Split panes feature is planned but not yet implemented
|
||||
- Some complex ANSI sequences may not render perfectly
|
||||
- Very long output may cause slight performance degradation
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
This is an open-source project. Feel free to:
|
||||
- Report bugs
|
||||
- Suggest features
|
||||
- Submit pull requests
|
||||
- Fork and modify for your needs
|
||||
|
||||
## 📝 License
|
||||
|
||||
Open source - feel free to modify and enhance!
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- Built with Swift and Cocoa
|
||||
- Inspired by iTerm2, Hyper, and other modern terminals
|
||||
- AI integration powered by OpenAI and Ollama
|
||||
|
||||
---
|
||||
|
||||
**Enjoy your enhanced terminal experience! 🚀**
|
||||
|
||||
Reference in New Issue
Block a user