Opinionated, Windows only dotfiles with:
- XDG-style layout rooted at
%USERPROFILE%($HOME/.configis enforced) - Symlink-only linking with minimal, scoped elevation
- Reproducible package provisioning via a single Winget manifest
- Central PowerShell profile (shared between all tools like Visual Studio Code, PowerShell 5.x, and PowerShell 7.x)
One‑liner
irm https://raw.githubusercontent.com/adityatrivedi/windots/main/bin/bootstrap.ps1 | iexZIP (no Git needed):
$zipUrl = 'https://github.com/adityatrivedi/windots/archive/refs/heads/main.zip'
Invoke-WebRequest $zipUrl -OutFile dotfiles.zip; Expand-Archive dotfiles.zip -DestinationPath $HOME\.dotfiles -Force
$HOME\.dotfiles\bin\bootstrap.ps1 -RepoZipUrl $zipUrl -ElevateLink -Verify -QuietAlready cloned / extracted:
./bin/bootstrap.ps1 -ElevateLink -Verify -QuietShow help / options:
./bin/bootstrap.ps1 -HelpKey bootstrap flags:
-RepoZipUrl <URL>Download & extract on the fly (no Git requirement)-ElevateLinkElevate only if needed for symlink creation-VerifyRun self-test at end-QuietSuppress informational logs-WhatIf/-VerboseStandard PowerShell diagnostics where supported-Help(or-?) Show usage summary and exit
- Detects / enables Developer Mode (only that step may elevate)
- Verifies functional non-admin symlink capability (falls back to elevated link if permitted)
- Normalizes environment (sets
XDG_CONFIG_HOME, ensures consistent$HOME/.config) - Installs Winget packages from manifest (idempotent, skip if already present)
- Installs required PowerShell modules (PSReadLine, CompletionPredictor) in current user scope
- Installs Cascadia Code Nerd Font (user scope) if missing
- Creates profile stubs that dot-source the central profile
- Links repo
.config/*into$HOME/.config/*via symbolic links
- Also ensures
%USERPROFILE%\.gitconfigincludes~/.config/git/configso Git reads the XDG config
- Runs optional verification (
self-test.ps1) if-Verify - Provides audit tooling to detect drift later (
audit.ps1)
| Path / Script | Purpose |
|---|---|
bin/bootstrap.ps1 |
Orchestrates full setup; supports -ElevateLink -Verify -Quiet. |
bin/install.ps1 |
Package installation from Winget manifest. |
bin/modules.ps1 |
Ensures required PS modules (current-user scope). |
bin/fonts.ps1 |
Cascadia Code Nerd Font installer (idempotent). |
bin/link.ps1 |
Creates symlinks for all .config entries. |
bin/profile-setup.ps1 |
Installs PowerShell profile stubs. |
bin/self-test.ps1 |
Post-setup validation (symlink, packages, font, modules, profile). |
bin/audit.ps1 |
Drift detection vs. manifest (JSON or table output). |
bin/sync.ps1 |
Re-downloads fresh ZIP & relinks (lightweight update). |
bin/revert.ps1 |
Selective or full cleanup (-All, supports -WhatIf). |
bin/_common.ps1 |
Shared logging & helpers. |
packages/windows-winget.json |
Canonical package ID list. |
.config/ |
Tool configuration directory (XDG-style). |
Package manifest format supports both simple and extended entries:
[
{ "id": "PackageName" },
{ "id": "PackageName2", "scope": "machine" }
]- Default scope is
user(no elevation required) - Specify
"scope": "machine"for packages that require machine-level installation - Edit windows-winget.json to add/remove packages
- Run
./bin/install.ps1to install new packages - Run
./bin/audit.ps1to verify current state
Self-test highlights environment readiness. Audit focuses on package drift.
Audit outputs table or JSON (-Json) and exit codes:
0OK1Drift / missing packages2Manifest or internal error
Examples:
./bin/self-test.ps1
./bin/audit.ps1
./bin/audit.ps1 -Json | Out-File audit.jsonDry run everything:
.\bin\revert.ps1 -All -WhatIfActual cleanup:
.\bin\revert.ps1 -AllSelective (links + fonts only):
.\bin\revert.ps1 -RemoveLinks -RemoveFontsCentral profile lives under .config\powershell\profile.ps1 and initializes:
- Environment:
XDG_CONFIG_HOME,EDITOR,PAGER - Utility binaries: starship, zoxide, eza, bat (if present)
- Prompt & completions: Starship, PSReadLine, prediction source
- Safe module import wrapper & profile reload helper
Profile stubs (Documents profiles) simply dot-source this central file and are removed by revert.ps1.
Add config: place under .config\<tool> → rerun .\bin\link.ps1 -Force.
Add package: modify manifest → run .\bin\install.ps1 → verify with .\bin\audit.ps1.
Add initialization logic: extend central profile with guarded Initialize-* functions (keep vendor init isolated & optional).
See LICENSE for full text.