First off, thank you for considering contributing to PowerShell Dev Toolkit! 🎉
Before creating bug reports, please check the existing issues to avoid duplicates. When you create a bug report, include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Describe the behavior you observed and what you expected
- Include PowerShell version (
$PSVersionTable.PSVersion) - Include Windows version
- Include relevant logs or error messages
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the steps
- Describe the current behavior and explain which behavior you expected to see
- Explain why this enhancement would be useful
- Fork the repository
- Create a new branch from
main:
git checkout -b feature/your-feature-name- Make your changes:
- Follow the existing code style
- Add comments for complex logic
- Update documentation if needed
- Test your changes:
- Test on a clean Windows machine if possible
- Ensure backward compatibility
- Commit your changes:
git commit -m "Add feature: your feature description"- Push to your fork:
git push origin feature/your-feature-name- Open a Pull Request with a clear title and description
- Use meaningful variable names
# Good
$serverHostname = "example.com"
# Bad
$s = "example.com"- Include comment-based help for all scripts
<#
.SYNOPSIS
Brief description
.DESCRIPTION
Detailed description
.PARAMETER Name
Parameter description
.EXAMPLE
script.ps1 -Name "test"
#>- Use approved verbs for function names
- Get-, Set-, New-, Remove-, Add-, etc.
- Check:
Get-Verb
- Handle errors gracefully
try {
# Your code
} catch {
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
exit 1
}- Support common parameters when appropriate
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]$Name
)- Provide meaningful output
- Use colored output for better UX
- Support
-AsJsonfor programmatic use where appropriate - Show progress for long-running operations
- Never hardcode user-specific information
- Use
config.jsonfor user settings - Provide sensible defaults
- Document all configuration options in
config.example.json
- Never commit credentials or sensitive data
- Use encrypted credential storage (Export-Clixml)
- Always validate user input
- Use secure connections (SSH, HTTPS)
- Update
README.mdif you add new features - Add examples to help text
- Document configuration options
- Update
helpme.ps1for new commands
Tests are written with Pester 5 in the tests/ directory. Run the full suite with:
.\Invoke-Tests.ps1This installs Pester 5+ if needed and runs all tests with detailed output. Tests also run automatically via GitHub Actions CI on every push and pull request.
When adding new commands, please add corresponding test coverage. Tests should use the Pester 5 BeforeAll pattern:
BeforeAll {
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSCommandPath)
Import-Module (Join-Path $repoRoot "PowerShellDevToolkit") -Force
}
Describe "Your-Command" {
It "Should do something" {
# test code
}
}Also test manually:
- Test your changes on Windows 10 and 11
- Test with PowerShell 5.1 and 7+
- Test without WSL (fallback scenarios)
- Test with missing dependencies (graceful degradation)
powershell-dev-toolkit/
├── PowerShellDevToolkit/ # The PS module
│ ├── PowerShellDevToolkit.psd1 # Module manifest (version, exports)
│ ├── PowerShellDevToolkit.psm1 # Root module (auto-loader, aliases)
│ ├── Public/ # Exported functions (one per file)
│ │ ├── Connect-SSH.ps1
│ │ ├── Get-GitQuick.ps1
│ │ └── ...
│ └── Private/ # Internal helpers (not exported)
│ └── Get-ScriptConfig.ps1
├── tests/ # Pester tests
├── docs/ # Documentation
├── config.example.json # Configuration template
├── Setup-Environment.ps1 # Bootstrap / installer
├── README.md
├── LICENSE
└── creds/ # Credentials (gitignored)
- Create
PowerShellDevToolkit\Public\Verb-Noun.ps1with afunction Verb-Noun { ... }wrapper - Add the function name to
FunctionsToExportinPowerShellDevToolkit.psd1 - Optionally add a short alias in
PowerShellDevToolkit.psm1andAliasesToExportin the.psd1 - Add a test file
tests\Verb-Noun.Tests.ps1 - Update
Show-HelpinPublic\Show-Help.ps1with the new command reference
Use clear and meaningful commit messages:
- feat: New feature
- fix: Bug fix
- docs: Documentation changes
- style: Code style changes (formatting)
- refactor: Code refactoring
- test: Adding tests
- chore: Maintenance tasks
Examples:
feat: add support for SQLServer tunneling
fix: resolve credential loading on PowerShell 7
docs: update SSH setup instructions
refactor: simplify server configuration logic
Feel free to open an issue with the question label if you need clarification on anything.
Be respectful and constructive. We're all here to learn and help each other.
Thank you for contributing! 🚀