For Windows users: A far better WSL to run AI Coding CLI tools natively
Built for AI-powered coding workflows with intelligent multi-session management, smart paste handling, and advanced customization.
# Simply double-click setup.bat or run in PowerShell:
.\setup.batWhat happens:
- โ Launches standalone setup wizard on port 5174
- โ Detects/installs WSL distros (Fedora, Ubuntu, Debian)
- โ Configures development environment automatically
- โ Installs Node.js, npm, and essential tools
- โ Ready to use in minutes!
๐ก First time on Windows 11?
setup.bathandles everything - no prerequisites needed!
Multi-session terminals with AI coding workflow, sidebar navigation, and real-time Git integration
Modern AI coding tools like Aider, Cursor, Claude, and GitHub Copilot require seamless terminal interaction. Better WSL eliminates friction by providing:
โจ Smart clipboard handling - Paste images directly as base64
โก Configurable shortcuts - Remap keys to match your workflow
๐จ Multi-session terminals - Work on multiple projects simultaneously
๐ง One-click WSL setup - Initialize your dev environment in minutes
๐ Git integration - Time-travel through commits visually
๐ Auto-Pilot mode - Coordinate multiple AI agents for complex tasks
- Multi-session support - Run unlimited WSL terminals in tabs
- Smart paste inserter - Paste images/code with preview before sending
- Configurable keyboard shortcuts:
Shift+Enterโ New line in AI CLIs (remappable toCtrl+EnterorAlt+Enter)Ctrl+Cโ Copy text OR cancel process (your choice)Ctrl+Endโ Dedicated cancel key when Ctrl+C is set to copy
- Session activity tracking - Visual indicators for running/waiting states
- Auto-session detection - Resumes last session on startup
- Image paste support - Drag/drop or paste images (up to 45MB)
- Base64 auto-encoding - Perfect for AI CLI tools
- Text sanitization - Prevents accidental command execution
- Rich preview - See images/text before sending to terminal
- One-click initialization - Launch
setup.batand follow the guide - Cross-distro support - Works with Fedora, Ubuntu, Debian
- Auto package manager detection - Uses
dnforaptautomatically - Essential tools installer:
- โ Node.js (via fnm)
- โ npm with global packages
- โ sudo, curl, unzip
- โ Git configuration
- Progress tracking - Real-time feedback during installation
- Visual commit history - Browse commits with one click
- Instant checkout - Jump to any commit in your timeline
- Branch tracking - See current branch and remote status
- Quick commits - Commit from the sidebar instantly
- Dual-agent coordination - Planner + Coder working together
- Task delegation - Planner instructs Coder via terminal
- Real-time communication - Watch agents collaborate
- List all distros - See installed distributions and their status
- Set default - Change which distro launches by default
- Terminate processes - Stop running distributions safely
- Update WSL - One-click WSL version updates
- Import from Windows - Browse PC drives and mount folders
- Workspace management - Organized
~/better-cli-workspacestructure - File explorer per session - Browse files within each terminal
- Symlink mounting - Fast, efficient folder sharing
- Windows 11 with WSL 2 enabled
- Node.js 18+ installed on Windows
- Git (optional, for version control features)
Don't have WSL? No problem! Use our setup wizard (see below).
# Clone the repository
git clone https://github.com/your-username/better-cli.git
cd better-cli
# Install dependencies
cd server && npm install
cd ../client && npm installDouble-click one of these files:
| File | Description | Use When |
|---|---|---|
start-silent.vbs โญ |
Silent background launch | Daily use (no windows) |
start.bat |
Shows server logs | Debugging issues |
start.ps1 |
PowerShell with colors | You prefer PowerShell |
Browser opens automatically at http://localhost:5173 ๐
To stop: Double-click stop.bat
Tip: Run
create-desktop-shortcut.batto add a desktop icon!
Don't have WSL or essential tools? No worries!
-
Run the setup wizard:
setup.bat
-
Select your WSL distribution (or install one from Microsoft Store)
-
Click "Start Setup" and wait ~5 minutes
-
Done! Node.js, npm, curl, and sudo are now installed
๐ Detailed guide: SETUP_README.md
- Shift+Enter (default) โ New line in AI CLIs (remappable in Settings)
- Ctrl+C โ Copy selection OR Cancel process (configurable)
- Ctrl+End (default) โ Cancel/Interrupt when Ctrl+C = Copy
- Paste โ Opens smart paste inserter with preview
- Tabs โ Switch between Sessions, Clipboard, Tools, Settings
- Ctrl+Click โ Open file browser for a session
Frontend:
- SolidJS 1.9 - Reactive UI framework
- xterm.js - Terminal emulation
- Lucide Icons - Beautiful icon set
- Vite - Lightning-fast build tool
Backend:
- Node.js - JavaScript runtime
- Express 5 - Web framework
- Socket.IO - Real-time bidirectional communication
- node-pty - Native terminal emulation
better-cli/
โโโ client/ # SolidJS frontend
โ โโโ src/
โ โ โโโ App.tsx # Main application shell
โ โ โโโ Terminal.tsx # Terminal component with xterm.js
โ โ โโโ Sidebar.tsx # Navigation and session list
โ โ โโโ ClipboardManager.tsx # Smart paste handler
โ โ โโโ Setup.tsx # WSL initialization wizard
โ โ โโโ Settings.tsx # WSL & keyboard settings
โ โ โโโ FileBrowser.tsx # Windows drive browser
โ โ โโโ AutoPilot.tsx # Dual-agent coordination
โ โ โโโ components/ # Reusable UI components
โ โโโ setup.html # Standalone setup entry point
โ โโโ vite.config.ts # Multi-page Vite config
โ
โโโ server/ # Node.js backend
โ โโโ index.js # Main Express server + Socket.IO
โ โโโ setup-server.js # Dedicated setup API (port 3001)
โ โโโ public/ # Static assets
โ
โโโ setup.bat # Standalone WSL setup launcher
โโโ start-silent.vbs # Silent application launcher
โโโ start.bat # Standard launcher with logs
โโโ stop.bat # Graceful shutdown
โโโ create-desktop-shortcut.bat # Desktop icon creator
Perfect for developers using:
- Aider - AI pair programming in the terminal
- Cursor - AI-first code editor
- Claude CLI - Anthropic's command-line assistant
- GitHub Copilot CLI - Natural language commands
Why Better WSL?
- โ Paste images directly as base64 (for Claude, Gemini, GPT-4V)
- โ
Shift+Enterfor multi-line prompts (no accidental sends) - โ Multi-session = work on multiple projects with different AI contexts
- Run frontend dev server in Session 1
- Run backend API in Session 2
- Run database in Session 3
- All in one organized interface
- Manage tools via UI instead of memorizing commands
- One-click tool installation across projects
- Cross-distro support (Fedora, Ubuntu, Debian)
- LAUNCHER_GUIDE.md - One-click launcher setup
- SETUP_README.md - WSL initialization guide
- QUICK_START_SETUP.md - From zero to coding in 10 minutes
- ESSENTIAL_TOOLS_FEATURE.md - Tool management
- SESSION_SUMMARY.md - Feature overview
- IMPLEMENTATION_SUMMARY.md - Technical details
- NETWORK_ARCHITECTURE.md - System design
- spec.md - Original specification
WSL not detected
Symptoms: "WSL not installed" message on startup
Solutions:
# Check if WSL is installed
wsl --version
# Install WSL (PowerShell as Admin)
wsl --install
# List installed distributions
wsl --list --verbose
# Set default distro (if you have multiple)
wsl --set-default UbuntuStill not working? Run setup.bat for guided installation.
Port already in use
Symptoms: "EADDRINUSE" error when starting
Solutions:
# Check what's using port 3000
netstat -ano | findstr :3000
# Kill the process (replace PID)
taskkill /PID <process-id> /F
# Or change ports:
# Server: Edit server/index.js (line ~2300)
# Client: Edit client/vite.config.tsKeyboard shortcuts not working
Symptoms: Shift+Enter doesn't create newline
Explanation:
Keyboard shortcuts are CLI-dependent. Most AI CLIs use Alt+Enter by default.
Solution:
- Open Settings (โ๏ธ icon)
- Under "Terminal Behavior" โ "New line shortcut"
- Try different combinations:
Alt+Enter(works with Gemini, Codex)Shift+Enter(user preference)Ctrl+Enter(alternative)
Better WSL translates your chosen key to Alt+Enter internally.
Images not pasting in terminal
Symptoms: Paste doesn't show preview dialog
Cause: You're pasting directly in terminal. Better WSL intercepts paste for safety.
Solution:
- Use the Clipboard Manager (๐ tab)
- Paste image there โ preview appears
- Click "Insert into Terminal"
- Image is sent as base64
Why? Prevents accidental execution of pasted commands.
Setup wizard fails at Node.js step
Symptoms: "unzip: command not found"
Fix: Already patched! Update to latest version:
git pull origin mainThe setup now auto-installs unzip before downloading Node.js.
- Multi-session terminal management
- Smart clipboard with image support
- Configurable keyboard shortcuts
- WSL setup wizard
- Git time-travel integration
- Auto-session detection
- File system browser
- WSL distribution management
- Historical latency graphs (network monitoring)
- Alert system for high latency
- Session recording/replay
- Theme customization
- Export/import workspace configs
- Cloud sync for workspace
- Collaborative sessions (multi-user)
- Plugin system for extensions
- Docker container management
- SSH tunnel integration
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request
# Clone and install
git clone https://github.com/your-username/better-cli.git
cd better-cli
cd server && npm install
cd ../client && npm install
# Run in development mode
# Terminal 1:
cd server && node index.js
# Terminal 2:
cd client && npm run dev- Frontend: SolidJS components with TypeScript
- Backend: CommonJS with async/await
- Formatting: 2 spaces, semicolons optional
MIT License - feel free to use in your projects!
Built with amazing open-source tools:
- SolidJS - Reactive UI framework
- xterm.js - Terminal emulation
- Express - Web server
- Socket.IO - Real-time communication
- node-pty - PTY bindings
Special thanks to the WSL team at Microsoft for making Linux on Windows seamless.
Made with โค๏ธ for developers who love AI-powered workflows