PowerShell Utilities is a fast, Rust-built toolkit for everyday PowerShell
work. The command stays short (ps) and adds interactive tools for ports,
processes, saved paths, workspaces, history, environment variables, and custom
shortcuts.
PowerShell normally reserves
psas an alias forGet-Process. Setup replaces that alias with a small profile bridge;Get-Processitself remains available.
The prebuilt release supports 64-bit Windows. From PowerShell:
curl.exe -fsSL https://raw.githubusercontent.com/KrisPowers/ps-utils/main/scripts/install.ps1 | powershell -NoProfile -ExecutionPolicy Bypass -Restart PowerShell, or load the command module and profile hooks immediately:
Import-Module PsUtils -Force
. $PROFILE
ps doctorThe installer places ps.exe in %LOCALAPPDATA%\ps\bin, adds that directory to
your user PATH, installs an autoloadable PowerShell command module, and
configures both PowerShell 7 and Windows PowerShell profiles. The command module
provides commands like ports, workspaces, mkcd, and custom shortcuts
without depending on profile loading. The profile bridge is still used for
prompt display, @, %, terminal history capture, and session restore.
It installs the latest release by default. To pin a release:
$env:PS_INSTALL_VERSION = "v0.1.1"
curl.exe -fsSL https://raw.githubusercontent.com/KrisPowers/ps-utils/main/scripts/install.ps1 | powershell -NoProfile -ExecutionPolicy Bypass -Most utilities can be called directly after setup:
ports # Browse TCP ports and stop an owning process
procs # Browse and stop processes
history # Search saved command history
envs # Browse environment variables
workspaces # Save or open a multi-tab workspace
zip # Zip the current directory into a new archive inside it
compress # Same as zip
pack # Same as zip
@ # Save, open, or remove favorite paths
% # Change ps settings
mkcd scratch # Create a directory and enter it
reload # Validate and reload your PowerShell profileThe ps prefix is always available too:
ps ports -p 3000
ps procs -n node
ps history -q cargo
ps envs -q path
ps zip
ps --helpports shows TCP port, state, local and remote addresses, and the owning
process. Select a row for details or move right to its Kill action.
ports -p 3000
ports -s established
ports -n chrome
ports --sort process
ports --refreshprocs (also processes) opens the process menu:
procs -n node
procs -t "project"Run workspaces to save the current PowerShell tabs as a named workspace or
open an existing one. Saved workspaces are ordered by recent use.
workspaces
workspaces open apiFor scripted setup, add a workspace from the current directory:
ps workspaces add apiOr define its main path and extra tabs explicitly:
ps workspaces add suite `
--path C:\Projects\suite `
--open C:\Projects\suite\api `
--open C:\Projects\suite\web
ps workspaces list
ps workspaces remove suiteRun zip, compress, or pack to create a .zip archive of the current
directory's contents. The archive is placed in that same directory and existing
files are never overwritten.
zip
compress
packType @ by itself to open the saved-path menu. Save the current directory,
jump to a favorite, or remove paths without editing configuration.
Type % by itself to manage:
- shortened prompt paths and prompt timestamps;
- per-directory terminal history and its maximum length;
- restoration of paths from closed PowerShell sessions.
Settings, paths, workspaces, history, and session data live under
%APPDATA%\ps.
Open the shortcut configuration:
ps commandsRefresh the command module after editing it:
ps install-commands
Import-Module PsUtils -ForceThree shortcut types are supported:
{
"version": 1,
"commands": {
"kill-port": {
"type": "kill-port",
"description": "Stop the process listening on a TCP port."
},
"api": {
"type": "workspace",
"description": "Open the API workspace.",
"path": "C:\\Projects\\api",
"open_windows": ["C:\\Projects\\api\\docs"]
},
"serve": {
"type": "shell",
"description": "Start the development server.",
"script": "npm run dev"
}
}
}Arguments supplied to a shell shortcut are available to its PowerShell script
as $psArgs. A shell shortcut can also use script_path and optionally set
dot_source to false.
Shortcut names must start with a letter or underscore and may contain letters, numbers, underscores, and hyphens. Prefer names that do not already exist as PowerShell aliases or commands; existing aliases are resolved before autoloaded module commands.
| Command | Purpose |
|---|---|
ps init |
Install or refresh the command module and managed profile bridge |
ps install-commands |
Install or refresh profile-independent PowerShell commands |
ps doctor |
Check profiles, config, PATH, history, and session storage |
ps zip |
Zip the current directory into a new archive inside it |
ps ports |
Browse and filter TCP connections |
ps procs |
Browse and filter processes |
ps history |
Search saved terminal history |
ps envs |
Browse environment variables |
ps workspaces |
Save, list, open, or remove workspaces |
ps commands |
Open custom shortcut configuration |
ps config-path <file> |
Print a managed config path |
ps run <shortcut> [args] |
Run a shortcut in a child process |
Use ps <command> --help for every option.
Requires a current stable Rust toolchain:
git clone https://github.com/KrisPowers/ps-utils.git
Set-Location ps-utils
cargo test
cargo build --release
.\target\release\ps.exe init --yes
Import-Module PsUtils -Force
. $PROFILE