A one-run script that automatically sets up a beautiful and powerful terminal environment for both Windows PowerShell and Linux/WSL!
- π― One-click setup - No more 5 manual steps!
- π Cross-platform - Works on Windows, Linux, WSL, and macOS
- π€ Smart detection - Automatically detects your environment
- β‘ Modern tools - Uses the latest terminal enhancements
# Download and run the setup script
curl -fsSL https://raw.githubusercontent.com/aymaneallaoui/setup-terminal/master/setup.sh | bash
Or download and run manually:
# Clone the repository
git clone https://github.com/aymaneallaoui/setup-terminal.git
cd setup-terminal
# Make the script executable and run it
chmod +x setup.sh
./setup.sh
If you're on Windows and prefer PowerShell:
# Run directly in PowerShell
iwr -useb https://raw.githubusercontent.com/aymaneallaoui/setup-terminal/master/setup.ps1 | iex
Use Ctrl + F
to search for files and Ctrl + R
to search command history
Git commands auto-completion: git ch
+ Tab
β git checkout
PowerShell commands auto-completion: Get-
+ Tab
β Get-Command
- fzf - Fuzzy finder for files and command history
- Starship - Beautiful, fast prompt
- Zsh + Oh My Zsh (if Zsh is available)
- Zsh plugins:
- zsh-autosuggestions
- zsh-syntax-highlighting
- powerlevel10k theme
- Git integration with helpful aliases
- Enhanced Bash configuration (if Zsh not available)
- Oh My Posh - Beautiful prompt system
- Scoop - Package manager for Windows
- PowerShell modules:
- PSReadLine - Enhanced command line editing
- Terminal-Icons - File and folder icons
- Posh-Git - Git integration
- PSFzf - Fuzzy finder integration
- fzf - File and history search
- Git aliases and auto-completion
Shortcut | Function |
---|---|
Ctrl + R |
Search command history |
Ctrl + F |
Find files |
Tab |
Auto-complete commands/paths |
β/β |
Navigate command history |
The setup includes these helpful git aliases:
gs # git status
ga # git add
gc # git commit
gp # git push
gl # git log --oneline
gd # git diff
gb # git branch
gco # git checkout
For Zsh (Linux/WSL):
# Edit ~/.zshrc and change the theme line
ZSH_THEME="powerlevel10k/powerlevel10k"
For PowerShell:
# Edit your PowerShell profile and change the Oh My Posh theme
oh-my-posh init pwsh --config "path/to/your/theme.omp.json" | Invoke-Expression
Linux/WSL:
Add to ~/.zshrc
or ~/.bashrc
:
alias myalias='my command'
PowerShell: Add to your PowerShell profile:
Set-Alias myalias 'My-Command'
Make sure the script is executable:
chmod +x setup.sh
Run this in PowerShell as Administrator:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
The script automatically installs dependencies, but if you encounter issues:
Linux/WSL:
sudo apt update && sudo apt install curl git build-essential
Windows: Install Git and PowerShell from their official websites.
If you're using WSL and encounter font issues, install a Nerd Font in Windows Terminal:
- Download a Nerd Font (e.g., FiraCode Nerd Font)
- Install it in Windows
- Set it as the font in Windows Terminal settings
If you were using the old 5-step process:
-
Backup your current config (optional):
cp ~/.zshrc ~/.zshrc.backup cp $PROFILE $PROFILE.backup # PowerShell
-
Run the new setup:
curl -fsSL https://raw.githubusercontent.com/aymaneallaoui/setup-terminal/master/setup.sh | bash
-
Restart your terminal
The new setup will automatically detect and preserve compatible configurations.
Want to improve this setup? Contributions are welcome!
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes
- Test on different environments
- Submit a pull request
The script is designed to be extensible. To add support for a new environment:
- Add detection logic in
detect_environment()
- Create a new setup function (e.g.,
setup_fish()
) - Add the case in the main function
- Test thoroughly
This project is open source and available under the MIT License.
- Original setup by aymaneallaoui
- Enhanced with cross-platform support
- Thanks to the maintainers of:
- Oh My Posh
- Oh My Zsh
- Starship
- fzf
- All the PowerShell and Zsh plugin authors
After installation, restart your terminal and enjoy:
- β‘ Faster workflow with fuzzy finding
- π¨ Beautiful, informative prompts
- π§ Powerful git integration
- π Enhanced command editing
- π Cross-platform consistency
Star this repo if it helped you! β