From ed52b4a72b0b65872f9533158e9a5043ff2b48bd Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Tue, 27 Jan 2026 15:21:57 -0500 Subject: [PATCH] docs(install): document --user flag for non-admin Windows installation - Add user installation section to getting-started with PowerShell and bash examples - Document --user flag in init command reference - Add section for switching between install types - Include note about System vs User PATH priority on Windows Closes #11 --- .../content/docs/user-guide/commands/init.md | 23 ++++++++++++++++++- .../docs/user-guide/getting-started.md | 20 +++++++++++++++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/website/src/content/docs/user-guide/commands/init.md b/website/src/content/docs/user-guide/commands/init.md index eea2dca..d608c39 100644 --- a/website/src/content/docs/user-guide/commands/init.md +++ b/website/src/content/docs/user-guide/commands/init.md @@ -15,18 +15,22 @@ Initialize dtvem on your system. ```bash > dtvem init > dtvem init --yes +> dtvem init --user ``` ## Flags | Flag | Description | |------|-------------| +| `--user` | Use User PATH instead of System PATH (Windows: no admin required) | | `--yes, -y` | Skip confirmation prompts | ## Behavior 1. Creates the dtvem directory structure 2. Configures PATH to include `~/.dtvem/shims` + - **Standard:** Adds to System PATH (requires admin on Windows) + - **User (`--user`):** Adds to User PATH (no admin required) 3. Updates shell configuration files as needed ## Directory Structure Created @@ -53,7 +57,7 @@ Initialize dtvem on your system. ## Examples ```bash -# Interactive initialization +# Interactive initialization (standard) > dtvem init Creating dtvem directory structure... Add ~/.dtvem/shims to PATH? [Y/n] y @@ -67,6 +71,9 @@ Restart your terminal, then run: # Non-interactive initialization > dtvem init --yes + +# User installation (no admin required on Windows) +> dtvem init --user ``` ## Post-Init Steps @@ -77,6 +84,20 @@ After running `dtvem init`: 2. **Install a runtime** — `dtvem install python 3.12.0` 3. **Set global version** — `dtvem global python 3.12.0` +## Switching Install Types + +You can switch between standard and user installation by running `dtvem init` again: + +```powershell +# Switch to user install +> dtvem init --user + +# Switch back to system install (requires admin) +> dtvem init +``` + +When switching, dtvem will warn about cleaning up the old PATH entry. +
## See Also diff --git a/website/src/content/docs/user-guide/getting-started.md b/website/src/content/docs/user-guide/getting-started.md index 0b7297c..1affdf3 100644 --- a/website/src/content/docs/user-guide/getting-started.md +++ b/website/src/content/docs/user-guide/getting-started.md @@ -11,16 +11,34 @@ Get dtvem installed and managing your runtimes in just a few minutes. ## Installation (Preferred) -**Windows (PowerShell):** +### Standard Installation + +**Windows (PowerShell as Administrator):** ```powershell irm dtvem.io/install.ps1 | iex ``` +Requires administrator privileges. Adds dtvem to System PATH for all users. **macOS / Linux:** ```bash curl -fsSL dtvem.io/install.sh | bash ``` +### User Installation (No Admin Required) + +**Windows (PowerShell):** +```powershell +iex "& { $(irm dtvem.io/install.ps1) } -UserInstall" +``` +Does not require administrator privileges. Adds dtvem to User PATH. + +**macOS / Linux:** +```bash +curl -fsSL dtvem.io/install.sh | bash -s -- --user-install +``` + +> **Note:** On Windows, System PATH is evaluated before User PATH. If you have system-installed runtimes (Node.js, Python, Ruby), they will take priority over dtvem-managed versions with user installation. + ### Default Locations | Platform | Install Directory | Shims Directory |