Skip to content

A modern, extensible PowerShell 7 profile that adds logging, a dynamic welcome banner, aliases, theming, and quality-of-life enhancements — all installable with a single command.

License

Notifications You must be signed in to change notification settings

Mahmoud-walid/psx-profile

Repository files navigation

🌀 psx-profile

psx-profile is a production-ready, cross-platform PowerShell 7 profile designed to supercharge your terminal. It brings robust session logging, a beautiful prompt via Oh My Posh, useful utility commands, and a built-in CLI manager to keep everything updated.

Built to be fast, safe (thread-safe logging), and easy to install.


License PowerShell Platform PSX CI PRs Welcome Last Commit


🚀 Installation

Windows

Run this command in PowerShell 7:

Set-ExecutionPolicy Bypass -Scope Process -Force; irm "https://raw.githubusercontent.com/Mahmoud-walid/psx-profile/main/installer.ps1" | iex

Linux / macOS

Step 1: Install PowerShell (if missing)

  • macOS (via Homebrew):
    brew install powershell/tap/powershell
  • Linux (Ubuntu/Debian):
    sudo apt-get update && sudo apt-get install -y powershell
    (For other distros, see the Microsoft Guide)

Step 2: Run the Installer

pwsh -c "irm 'https://raw.githubusercontent.com/Mahmoud-walid/psx-profile/main/installer.ps1' | iex"

Note: The installer will automatically setup Oh My Posh, download the theme, and configure your profile.


⚡ Important: Fonts

This profile uses Oh My Posh with the Paradox theme. To see icons correctly (instead of rectangles []), you must install a "Nerd Font".

  1. Download and install Cascadia Code NF (or any Nerd Font).
  2. Set it as your terminal font in Windows Terminal, VSCode, or your preferred emulator.

🎮 The psx CLI Manager

This profile comes with a built-in command psx to manage your environment easily.

Command Alias Description
psx -status psx -s View profile paths, version, and last 3 sessions.
psx -update psx -u Update the profile script from GitHub.
psx -pwshupdate psx -p Check and install the latest PowerShell 7 version (Cross-platform).
psx -clearlogs psx -d Clear the session log history.
psx -remove psx -r Uninstall psx-profile, themes, and logs.
psx -help psx -h Show help menu.

✨ Key Features

📊 Advanced Session Logging

Every session is logged to a JSON file with thread-safety (using Mutex to prevent conflicts when multiple tabs are open).

  • View logs: Get-PowerShell7-Open-Logs (or alias pwsh-logs).
  • Location: %LOCALAPPDATA%\PS7Logs (Windows) or ~/.local/share/PS7Logs (Linux/macOS).

📂 Folder Tree Visualization

Use the built-in Show-FolderTree command to visualize directories.

Show-FolderTree -Path . -IgnoreFolders node_modules,.git,bin

🎨 Beautiful Terminal

  • Dynamic Banner: Shows user, machine, and time with a gradient effect.
  • Oh My Posh: Pre-configured with the Paradox theme.

🛠 Requirements

  • PowerShell 7+ (The installer can update this for you).
  • Nerd Font installed (Recommended: Cascadia Code NF or MesloLGS NF).
  • Internet Connection (For initial install and updates).

📂 File Structure

The profile creates the following structure:

# Windows
Documents/PowerShell/Microsoft.PowerShell_profile.ps1
AppData/Local/PS7Logs/ps7_open_logs.json
AppData/Local/oh-my-posh-themes/paradox.omp.json

# Linux / macOS
~/.config/powershell/Microsoft.PowerShell_profile.ps1
~/.local/share/PS7Logs/ps7_open_logs.json
~/.local/share/oh-my-posh-themes/paradox.omp.json

📸 Screenshots

image image

🤝 Contributing

Pull requests are welcome!

  1. Fork the repo.
  2. Create a feature branch.
  3. Submit a PR.

📄 License

MIT License.

About

A modern, extensible PowerShell 7 profile that adds logging, a dynamic welcome banner, aliases, theming, and quality-of-life enhancements — all installable with a single command.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published