Portable Toolchain Manager
Welcome to the documentation for Portable Toolchain Manager — one unified, zero-Admin PowerShell 7.x TUI and headless CLI for 38+ portable Windows developer toolchains, IDEs, SDKs, compilers, and CLI power-tools.
Core Principles
- Strictly Pure Portable
.zipArchives Only: Never downloads or runs.7z.exeSFX archives or.exe/.msiinstallers. Verifies PKZIP magic bytes (50 4B 03 04) and official SHA-256 / SHA-512 checksums. - Sleek Keyboard-Driven TUI: Built on the flicker-free PowerShell 7 TUI architecture from
windows-utilities-menu(↑/↓,1–6hotkeys,/live search,DDry-Run preview,LLog toggle). - 100% Isolated
data\Folders: Every toolchain stores configs, caches, and user tools under<InstallDir>\data\and preserves them across in-place updates. - Zero-Admin Reversible Cleanup: Strictly scoped to user directories, User
PATH, User environment variables, andHKCU.
Quick Links
Getting Started
Prerequisites
- Windows 10 / Windows 11 (
x64,arm64, orx86) - PowerShell 7.x (
pwsh.exe) inPATH:winget install Microsoft.PowerShell
Interactive TUI Mode
Double-click or run PortableToolchainManager.bat:
- Use
↑/↓or1–6to open a toolchain category. - Press
/from anywhere to filter all 38+ toolchains live. - Press
Sto view all installed portable toolchains. - Press
Dto toggle Dry-Run mode (preview download URLs, checksums, PATH, and env vars with zero writes). - Press
Enteron any toolchain to Install, Update (preservingdata\), Configure, Verify Live.zip, or Uninstall.
Headless CLI Mode
PortableToolchainManager.bat --list
PortableToolchainManager.bat --verify-zip go
PortableToolchainManager.bat --install git --dry-run
PortableToolchainManager.bat --install go --preset privacy
PortableToolchainManager.bat --update all
Configuration & Per-Toolchain Profiles
Portable Toolchain Manager uses a modular INI folder structure so global manager defaults stay minimal while every IDE, SDK, runtime, compiler, and CLI tool has its own native configuration options and opt-in profiles.
Directory Layout
config\
├── manager.ini # Core manager defaults (BaseInstallDir, DefaultArch, StrictZipOnly, Logging)
└── toolchains\
├── vscode.ini # Personal VS Code overrides ([Toolchain], [Settings], [Extensions], [Env])
├── python.ini # Personal Python overrides ([Toolchain], [Pip], [Packages], [Env])
├── nodejs.ini # Personal Node.js overrides ([Toolchain], [Npm], [Packages], [Env])
├── dotnet.ini # Personal .NET overrides ([Toolchain], [NuGet], [Tools], [Env])
├── go.ini # Personal Go overrides ([Toolchain], [GoEnv], [Tools], [Env])
├── git.ini # Personal Git overrides ([Toolchain], [GitConfig], [GitIgnore], [Env])
├── gh.ini # Personal GitHub CLI overrides ([Toolchain], [GhConfig], [Extensions], [Env])
└── <id>.ini # One modular personal config file for each of the 38 built-in toolchains
profiles\
├── <id>\*.ini # Per-toolchain opt-in native profiles (e.g. profiles\vscode\privacy.ini)
└── _bundles\*.ini # Optional multi-toolchain workstation bundles
Core Manager Settings (config\manager.ini)
| Key | Default | Description |
|---|---|---|
BaseInstallDir | D:\CLI | Default parent directory where each toolchain installs into <BaseInstallDir>\<FolderName> (overridable per tool in config\toolchains\<id>.ini). |
DefaultArch | x64 | Default Windows architecture (x64, arm64, x86). |
VerifyChecksum | true | Enforce SHA-256 / SHA-512 verification against official upstream metadata. |
StrictZipOnly | true | Strictly allow pure portable .zip archives only (blocks SFX .7z.exe & installers). |
AutoAddPath | true | Add toolchain bin directories to User PATH. |
AutoAddRegistry | true | Register only official Windows App Paths and documented official vendor HKCU keys (PEP 514 PythonCore, Node.js, GitForWindows). Never writes synthetic keys. |
AutoSetPortableEnv | true | Wire portable User environment variables into <InstallDir>\data\. |
AutoAddContextMenu | false | Optionally register HKCU Explorer right-click prompt menus. |
Merge Precedence (Personal Always Wins)
When installing or configuring toolchain <id>:
- Any
OptionalProfileslisted inconfig\toolchains\<id>.iniunder[Toolchain]are loaded fromprofiles\<id>\*.iniin order. - Any
--preset <names>passed on the CLI (or selected via TUI option[4] Apply Per-Toolchain Profile) are layered next. - Personal keys in
config\toolchains\<id>.iniare overlaid last so your personal settings always override profile defaults.
Listing & Applying Profiles
PortableToolchainManager.bat --profiles vscode
PortableToolchainManager.bat --configure vscode --preset portable-essentials,privacy,no-ai --dry-run
PortableToolchainManager.bat --install git --preset portable-essentials,privacy,git-aliases --dry-run
CLI Reference
PortableToolchainManager.bat :: Interactive TUI
PortableToolchainManager.bat --list :: List all categories & toolchains
PortableToolchainManager.bat --search <query> :: Search by ID, name, category, or tag
PortableToolchainManager.bat --status [id] :: Show installed status
PortableToolchainManager.bat --verify-zip <id> [--arch <a] :: Verify live upstream .zip & hash
PortableToolchainManager.bat --install <id> [options] :: Install portable .zip
PortableToolchainManager.bat --update <id|all> [options] :: In-place update (preserves data\)
PortableToolchainManager.bat --configure <id> [options] :: Apply config\toolchains\<id>.ini, profiles, PATH & Official HKCU Reg
PortableToolchainManager.bat --profiles [id] :: List per-toolchain opt-in profiles (profiles\<id>\*.ini)
PortableToolchainManager.bat --uninstall <id> [--registry-only] :: Cleanly remove toolchain
PortableToolchainManager.bat --export [path] :: Export installed manifest JSON
PortableToolchainManager.bat --help :: Show CLI help
Common flags: --version <v>, --arch <x64|arm64|x86>, --dir <path>, --preset <names>, --add-context-menu, --registry-only, --dry-run, --force, --no-pause, --log [path].
Troubleshooting
GitHub API Rate Limit (HTTP 403)
Unauthenticated GitHub API calls are limited to 60 requests/hour per IP. If running bulk --verify-zip or --update all, set a read-only token in GITHUB_TOKEN or GH_TOKEN for your current shell session (never commit tokens).
Non-ZIP / SFX Blocked Error
Portable Toolchain Manager intentionally blocks .7z.exe SFX archives and .exe/.msi installers. All 38 built-in toolchains resolve strictly to official pure .zip archives.
Terminal Doesn’t See New Tool After Install
Open a new terminal window so Windows picks up the broadcast WM_SETTINGCHANGE User PATH and environment updates.
Architecture
Portable Toolchain Manager combines a strict 4-layer acyclic PowerShell 7.x core with a modular pluggable toolchain catalog and a flicker-free TUI engine:
flowchart TD
TUI["Entrypoint: PortableToolchainManager.bat -> src/menu.ps1<br/>Interactive TUI (windows-utilities-menu style) & Headless CLI"]
CAT["Catalog & Lifecycle: catalog.ps1 · lifecycle.ps1 · resolvers.ps1 · config.ps1 · config-apply.ps1"]
PACKS["Pluggable Packs: src/toolchains/01..06_*.ps1 + custom/*.ps1 · config/toolchains/*.ini · profiles/<id>/*.ini"]
UTIL["Utilities: filesystem.ps1 (ZIP-Only + Zip Slip) · path.ps1 · registry.ps1 (Official HKCU Only)"]
EVT["Events: logger.ps1 · progress.ps1"]
TUI --> CAT
CAT --> PACKS
CAT --> UTIL
CAT --> EVT
UTIL --> EVT
Adding Custom Toolchains
- Drop a
.ps1pack intosrc\toolchains\custom\(seesrc\toolchains\custom\_example.disabled.ps1). Any file not starting with_and not ending with.disabled.ps1is auto-discovered bysrc\core\catalog.ps1. - Add its personal config INI at
config\toolchains\<id>.iniwith[Toolchain]overrides (InstallDir,Arch,Version,OptionalProfiles),[Env], and any applicable native config sections. - Add opt-in profiles under
profiles\<id>\*.ini— they automatically appear in--profiles <id>and TUI action[4] Apply Per-Toolchain Profile.
Required Guardrails
- Pure Portable
.zipOnly: Every toolchainResolvescriptblock MUST resolve to a pure portable.ziparchive.Assert-PortableZipAssetandTest-FileIsPkZipreject.7z.exeSFX archives and.exe/.msiinstallers automatically. - Official Registry Keys Only: Only list real executables in
AppPathExes(registered underHKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\<exe>) and only add anOfficialRegistryHookwhen the upstream vendor officially documents anHKCU\Software\<Vendor>key. Never invent synthetic registry keys.
Release Packaging
.github\workflows\release.yml packages a strict runtime allowlist into portable-toolchain-manager-<tag>.zip + .sha256:
README.txtPortableToolchainManager.batconfig\(manager.ini+toolchains\*.ini)profiles\(<id>\*.ini+_bundles\*.ini)src\
Repository Markdown (*.md), docs\, tests\, .github\, logs\, and plan.txt are audited and excluded from release archives.