Skip to content
/ airpwr Public

A package manager and environment to provide consistent tooling for software teams

License

Notifications You must be signed in to change notification settings

airpwr/airpwr

Repository files navigation

Airpower

A package manager and environment to provide consistent tooling for software teams.

Airpower manages software packages using container technology and allows users to configure local PowerShell sessions to their need. Airpower seamlessly integrates common packages with a standardized project script to enable common build commands kept in source control for consistency.

Requirements

Windows operating system with PowerShell version 5.1 or later.

Installing

Use this PowerShell command to install Airpower:

Install-Module Airpower -Scope CurrentUser

When you want to avoid user prompts, use these PowerShell commands before installation:

Install-PackageProvider -Name NuGet -Force
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

See the Airpower PS Gallery for other installation methods.

Updating

Use this PowerShell command to update Airpower:

Update-Module Airpower

Usage

Airpower is provided by the Invoke-Airpower commandlet. Several aliases are provided for ease-of-use: airpower, air, and pwr.

airpower [COMMAND]

Commands

Command Description
version Outputs the version of the module
list Outputs a list of installed packages
remote Outputs an object of remote packages and versions
pull Downloads packages
load Loads packages into the PowerShell session
exec Runs a user-defined scriptblock in a managed PowerShell session
run Runs a user-defined scriptblock provided in a project file
update Updates all tagged packages
prune Deletes unreferenced packages
remove Untags and deletes packages
help Outputs usage for this command

Configuration

Global

The following variables modify runtime behavior of airpower. Each can be specified as an in-scope variable or an environment variable.

AirpowerPullPolicy

The pull policy determines when a package is downloaded, or pulled, from the upstream registry. It is a [string] which can take on the values:

  • "IfNotPresent" - The package is pulled only when its tag does not exist locally.
  • "Never" - The package is never pulled. If the tag does not exist, an error is raised.
  • "Always" - The package is pulled from the upstream registry. If the local tag matches the remote digest, no data is downloaded.

The default AirpowerPullPolicy is "IfNotPresent".

AirpowerPath

The path determines where packages and metadata exist on a user's machine. It is a [string].

The default AirpowerPath is "$env:LocalAppData\Airpower".

AirpowerAutoupdate

The autoupdate determines if and how often the update action is taken. It is a [timespan] but can be specified and parsed as a [string]. The autoupdate mechanism is evaluated upon initialization of the airpower module, meaning once per shell instance in which you use an airpower command.

For example, if AirpowerAutoupdate is set to '1.00:00:00', then update will only automatically execute for packages that were last updated at least one day ago.

The default AirpowerAutoupdate is $null

AirpowerAutoprune

The autoprune determines if and how often the prune action is taken. It is a [timespan] but can be specified and parsed as a [string]. The autoprune mechanism is evaluated upon initialization of the airpower module, meaning once per shell instance in which you use an airpower command.

For example, if AirpowerAutoprune is set to '1.00:00:00', then prune will only automatically execute for packages that have been orphaned for at least one day.

The default AirpowerAutoprune is $null.

Other

ProgressPreference

The progress bar for downloading and extracting packages can be suppressed by assigning the ProgressPreference variable to 'SilentlyContinue'. This behavior is often desirable for environments such as CI pipelines.