A build automation tool written in PowerShell that leverages your existing command-line knowledge.
psake is a build automation tool written in PowerShell. It avoids the angle-bracket tax associated with executable XML by leveraging the PowerShell syntax in your build scripts. psake has a syntax inspired by rake (aka make in Ruby) and bake (aka make in Boo), but is easier to script because it leverages your existing command-line knowledge.
Note: psake is pronounced "sake" – as in Japanese rice wine. It does NOT rhyme with make, bake, or rake.
psake can be installed in several ways:
Install-Module -Name psake -Scope CurrentUser
choco install psake
-
Download and extract the project from the releases page
-
Unblock the zip file before extracting (right-click → Properties → Unblock)
-
Import the module:
Import-Module .\psake.psm1
-
PowerShell 5.1 or later
-
Execution policy set to allow script execution:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
We highly recommend reading the psake docs for a more thorough walk through.
-
Create a build script file (e.g.,
psakefile.ps1
):Task Default -Depends Test, Package Task Test { Write-Host "Running tests..." } Task Package { Write-Host "Creating package..." }
-
Run the build:
Invoke-psake
Navigate to the examples directory and try out the sample build scripts:
cd .\examples
Invoke-psake # Runs the default task
Invoke-psake .\psakefile.ps1 Clean # Runs the Clean task
Get detailed help and examples:
Get-Help Invoke-psake -Full
For Visual Studio 2017 and later, psake can automatically locate MSBuild. If you encounter issues, you may need to install the VSSetup PowerShell module:
Install-Module -Name VSSetup -Scope CurrentUser
You can find information about each release of psake in the releases section and the Changelog.
We welcome contributions! Here's how you can get involved:
- GitHub Discussions - Ask questions and share ideas
- PowerShell Discord - Join the #psake channel
- PowerShell Slack - Join the #psake channel
- Fork the main repository and submit pull requests
- Check out the psake docs for documentation
- Browse the issues list for bugs and feature requests
- Explore psake-contrib for additional scripts and modules
psake is released under the MIT license.