Collection of useful PowerShell 7 scripts, shortcuts and CLI tools for productivity and terminal enhancements.
Get-FileCountfor file counters by extensionGet-LineCountfor line counters by extensionGet-CodeStatsfor combined file and line summariesShow-ColorTreefor colorful directory tree output- Handy legacy aliases like
file-counter,tree-color,la,..,home, andrepos
PowerShellCliTools/
├── PowerShellCliTools.psd1
├── PowerShellCliTools.psm1
├── Public/
└── Private/
Public commands live in Public, while shared helpers stay in Private. This keeps the module easier to extend without growing one large script file.
git clone https://github.com/lkhorasandzhian/powershell-cli-tools
cd powershell-cli-tools
.\install.ps1The installer copies the module to your PowerShell modules directory and adds an Import-Module line to your PowerShell profile.
Run the install script:
.\install.ps1This will:
- Copy the module to your PowerShell modules directory
- Automatically update your
$PROFILEby adding anImport-Modulecall - Enable tools on every PowerShell startup
You can import the local module directly while working on it:
Import-Module .\PowerShellCliTools\PowerShellCliTools.psd1 -Force
Get-Command -Module PowerShellCliToolsThe module exports PowerShell-style command names and keeps the old shorter names as aliases for convenience.
Run the install script:
.\install.ps1If you find this useful, consider giving it a star ❤️ — it really helps the project grow and keeps me motivated to add more tools! More tools and improvements are coming.
powershell-cli-tools/
├── .github/
│ ├── cover/
│ │ └── powershell-cli-tools_preview.png
│ ├── workflows/
│ │ ├── manual-tests.yml
│ │ └── powershell.yml
│ └── self-approval.yml
├── PowerShellCliTools/
│ ├── Private/
│ │ ├── Get-ExtensionColor.ps1
│ │ ├── Get-ProjectFiles.ps1
│ │ ├── Show-TreeNode.ps1
│ │ └── Write-ColoredFile.ps1
│ ├── Public/
│ │ ├── Get-CodeStats.ps1
│ │ ├── Get-FileCount.ps1
│ │ ├── Get-LineCount.ps1
│ │ └── Show-ColorTree.ps1
│ ├── PowerShellCliTools.psd1
│ └── PowerShellCliTools.psm1
├── test/
│ └── 01/
│ ├── tree-color-test/
│ └── create-tree-test.ps1
├── tests/
│ └── PowerShellCliTools.Tests.ps1
├── .gitattributes
├── install.ps1
├── LICENSE
└── README.mdTest cases are located in the tests/ directory.
They are used to verify that the module imports correctly and that the expected commands and aliases are available.
Invoke-Pester .\tests