Skip to content

Commit c739630

Browse files
committed
docs(README): add Instruction to run via uvx
1 parent 0924341 commit c739630

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,12 @@ Run `bash install-nvidia-driver.sh --help` for more information.
140140

141141
## Installation
142142

143-
**It is highly recommended to install `nvitop` in an isolated virtual environment.** Simple installation and run via [`pipx`](https://pypa.github.io/pipx):
143+
**It is highly recommended to install `nvitop` in an isolated virtual environment.** Simple installation and run via [`pipx`](https://pypa.github.io/pipx) or [`uvx`](https://docs.astral.sh/uv/guides/tools) (a.k.a. `uv tool run`):
144144

145145
```bash
146146
pipx run nvitop
147+
# or
148+
uvx nvitop
147149
```
148150

149151
You can also set this command as an alias in your shell startup file, e.g.:
@@ -164,6 +166,24 @@ New-Item -Path (Split-Path -Parent -Path $PROFILE.CurrentUserAllHosts) -ItemType
164166
'Function nvitop { pipx run nvitop @Args }' >> $PROFILE.CurrentUserAllHosts
165167
```
166168

169+
or
170+
171+
```bash
172+
# For Bash
173+
echo 'alias nvitop="uvx nvitop"' >> ~/.bashrc
174+
175+
# For Zsh
176+
echo 'alias nvitop="uvx nvitop"' >> ~/.zshrc
177+
178+
# For Fish
179+
mkdir -p ~/.config/fish
180+
echo 'alias nvitop="uvx nvitop"' >> ~/.config/fish/config.fish
181+
182+
# For PowerShell
183+
New-Item -Path (Split-Path -Parent -Path $PROFILE.CurrentUserAllHosts) -ItemType Directory -Force
184+
'Function nvitop { uvx nvitop @Args }' >> $PROFILE.CurrentUserAllHosts
185+
```
186+
167187
Install from PyPI ([![PyPI](https://img.shields.io/pypi/v/nvitop?label=pypi&logo=pypi)](https://pypi.org/project/nvitop)):
168188

169189
```bash

0 commit comments

Comments
 (0)