Crates.io | rtx-cli |
lib.rs | rtx-cli |
version | 2024.0.0 |
source | src |
created_at | 2023-01-15 04:51:12.968259 |
updated_at | 2023-12-31 21:37:36.584118 |
description | Polyglot runtime manager (asdf rust clone) |
homepage | https://rtx.jdx.dev |
repository | https://github.com/jdx/rtx |
max_upload_size | |
id | 759213 |
size | 1,039,196 |
The following shows using rtx to install different versions
of node.
Note that calling which node
gives us a real path to node, not a shim.
Install rtx on macOS (other methods here):
$ curl https://rtx.jdx.dev/install.sh | sh
$ ~/.local/share/rtx/bin/rtx --version
rtx 2024.0.0
Hook rtx into your shell (pick the right one for your shell):
# note this assumes rtx is located at ~/.local/share/rtx/bin/rtx
# which is what install.sh does by default
echo 'eval "$(~/.local/share/rtx/bin/rtx activate bash)"' >> ~/.bashrc
echo 'eval "$(~/.local/share/rtx/bin/rtx activate zsh)"' >> ~/.zshrc
echo '~/.local/share/rtx/bin/rtx activate fish | source' >> ~/.config/fish/config.fish
Install a runtime and set it as the global default:
$ rtx use --global node@20
$ node -v
v20.0.0
See rtx.jdx.dev.