https://github.com/scottmckendry/ps-color-scripts
🌈 Port of Derek Taylor's Popular "shell-color-scripts" for PowerShell
https://github.com/scottmckendry/ps-color-scripts
color-scripts powershell powershell-module windows-terminal
Last synced: 3 months ago
JSON representation
🌈 Port of Derek Taylor's Popular "shell-color-scripts" for PowerShell
- Host: GitHub
- URL: https://github.com/scottmckendry/ps-color-scripts
- Owner: scottmckendry
- License: mit
- Created: 2024-01-10T04:12:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-24T07:02:57.000Z (over 1 year ago)
- Last Synced: 2025-03-27T12:11:11.226Z (4 months ago)
- Topics: color-scripts, powershell, powershell-module, windows-terminal
- Language: PowerShell
- Homepage:
- Size: 69.3 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌈 PowerShell Color Scripts
An _almost_ like for like port of Derek Taylor's Popular [shell-color-scripts](https://gitlab.com/dwt1/shell-color-scripts) package for PowerShell.
Painstakingly ported to PowerShell from the original Bash scripts, this module provides a collection of color scripts to brighten up your PowerShell terminal.

## 📦 Installation
The module is available on the [PowerShell Gallery](https://www.powershellgallery.com/packages/ps-color-scripts/) and can be installed using the following command.
```powershell
Install-Module -Name ps-color-scripts -Scope CurrentUser
```## 🚀 Usage
**Default**: Display a random color script.
```powershell
Show-ColorScript
```**Specific**: Display a specific color script.
```powershell
Show-ColorScript -Name "pacman"
```**List**: List all available color scripts.
```powershell
Show-ColorScript -List
```## 🧑🍳 Recipes
#### Add to your PowerShell profile to display a random color script on startup.

```powershell
$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePathif (!$profileExists) {
New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}Add-Content -Path $profilePath -Value "Show-ColorScript"
```> [!TIP]
> Replace `Show-ColorScript` with `Show-ColorScript -Name "[name]"` to display a specific color script, replacing `[name]` with the name of the color script you wish to display.#### Add an alias for `Show-ColorScript` to your PowerShell profile.
Quickly display a random color script by typing `scs` into your PowerShell terminal.
```powershell
$profilePath = $PROFILE.CurrentUserAllHosts
$profileExists = Test-Path -Path $profilePathif (!$profileExists) {
New-Item -Path $PROFILE.CurrentUserAllHosts -ItemType File
}Add-Content -Path $profilePath -Value "New-Alias -Name scs -Value Show-ColorScript"
```> [!TIP]
> Replace `scs` with your preferred alias. You can also run `scs [name]` to display a specific color script, replacing `[name]` with the name of the color script you wish to display.## 🤝 Contributing
Contributions, issues and feature requests are welcome! Try to keep contributions in the spirit of the original [shell-color-scripts](https://gitlab.com/dwt1/shell-color-scripts) project.
New scripts should use ANSI escape codes to colorize the output, ideally using 10 to 16 of the available colors (see [ANSI escape code](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) for more information).## 📝 License
Like its inspiration, this project is licensed under the [MIT License](https://github.com/scottmckendry/ps-color-scripts/blob/main/LICENSE). Feel free to use the code as you see fit.