A modular, performance-optimized PowerShell profile for interactive shells. Features lazy loading, container helpers, prompt frameworks (oh-my-posh/Starship), and comprehensive validation tooling.
- 
Clone this repository to your PowerShell profile location: git clone https://github.com/bolens/ps-profile.git $HOME\Documents\PowerShell 
- 
Reload your profile: . $PROFILE 
- Modular Design: Profile functionality split into small, maintainable fragments in profile.d/
- Performance Optimized: Lazy loading and deferred initialization keep startup fast
- Container Support: Docker/Podman helpers with auto-detection
- Prompt Frameworks: Support for oh-my-posh and Starship with lazy initialization
- Comprehensive Validation: Linting, security scanning, idempotency testing, and benchmarking
- Git Integration: Pre-commit hooks and CI workflows
- Microsoft.PowerShell_profile.ps1— Main profile loader
- profile.d/— Modular fragments loaded in lexical order- 00-bootstrap.ps1— Helper functions for safe registration
- 06-oh-my-posh.ps1/- 20-starship.ps1— Prompt initialization
- 10-git.ps1— Git helpers
- 20-containers.ps1— Container management utilities
 
- scripts/— Utility scripts for validation, formatting, and maintenance
Run comprehensive checks before committing:
# Full validation (lint + security + idempotency)
pwsh -NoProfile -File scripts/checks/validate-profile.ps1
# Individual checks
pwsh -NoProfile -File scripts/utils/run-lint.ps1          # PSScriptAnalyzer
pwsh -NoProfile -File scripts/utils/run-security-scan.ps1 # Security analysis
pwsh -NoProfile -File scripts/checks/check-idempotency.ps1 # Idempotency testMeasure startup performance:
pwsh -NoProfile -File scripts/utils/benchmark-startup.ps1 -Iterations 30See CONTRIBUTING.md for development setup, validation scripts, and contribution guidelines.
- Detailed Profile Documentation — Comprehensive guide
- Debug Guide — Debugging and instrumentation
- PowerShell Config — Configuration details
This project is open source. See individual files for licensing information.