Skip to content

Latest commit

 

History

History
1894 lines (1337 loc) · 34.9 KB

File metadata and controls

1894 lines (1337 loc) · 34.9 KB

Function Reference

Auto-generated documentation Last updated: 2026-03-29 06:34:36 Total functions: 145

Table of Contents

Applications

Get-ChocoApp

Signature:

function Get-ChocoApp {
    $apps = $(choco list --id-only --no-color).Split("\n")
    $apps = $apps[1..($apps.Length - 2)]
    return $apps
}

function Get-ScoopApp {

Source: Core\Apps\appsManage.ps1

Get-ScoopApp

Signature:

function Get-ScoopApp {
    $apps = $(scoop list | Select-Object -ExpandProperty "Name").Split("\n")
    $apps = $apps[1..($apps.Length - 1)]
    return $apps
}

function Select-App {

Source: Core\Apps\appsManage.ps1

Initialize-PowerShellGallery

Signature:

function Initialize-PowerShellGallery {
    try {

Source: Core\Apps\UpdateAppsHelper.ps1

Initialize-UpdateLog

Signature:

function Initialize-UpdateLog {
    $logFile = Join-Path $env:TEMP "SystemUpdate_$(Get-Date -Format 'yyyyMMdd_HHmmss').log"
    return $logFile
}

# Logging function
function Write-UpdateLog {

Description:

Initialize logging

Source: Core\Apps\Updates\SystemUpdater.ps1

Install-AllMissingTools

Signature:

function Install-AllMissingTools {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\InstallMissingTools.ps1

Install-Chezmoi

Signature:

function Install-Chezmoi {
    Write-InstallHeader "Installing Chezmoi (Dotfiles Manager)"

    if (Test-CommandExist 'chezmoi') {

Source: Core\Apps\InstallMissingTools.ps1

Install-Composer

Signature:

function Install-Composer {
    Write-InstallHeader "Installing PHP and Composer"

    if (Test-CommandExist 'composer') {

Source: Core\Apps\InstallMissingTools.ps1

Install-Conda

Signature:

function Install-Conda {
    Write-InstallHeader "Installing Conda (Miniforge/Mamba)"

    if (Test-CommandExist 'conda') {

Source: Core\Apps\InstallMissingTools.ps1

Install-Homebrew-WSL

Signature:

function Install-Homebrew-WSL {
    Write-InstallHeader "Installing Homebrew in WSL"

    if (-not (Test-CommandExist 'wsl')) {

Source: Core\Apps\InstallMissingTools.ps1

Install-Ruby

Signature:

function Install-Ruby {
    Write-InstallHeader "Installing Ruby with DevKit"

    if (Test-CommandExist 'ruby') {

Source: Core\Apps\InstallMissingTools.ps1

Invoke-RequiredModuleRepair

Signature:

function Invoke-RequiredModuleRepair {
    $moduleInstallerPath = Join-Path (Split-Path $PSScriptRoot -Parent) 'ModuleInstaller.ps1'
    if (-not (Test-Path $moduleInstallerPath)) {

Source: Core\Apps\UpdateAppsHelper.ps1

Select-App

Signature:

function Select-App {
    param (
        [string[]] $apps
    )

Source: Core\Apps\appsManage.ps1

Test-CommandExist

Signature:

function Test-CommandExist {
        param([string]$Command)

Source: Core\Apps\InstallMissingTools.ps1

Uninstall-ChocoApp

Signature:

function Uninstall-ChocoApp {
    $apps = Select-App $(Get-ChocoApp)
    if ($apps.Length -eq 0) {

Source: Core\Apps\appsManage.ps1

Uninstall-ScoopApp

Signature:

function Uninstall-ScoopApp {
    $apps = Select-App $(Get-ScoopApp)
    if ($apps.Length -eq 0) {

Source: Core\Apps\appsManage.ps1

Update-AllApp

Signature:

function Update-AllApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-Cargo

Signature:

function Update-Cargo {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Chezmoi

Signature:

function Update-Chezmoi {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Choco

Signature:

function Update-Choco {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-ChocoApp

Signature:

function Update-ChocoApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-Composer

Signature:

function Update-Composer {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Conda

Signature:

function Update-Conda {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Description:

Additional Development Tools

Source: Core\Apps\UpdateAppsHelper.ps1

Update-DotnetTool

Signature:

function Update-DotnetTool {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Fzf

Signature:

function Update-Fzf {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Gcloud

Signature:

function Update-Gcloud {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Gem

Signature:

function Update-Gem {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-GitSubmodule

Signature:

function Update-GitSubmodule {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [string]$Path = $PWD
    )

Source: Core\Apps\UpdateAppsHelper.ps1

Update-GoTools

Signature:

function Update-GoTools {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Homebrew

Signature:

function Update-Homebrew {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-NodeEnvironment

Signature:

function Update-NodeEnvironment {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [switch]$CleanCache,
        [switch]$ForceReinstall
    )

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Npm

Signature:

function Update-Npm {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-NpmApp

Signature:

function Update-NpmApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-PipApp

Signature:

function Update-PipApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-Pipx

Signature:

function Update-Pipx {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-PowershellModule

Signature:

function Update-PowershellModule {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-PythonEnvironment

Signature:

function Update-PythonEnvironment {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [switch]$CleanCache
    )

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Scoop

Signature:

function Update-Scoop {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-ScoopApp

Signature:

function Update-ScoopApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\appsManage.ps1

Update-Starship

Signature:

function Update-Starship {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-StoreApp

Signature:

function Update-StoreApp {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-System

Signature:

function Update-System {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Description:

Main update function with visual progress

Source: Core\Apps\Updates\SystemUpdater.ps1

Update-Uv

Signature:

function Update-Uv {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-Vcpkg

Signature:

function Update-Vcpkg {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [string[]]$VcpkgRoots = @('C:\vcpkg', 'D:\opt\vcpkg', 'C:\tools\vcpkg')
    )

Source: Core\Apps\UpdateAppsHelper.ps1

Update-VSCodeExtension

Signature:

function Update-VSCodeExtension {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-WindowsSystem

Signature:

function Update-WindowsSystem {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-WindowsUpdate

Signature:

function Update-WindowsUpdate {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\WindowsUpdateHelper.ps1

Update-Winget

Signature:

function Update-Winget {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Update-WSL

Signature:

function Update-WSL {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Source: Core\Apps\UpdateAppsHelper.ps1

Write-AppLog

Signature:

function Write-AppLog {
    param($Message)

Source: Core\Apps\UpdateApps.ps1

Write-ErrorLog

Signature:

function Write-ErrorLog {
    param($ErrorMessage)

Description:

Function to handle errors

Source: Core\Apps\UpdateApps.ps1

Write-InstallHeader

Signature:

function Write-InstallHeader {
    param([string]$Title)

Source: Core\Apps\InstallMissingTools.ps1

Write-InstallStatus

Signature:

function Write-InstallStatus {
    param(
        [string]$Message,
        [ValidateSet('Info', 'Success', 'Warning', 'Error')]
        [string]$Status = 'Info'
    )

Source: Core\Apps\InstallMissingTools.ps1

Write-UpdateErrorLog

Signature:

function Write-UpdateErrorLog {
    param($ErrorMessage, $Source, $LogFile)

Description:

Error handling function

Source: Core\Apps\Updates\SystemUpdater.ps1

Write-UpdateHeader

Signature:

function Write-UpdateHeader {
    param([string]$Title)

Description:

Helper function to write section headers

Source: Core\Apps\UpdateAppsHelper.ps1

Write-UpdateLog

Signature:

function Write-UpdateLog {
    param($Message, $LogFile)

Description:

Logging function

Source: Core\Apps\Updates\SystemUpdater.ps1

Write-UpdateStatus

Signature:

function Write-UpdateStatus {
    param(
        [string]$Message,
        [ValidateSet('Info', 'Success', 'Warning', 'Error')]
        [string]$Status = 'Info'
    )

Description:

Helper function to write status messages

Source: Core\Apps\UpdateAppsHelper.ps1

Core

Initialize-ModuleInstallationEnvironment

Signature:

Write-Verbose "Failed to write module cache: $_"
    }
}

function Initialize-ModuleInstallationEnvironment {

Source: Core\ModuleInstaller.ps1

Install-RequiredModule

Signature:

if ($MinVersion -and ($module.Version -lt [version]$MinVersion)) {
            return $false
        }
        return $true
    }

    return $false
}

function Install-RequiredModule {

Source: Core\ModuleInstaller.ps1

Save-ModuleCache

Signature:

}

function Save-ModuleCache {

Source: Core\ModuleInstaller.ps1

Test-ModuleInstalled

Signature:

Path    = $Module.Path
    }) -Force
    Save-ModuleCache
}

function Test-ModuleInstalled {

Source: Core\ModuleInstaller.ps1

Test-ModulePathHealthy

Signature:

Write-Warning "[ModuleInstaller] Failed to trust PSGallery: $_"
    }
}

function Test-ModulePathHealthy {

Source: Core\ModuleInstaller.ps1

Update-ModuleCacheEntry

Signature:

Where-Object { $_.Extension -in '.psd1', '.psm1', '.dll' }

    return [bool]$moduleFiles
}

function Update-ModuleCacheEntry {

Source: Core\ModuleInstaller.ps1

Other

Disable-FullPSReadLine

Signature:

# Provide a function to disable PSReadLine features if needed
function Disable-FullPSReadLine {

Description:

Provide a function to disable PSReadLine features if needed

Source: Microsoft.PowerShell_profile.ps1

Enable-TerminalIcon

Signature:

# Provide an explicit enable function for Terminal-Icons so nothing related to it is created at startup
        function Enable-TerminalIcon {

Description:

Provide an explicit enable function for Terminal-Icons so nothing related to it is created at startup

Source: Microsoft.PowerShell_profile.ps1

Initialize-CachedToolInit

Signature:

# Reusable fingerprint-based cache for tool init scripts
function Initialize-CachedToolInit {

Description:

Reusable fingerprint-based cache for tool init scripts

Source: Microsoft.PowerShell_profile.ps1

Initialize-NuGetProvider

Signature:

function Initialize-NuGetProvider {
    # Ensure NuGet provider is installed so Install-Module doesn't hang prompting the user
    $nuget = Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue
    if (-not $nuget -or $nuget.Version -lt [version]'2.8.5.201') {

Source: tools\install-dependencies.ps1

Install-AiTools

Signature:

function Install-AiTools {
    Write-Host "`n===== AI CLI Tools =====" -ForegroundColor Cyan

    # Ensure prerequisites are available before installing AI tools
    Update-SessionPath

    # uv - needed for Kimi CLI; manages its own Python downloads
    if (-not (Test-CommandExist 'uv')) {

Source: tools\install-dependencies.ps1

Install-CliTools

Signature:

function Install-CliTools {
    Write-Host "`n===== CLI Tools (main) =====" -ForegroundColor Cyan

    foreach ($tool in $ScoopMainTools) {

Source: tools\install-dependencies.ps1

Install-Dependency

Signature:

Initialize-CachedToolInit -ToolName 'gh' -InitCommand { gh completion -s powershell } -CacheBaseName 'gh-completion-cache'
}

function Install-Dependency {

Source: Microsoft.PowerShell_profile.ps1

Install-DevRuntimes

Signature:

function Install-DevRuntimes {
    Write-Host "`n===== Development Runtimes =====" -ForegroundColor Cyan

    # Node.js
    Install-Tool -Name 'Node.js' -Command 'node' -ScoopPackage 'nodejs-lts' -WingetId 'OpenJS.NodeJS.LTS' -ChocoPackage 'nodejs-lts'
    Update-SessionPath

    # Python (scoop preferred - handles multiple versions, creates proper shims for python + pip)
    if (-not (Test-CommandExist 'python')) {

Source: tools\install-dependencies.ps1

Install-NpmPackages

Signature:

function Install-NpmPackages {
    Write-Host "`n===== npm Global Packages =====" -ForegroundColor Cyan

    if (-not (Test-CommandExist 'npm')) {

Source: tools\install-dependencies.ps1

Install-PackageManagers

Signature:

function Install-PackageManagers {
    Write-Host "`n===== Package Managers =====" -ForegroundColor Cyan

    # Scoop (no admin required)
    Write-Status "Scoop" -Type Header
    if (Test-CommandExist 'scoop') {

Description:

region Installation Functions

Source: tools\install-dependencies.ps1

Install-PipPackages

Signature:

function Install-PipPackages {
    Write-Host "`n===== pip Packages =====" -ForegroundColor Cyan

    if (-not (Test-CommandExist 'pip')) {

Source: tools\install-dependencies.ps1

Install-PowerShellModules

Signature:

function Install-PowerShellModules {
    Write-Host "`n===== PowerShell Modules =====" -ForegroundColor Cyan

    # Ensure NuGet provider and PSGallery trust so Install-Module doesn't hang
    Initialize-NuGetProvider

    foreach ($mod in $RequiredModules) {

Source: tools\install-dependencies.ps1

Install-Tool

Signature:

function Install-Tool {
    param(
        [string]$Name,
        [string]$Command,
        [string]$ScoopPackage,
        [string]$ScoopBucket = 'main',
        [string]$WingetId,
        [string]$ChocoPackage
    )

Source: tools\install-dependencies.ps1

Install-WithChoco

Signature:

function Install-WithChoco {
    param([string]$Package)

Source: tools\install-dependencies.ps1

Install-WithScoop

Signature:

function Install-WithScoop {
    param(
        [string]$Package,
        [string]$Bucket = 'main'
    )

Source: tools\install-dependencies.ps1

Install-WithWinget

Signature:

function Install-WithWinget {
    param([string]$PackageId)

Source: tools\install-dependencies.ps1

Measure-Block

Signature:

function Measure-Block {
    param(
        [string]$Name,
        [scriptblock]$Block
    )

Source: Microsoft.PowerShell_profile.ps1

Test-CachedPath

Signature:

function Test-CachedPath {
    param([string]$Path)

Description:

Helper function for cached Test-Path

Source: Microsoft.PowerShell_profile.ps1

Test-SudoAvailable

Signature:

function Test-SudoAvailable {
    return (Test-CommandExist 'sudo')
}

if (-not (Get-Command Test-CommandExist -ErrorAction SilentlyContinue)) {

Source: tools\install-dependencies.ps1

Update-SessionPath

Signature:

function Update-SessionPath {
    # Refresh PATH from registry so newly installed tools are found in the current session
    $machinePath = [System.Environment]::GetEnvironmentVariable('Path', 'Machine')
    $userPath = [System.Environment]::GetEnvironmentVariable('Path', 'User')
    $env:Path = "$userPath;$machinePath"
}

function Test-IsAdmin {

Description:

region Helper Functions

Source: tools\install-dependencies.ps1

Write-Status

Signature:

function Write-Status {
    param(
        [string]$Message,
        [ValidateSet('Info', 'Success', 'Warning', 'Error', 'Header')]
        [string]$Type = 'Info'
    )

Source: tools\install-dependencies.ps1

System

_fzf_get_path_using_fd

Signature:

function _fzf_get_path_using_fd
{

Source: Core\System\fzf.ps1

_fzf_get_path_using_rg

Signature:

function _fzf_get_path_using_rg
{

Source: Core\System\fzf.ps1

_fzf_open_path

Signature:

function _fzf_open_path
{

Source: Core\System\fzf.ps1

Clear-All

Signature:

function Clear-All {
    Clear-RecycleBin
    Clear-TempData
    Clear-Disk
}

Source: Core\System\clean.ps1

Clear-Disk

Signature:

function Clear-Disk {
    Write-Host "Running Disk Cleanup tool..." -ForegroundColor Yellow
    cleanmgr /sagerun:1 | Out-Null
    Write-Host "$([char]7)"
    Write-Host "Disk Cleanup completed" -ForegroundColor Green
}

function Clear-All {

Source: Core\System\clean.ps1

Clear-RecycleBin

Signature:

function Clear-RecycleBin {
    $Path = "$env:SystemDrive\`$Recycle.Bin"
    Write-Host "[INFO] Cleaning recycle bin..." -ForegroundColor Yellow
    Get-ChildItem $Path -Force -Recurse -ErrorAction SilentlyContinue |
        Remove-Item -Recurse -Exclude *.ini -ErrorAction SilentlyContinue
    Write-Host "Recycle bin cleaned successfully" -ForegroundColor Green
}

function Clear-TempData {

Description:

Disk cleanup utilities Source: https://www.geeksforgeeks.org/disk-cleanup-using-powershell-scripts/

Source: Core\System\clean.ps1

Clear-TempData

Signature:

function Clear-TempData {
    Write-Host "Erasing temporary files..." -ForegroundColor Yellow

    $tempPaths = @(
        "$env:WinDir\Temp",
        "$env:WinDir\Prefetch",
        "$env:SystemDrive\Users\*\AppData\Local\Temp"
    )

    foreach ($path in $tempPaths) {

Source: Core\System\clean.ps1

cma

Signature:

function cma {
    param (
        [string[]] $files
    )

Source: Core\System\chezmoi.ps1

cmc

Signature:

function cmc {
    param (
        [string] $msg
    )

Source: Core\System\chezmoi.ps1

cmp

Signature:

function cmp {
    chezmoi git push
}

function cms {

Source: Core\System\chezmoi.ps1

cms

Signature:

function cms {
    $current_dir = Get-Location
    try {

Source: Core\System\chezmoi.ps1

dirs

Signature:

function dirs {
    if ($args.Count -gt 0) {

Description:

Recursive file listing (equivalent of dir /s /b)

Source: Core\System\linuxLike.ps1

Env

Signature:

function Env: { Set-Location Env: }

# Recursive file listing (equivalent of dir /s /b)
function dirs {

Source: Core\System\linuxLike.ps1

fdg

Signature:

function fdg
{

Source: Core\System\fzf.ps1

HKCU

Signature:

function HKCU: { Set-Location HKCU: }
function Env: { Set-Location Env: }

Source: Core\System\linuxLike.ps1

HKLM

Signature:

function HKLM: { Set-Location HKLM: }
function HKCU: { Set-Location HKCU: }

Description:

Drive shortcuts

Source: Core\System\linuxLike.ps1

n

Signature:

function n {
    notepad $args
}

# Drive shortcuts
function HKLM: { Set-Location HKLM: }

Source: Core\System\linuxLike.ps1

rgg

Signature:

function rgg
{

Source: Core\System\fzf.ps1

sha256

Signature:

function sha256 {
    Get-FileHash -Algorithm SHA256 $args
}

function n {

Description:

Linux-like utility functions for PowerShell

Source: Core\System\linuxLike.ps1

Utilities

akkorokamui

Signature:

function akkorokamui { ssh -p 54226 tears@192.168.1.100 }
Set-Alias -Name proxmox -Value akkorokamui

# Navigation aliases and utilities
function .. { Set-Location .\.. }

Description:

SSH alias for Proxmox

Source: Core\Utils\unified_aliases.ps1

Clear-DnsCache

Signature:

function Clear-DnsCache { Clear-DnsClientCache }
Set-Alias -Name flushdns -Value Clear-DnsCache

# Clipboard Utilities
function Set-ClipboardContent {

Description:

Networking Utilities

Source: Core\Utils\unified_aliases.ps1

df

Signature:

function df { get-volume }

function Set-EnvironmentVariable {

Description:

System utilities

Source: Core\Utils\unified_aliases.ps1

Edit-FileContent

Signature:

function Edit-FileContent($file, $find, $replace) {
  (Get-Content $file).replace("$find", $replace) | Set-Content $file
}
Set-Alias -Name sed -Value Edit-FileContent

function Get-CommandPath($command) {

Source: Core\Utils\unified_aliases.ps1

Expand-CustomArchive

Signature:

function Expand-CustomArchive {
    param (
        [Parameter(Mandatory=$true)]
        [string]$File,
        [string]$Folder
    )

Source: Core\Utils\FileSystemUtils.ps1

Expand-MultipleArchives

Signature:

function Expand-MultipleArchives {
    param([string[]]$Files)

Source: Core\Utils\FileSystemUtils.ps1

Expand-ZipFile

Signature:

function Expand-ZipFile($file) {
  Write-Output("Extracting", $file, "to", $pwd)
  $fullFile = Get-ChildItem -Path $pwd -Filter $file | ForEach-Object { $_.FullName }

Source: Core\Utils\unified_aliases.ps1

Find-File

Signature:

function Find-File {
    param(
        [Parameter(Position=0)]
        [string]$pattern = "*",
        [string]$path = ".",
        [switch]$recurse,
        [int]$depth = 3
    )

Description:

Search utilities for PowerShell profile

Source: Core\Utils\SearchUtils.ps1

Find-PowerShellCommand

Signature:

function Find-PowerShellCommand {
    param([string]$name)

Source: Core\Utils\SearchUtils.ps1

Find-String

Signature:

function Find-String($regex, $dir) {
  if ($dir) {

Source: Core\Utils\unified_aliases.ps1

Get-ClipboardContent

Signature:

function Get-ClipboardContent { Get-Clipboard }
Set-Alias -Name pst -Value Get-ClipboardContent

# System utilities
function df { get-volume }

Source: Core\Utils\unified_aliases.ps1

Get-CommandPath

Signature:

function Get-CommandPath($command) {
  Get-Command -Name $command -ErrorAction SilentlyContinue |
  Select-Object -ExpandProperty Path -ErrorAction SilentlyContinue
}
Set-Alias -Name which -Value Get-CommandPath

Source: Core\Utils\unified_aliases.ps1

Get-Font

Signature:

function Get-Font {
  param (
    $regex
  )

Source: Core\Utils\unified_aliases.ps1

Get-FormattedUptime

Signature:

function Get-FormattedUptime {
    $bootuptime = (Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime
    $CurrentDate = Get-Date
    $uptime = $CurrentDate - $bootuptime
    Write-Output "Uptime: $($uptime.Days) Days, $($uptime.Hours) Hours, $($uptime.Minutes) Minutes"
}

function Get-PubIP {

Source: Core\Utils\CommonUtils.ps1

Get-GitStatus

Signature:

function Get-GitStatus { git status }
function Invoke-GitPull { git pull }

Source: Core\Utils\unified_aliases.ps1

Get-ProcessByName

Signature:

function Get-ProcessByName($name) { Get-Process $name }
Set-Alias -Name pgrep -Value Get-ProcessByName

# Search and find utilities
function find-file($name) {

Source: Core\Utils\unified_aliases.ps1

Get-PubIP

Signature:

function Get-PubIP {
    try {

Source: Core\Utils\CommonUtils.ps1

hb

Signature:

function hb {
  if ($args.Length -eq 0) {

Source: Core\Utils\unified_aliases.ps1

head

Signature:

function head {
  param($Path, $n = 10)

Source: Core\Utils\unified_aliases.ps1

Initialize-Editor

Signature:

function Initialize-Editor {
  if ($script:EditorInitialized) { return }

Description:

Editor detection and configuration - lazy loaded

Source: Core\Utils\unified_aliases.ps1

Initialize-EncodingConfig

Signature:

function Initialize-EncodingConfig {
    $env:PYTHONIOENCODING = 'utf-8'
    [System.Console]::OutputEncoding = [System.Text.UTF8Encoding]::new()
    [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
}

Source: Core\Utils\CommonUtils.ps1

Invoke-GitPull

Signature:

function Invoke-GitPull { git pull }
function Invoke-GitPush { git push }

Source: Core\Utils\unified_aliases.ps1

Invoke-GitPush

Signature:

function Invoke-GitPush { git push }
Set-Alias -Name gst -Value Get-GitStatus
Set-Alias -Name pull -Value Invoke-GitPull
Set-Alias -Name push -Value Invoke-GitPush

# Docker aliases
Set-Alias -Name d -Value docker
Set-Alias -Name dc -Value docker-compose

# Conditional aliases
$script:hasLazygit = Test-CommandExist 'lazygit'
if ($script:hasLazygit) {

Source: Core\Utils\unified_aliases.ps1

ix

Signature:

function ix ($file) {
  curl.exe -m 30 -F "f:1=@$file" ix.io
}

# Test-IsAdmin defined in CommonUtils.ps1

function Restart-BIOS {

Source: Core\Utils\unified_aliases.ps1

la_with_eza

Signature:

function la_with_eza {
    $ezaOutput = eza --icons --git --color=always --group-directories-first --all
    if ($script:hasBat) {

Description:

this should be the same as ls -al no tree

Source: Core\Utils\unified_aliases.ps1

ll

Signature:

function ll {
    Get-ChildItem | Format-Table -AutoSize -Property Mode, LastWriteTime, Length, Name
  }
  # Remove the alias if it exists to avoid circular reference
  Remove-Alias -Name ll -ErrorAction SilentlyContinue
}

# File and directory management (mkcd/New-DirectoryAndEnter defined in FileSystemUtils.ps1)
function New-File {

Source: Core\Utils\unified_aliases.ps1

ll_with_eza

Signature:

function ll_with_eza {
    $ezaOutput = eza --icons --git --color=always --group-directories-first --long --header
    if ($script:hasBat) {

Source: Core\Utils\unified_aliases.ps1

ls_with_eza

Signature:

function ls_with_eza {
    param([Parameter(ValueFromRemainingArguments = $true)]$params)

Source: Core\Utils\unified_aliases.ps1

lt_with_eza

Signature:

function lt_with_eza {
    eza --icons --git --color=always --group-directories-first --long --header --tree --sort=name
  }
  Set-Alias -Name ls -Value ls_with_eza -Force -Option AllScope -Scope Global
  Set-Alias -Name ll -Value ll_with_eza -Force -Option AllScope -Scope Global
  Set-Alias -Name la -Value la_with_eza -Force -Option AllScope -Scope Global
  Set-Alias -Name lt -Value lt_with_eza -Force -Option AllScope -Scope Global
}
else {

Source: Core\Utils\unified_aliases.ps1

New-DirectoryAndEnter

Signature:

function New-DirectoryAndEnter {
    [CmdletBinding(SupportsShouldProcess)]
    param([string]$dir)

Description:

File system utilities for PowerShell profile

Source: Core\Utils\FileSystemUtils.ps1

New-File

Signature:

function New-File {
    [CmdletBinding(SupportsShouldProcess)]
    param($file)

Description:

File and directory management (mkcd/New-DirectoryAndEnter defined in FileSystemUtils.ps1)

Source: Core\Utils\unified_aliases.ps1

Reset-ProfileState

Signature:

function Reset-ProfileState {
    [CmdletBinding(SupportsShouldProcess)]
    param(
        [switch]$Quiet
    )

Source: Core\Utils\profile_management.ps1

Restart-BIOS

Signature:

function Restart-BIOS {
    [CmdletBinding(SupportsShouldProcess)]
    param()

Description:

Test-IsAdmin defined in CommonUtils.ps1

Source: Core\Utils\unified_aliases.ps1

Search-FileContent

Signature:

function Search-FileContent {
    param(
        [Parameter(Mandatory=$true)]
        [string]$pattern,
        [string]$path = ".",
        [string]$filter = "*.*",
        [switch]$caseSensitive
    )

Source: Core\Utils\SearchUtils.ps1

Set-ClipboardContent

Signature:

function Set-ClipboardContent {
    [CmdletBinding(SupportsShouldProcess)]
    param($content)

Description:

Clipboard Utilities

Source: Core\Utils\unified_aliases.ps1

Set-EnvironmentVariable

Signature:

function Set-EnvironmentVariable {
    [CmdletBinding(SupportsShouldProcess)]
    param($name, $value)

Source: Core\Utils\unified_aliases.ps1

Stop-ProcessByName

Signature:

function Stop-ProcessByName {
    [CmdletBinding(SupportsShouldProcess)]
    param($name)

Source: Core\Utils\unified_aliases.ps1

sysinfo

Signature:

function sysinfo { Get-ComputerInfo }

# Networking Utilities
function Clear-DnsCache { Clear-DnsClientCache }

Description:

Quick Access to System Information

Source: Core\Utils\unified_aliases.ps1

tail

Signature:

function tail {
  param($Path, $n = 10)

Source: Core\Utils\unified_aliases.ps1

Test-IsAdmin

Signature:

function Test-IsAdmin {
    return ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
}

function Get-FormattedUptime {

Source: Core\Utils\CommonUtils.ps1

Upgrade

Signature:

function Upgrade {
  if (-not (Get-Command pwsh -ErrorAction SilentlyContinue)) {

Source: Core\Utils\unified_aliases.ps1

uptime

Signature:

function uptime {
  If ($PSVersionTable.PSVersion.Major -eq 5) {

Description:

System information and utilities (Get-PubIP, Get-FormattedUptime defined in CommonUtils.ps1)

Source: Core\Utils\unified_aliases.ps1

v

Signature:

function v {
  if (-not $script:EditorInitialized) { Initialize-Editor }

Description:

Lazy editor alias that initializes on first use

Source: Core\Utils\unified_aliases.ps1