Skip to content

Commit 1c4558d

Browse files
authored
docs(install): document --user flag for non-admin Windows installation (#13)
1 parent 49d60ad commit 1c4558d

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

website/src/content/docs/user-guide/commands/init.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,22 @@ Initialize dtvem on your system.
1515
```bash
1616
> dtvem init
1717
> dtvem init --yes
18+
> dtvem init --user
1819
```
1920

2021
## Flags
2122

2223
| Flag | Description |
2324
|------|-------------|
25+
| `--user` | Use User PATH instead of System PATH (Windows: no admin required) |
2426
| `--yes, -y` | Skip confirmation prompts |
2527

2628
## Behavior
2729

2830
1. Creates the dtvem directory structure
2931
2. Configures PATH to include `~/.dtvem/shims`
32+
- **Standard:** Adds to System PATH (requires admin on Windows)
33+
- **User (`--user`):** Adds to User PATH (no admin required)
3034
3. Updates shell configuration files as needed
3135

3236
## Directory Structure Created
@@ -53,7 +57,7 @@ Initialize dtvem on your system.
5357
## Examples
5458

5559
```bash
56-
# Interactive initialization
60+
# Interactive initialization (standard)
5761
> dtvem init
5862
Creating dtvem directory structure...
5963
Add ~/.dtvem/shims to PATH? [Y/n] y
@@ -67,6 +71,9 @@ Restart your terminal, then run:
6771

6872
# Non-interactive initialization
6973
> dtvem init --yes
74+
75+
# User installation (no admin required on Windows)
76+
> dtvem init --user
7077
```
7178

7279
## Post-Init Steps
@@ -77,6 +84,20 @@ After running `dtvem init`:
7784
2. **Install a runtime**`dtvem install python 3.12.0`
7885
3. **Set global version**`dtvem global python 3.12.0`
7986

87+
## Switching Install Types
88+
89+
You can switch between standard and user installation by running `dtvem init` again:
90+
91+
```powershell
92+
# Switch to user install
93+
> dtvem init --user
94+
95+
# Switch back to system install (requires admin)
96+
> dtvem init
97+
```
98+
99+
When switching, dtvem will warn about cleaning up the old PATH entry.
100+
80101
<hr class="my-8 border-primary-400" />
81102

82103
## See Also

website/src/content/docs/user-guide/getting-started.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,34 @@ Get dtvem installed and managing your runtimes in just a few minutes.
1111

1212
## Installation (Preferred)
1313

14-
**Windows (PowerShell):**
14+
### Standard Installation
15+
16+
**Windows (PowerShell as Administrator):**
1517
```powershell
1618
irm dtvem.io/install.ps1 | iex
1719
```
20+
Requires administrator privileges. Adds dtvem to System PATH for all users.
1821

1922
**macOS / Linux:**
2023
```bash
2124
curl -fsSL dtvem.io/install.sh | bash
2225
```
2326

27+
### User Installation (No Admin Required)
28+
29+
**Windows (PowerShell):**
30+
```powershell
31+
iex "& { $(irm dtvem.io/install.ps1) } -UserInstall"
32+
```
33+
Does not require administrator privileges. Adds dtvem to User PATH.
34+
35+
**macOS / Linux:**
36+
```bash
37+
curl -fsSL dtvem.io/install.sh | bash -s -- --user-install
38+
```
39+
40+
> **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.
41+
2442
### Default Locations
2543

2644
| Platform | Install Directory | Shims Directory |

0 commit comments

Comments
 (0)