Skip to content

Latest commit

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

PowerShell 7 Setup Automation

A Rust CLI tool that automates the installation and configuration of PowerShell 7 on Windows with modern terminal enhancements.

What It Does

This tool automatically sets up a modern PowerShell 7 environment with:

  • PowerShell 7 - Latest version installed from GitHub releases
  • Oh-My-Posh - Beautiful prompt themes for your terminal
  • PSReadLine - Enhanced command-line editing with history search and syntax highlighting
  • posh-git - Git status integration in your prompt
  • Custom Profile - Pre-configured with useful aliases and settings

Features

  • 🚀 One-Command Setup - Run once and get a fully configured PowerShell environment
  • 📦 Automatic Installation - Downloads and installs PowerShell 7 if not present
  • 🎨 Beautiful Prompts - Oh-My-Posh with the Paradox theme out of the box
  • Git Shortcuts - Quick aliases for common Git commands (gs, gc, gp, gl, gco, gb, gd)
  • 🔍 Smart History - Search command history with arrow keys
  • 🌈 Syntax Highlighting - Color-coded commands, parameters, and strings
  • ⚙️ Parallel Installation - Installs modules concurrently for speed
  • 💪 Fully Customizable - Easy to modify the generated profile to your preferences

Why Use This?

Setting up a modern PowerShell environment manually involves:

  • Finding and downloading the right PowerShell 7 installer
  • Installing multiple PowerShell modules one by one
  • Installing Oh-My-Posh via winget
  • Writing a custom profile with proper configuration
  • Configuring PSReadLine settings and key bindings
  • Setting up Git aliases and custom shortcuts

This tool does all of that in one command, saving you 30+ minutes of setup time.

Quick Start

Prerequisites

  • Windows 10 or Windows 11
  • Rust toolchain installed
  • winget (Windows Package Manager)
  • Administrator rights (for PowerShell 7 installation)

Installation

  1. Clone this repository:
git clone https://github.com/yourusername/setup_powershell.git
cd setup_powershell
  1. Build and run:
cargo run --release
  1. If PowerShell 7 wasn't previously installed, restart your terminal and run again:
cargo run --release
  1. Launch PowerShell 7 to see your new environment:
pwsh

What Gets Installed

ComponentPurpose
PowerShell 7Modern cross-platform PowerShell
PSReadLineEnhanced command-line editing
posh-gitGit integration in prompt
Oh-My-PoshPrompt theming engine
Custom ProfilePre-configured settings and aliases

Git Aliases

The tool configures these convenient Git shortcuts:

  • gsgit status
  • gcom -m "message"git commit -m "message"
  • gpushgit push
  • glgit log --oneline --graph --decorate --all
  • gco branchgit checkout branch
  • gbgit branch
  • gdgit diff

Note: The aliases gcom and gpush are used instead of gc and gp to avoid conflicts with PowerShell's built-in aliases (gc = Get-Content, gp = Get-ItemProperty).

Custom Aliases

  • ll → List files (Get-ChildItem)
  • la → List all files including hidden (Get-ChildItem -Force)

Documentation

Screenshots

Before

Standard PowerShell prompt with no enhancements.

After

Oh-My-Posh themed prompt with Git integration, syntax highlighting, and enhanced editing.

Screenshots coming soon

Platform Support

This tool is designed specifically for Windows 10 and Windows 11. PowerShell 7 itself is cross-platform, but this automation tool uses Windows-specific installation methods (msiexec, winget).

License

MIT License - See LICENSE file for details

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

14 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages