https://github.com/makarasty/win-cli-linker
Simple CLI tool manager for Windows. Uses batch shims to link executables from various locations to a single directory in PATH
https://github.com/makarasty/win-cli-linker
cli developer-tool path-manager powershell productivity windows
Last synced: 24 days ago
JSON representation
Simple CLI tool manager for Windows. Uses batch shims to link executables from various locations to a single directory in PATH
- Host: GitHub
- URL: https://github.com/makarasty/win-cli-linker
- Owner: makarasty
- License: mit
- Created: 2026-01-11T11:54:58.000Z (28 days ago)
- Default Branch: main
- Last Pushed: 2026-01-11T11:56:48.000Z (28 days ago)
- Last Synced: 2026-01-11T16:06:47.062Z (28 days ago)
- Topics: cli, developer-tool, path-manager, powershell, productivity, windows
- Language: PowerShell
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Win CLI Linker
A lightweight PowerShell script to manage portable CLI tools on Windows without cluttering your System `PATH` variable.
## ⚠️ The Problem
If you use many portable tools (like `ffmpeg`, `ngrok`, `aria2`, `scrcpy`), you typically have two bad options:
1. **Cluttering PATH:** Adding 10+ different folders to your System Environment Variables.
2. **Duplicating files:** Copying all `.exe` files into a single `C:\bin` folder (which breaks updates and dll dependencies).
## ✅ The Solution
**Win CLI Linker** allows you to keep your tools organized in their original folders (e.g., on a secondary drive `D:\Tools\...`).
It automatically generates small `.bat` **shims** (wrappers) in a single directory (e.g., `C:\P`). You only need to add this **one directory** to your `PATH`.
## Features
* **Zero Dependencies:** Just a single PowerShell script.
* **Clean PATH:** Only one entry in your environment variables.
* **Argument Passing:** Correctly passes all arguments (e.g., `ffmpeg -i ...`) to the target executable.
* **Environment Variables:** Supports paths like `%USERPROFILE%\Downloads\...`.
## Installation & Usage
### 1. Setup the Directory
1. Choose a folder for your shims (Default is `C:\P`).
2. **Add this folder to your Windows PATH environment variable.**
* *Search "Edit the system environment variables" -> "Environment Variables" -> Select "Path" -> "Edit" -> "New" -> Add `C:\P`.*
### 2. Configure the Script
Open `update-shims.ps1` and edit the configuration section. Add your tools to the `$Tools` list:
```powershell
$ShimDir = "C:\P"
$Tools = @{
# "CommandName" = "Path\To\Original\Executable.exe"
"ngrok" = "D:\tools\ngrok.exe"
"ffmpeg" = "D:\tools\ffmpeg\bin\ffmpeg.exe"
"ffprobe" = "D:\tools\ffmpeg\bin\ffprobe.exe"
"my-tool" = "%USERPROFILE%\Downloads\tool.exe"
}
```
### 3. Run
Double-click `update-shims.ps1`.
It will create (or update) the `.bat` files in your shim directory.
```text
[OK] ngrok
[OK] ffmpeg
[OK] ffprobe
Done. Press Enter to exit...
```
Now you can open any terminal (CMD, PowerShell, Git Bash) and type `ffmpeg` or `ngrok` from anywhere.
## License
MIT License. Feel free to use and modify.