GithubHelp home page GithubHelp logo

jdx / mise Goto Github PK

View Code? Open in Web Editor NEW
7.5K 7.5K 200.0 13.42 MB

dev tools, env vars, task runner

Home Page: https://mise.jdx.dev

License: MIT License

Shell 8.72% Ruby 0.08% Dockerfile 0.33% Rust 90.44% Nix 0.24% JavaScript 0.14% PowerShell 0.06%

mise's Introduction

Crates.io GitHub GitHub Workflow Status Codacy coverage (branch) Discord

The front-end to your dev env. (formerly called "rtx")

What is it?

30 Second Demo

The following shows using mise to install different versions of node. Note that calling which node gives us a real path to node, not a shim.

demo

Quickstart

Install mise (other methods here):

$ curl https://mise.run | sh
$ ~/.local/bin/mise --version
mise 2024.6.1

or install a specific a version:

$ curl https://mise.run | MISE_VERSION=v2024.5.16 sh
$ ~/.local/bin/mise --version
mise 2024.6.1

Hook mise into your shell (pick the right one for your shell):

# note this assumes mise is located at ~/.local/bin/mise
# which is what https://mise.run does by default
echo 'eval "$(~/.local/bin/mise activate bash)"' >> ~/.bashrc
echo 'eval "$(~/.local/bin/mise activate zsh)"' >> ~/.zshrc
echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish

Install a runtime and set it as the global default:

$ mise use --global node@20
$ node -v
v20.0.0

Full Documentation

See mise.jdx.dev

mise's People

Contributors

ajpantuso avatar dependabot[bot] avatar dex4er avatar dfang avatar elementalvoid avatar gilesw avatar hickey avatar jdx avatar johnhamelink avatar johnlayton avatar joschi avatar jtakakura avatar jthegedus avatar looztra avatar mise-en-dev avatar neohsu avatar nikolay avatar nlamirault avatar particledecay avatar pbr0ck3r avatar pdemagny avatar renovate[bot] avatar roele avatar salasrod avatar scop avatar skyzyx avatar smorimoto avatar stratus3d avatar vic avatar younke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mise's Issues

rtxstatusln should output to stdout instead of stderr?

Was chasing some weird bug in my added xonsh support module and realized that rtxstatusln prints non-quiet messages like rtx: [email protected] to stderr instead of stdout, and I had a condition that if you hook-env command has an error in a captured subprocess, then the stdout shouldn't be passed to the shell for execution.

Is there a reason why status messages are printed as errors?

https://github.com/jdxcode/rtx/blob/f0dc795c84ef20b6ba042fa77cef6adc3a79a129/src/cli/hook_env.rs#L84-L85

https://github.com/jdxcode/rtx/blob/f0dc795c84ef20b6ba042fa77cef6adc3a79a129/src/output.rs#L94-L95

Ruby plugin adds file that attempts to reshim - Error if asdf is not installed

The Ruby plugin tries to reshim on each gem install.

https://github.com/asdf-vm/asdf-ruby/blob/master/rubygems-plugin/rubygems_plugin.rb

Leading to this error:

ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - asdf
        ~/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:15:in ``'
        ~/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:15:in `block (2 levels) in <top (required)>'
        ~/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:14:in `each'
        ~/.local/share/rtx/plugins/ruby/rubygems-plugin/rubygems_plugin.rb:14:in `block in <top (required)>'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/installer.rb:381:in `block in run_post_install_hooks'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/installer.rb:380:in `each'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/installer.rb:380:in `run_post_install_hooks'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/installer.rb:345:in `install'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/resolver/specification.rb:104:in `install'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/request_set.rb:194:in `block in install'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/request_set.rb:182:in `each'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/request_set.rb:182:in `install'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/commands/install_command.rb:214:in `install_gem'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/commands/install_command.rb:230:in `block in install_gems'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/commands/install_command.rb:223:in `each'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/commands/install_command.rb:223:in `install_gems'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/commands/install_command.rb:169:in `execute'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/command.rb:323:in `invoke_with_build_args'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/command_manager.rb:185:in `process_args'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/command_manager.rb:149:in `run'
        ~/.local/share/rtx/installs/ruby/3.2.0/lib/ruby/3.2.0/rubygems/gem_runner.rb:51:in `run'

I "fixed" the problem by deleting the rubygems_plugin.rb file entirely. But I'm curious if it'd be possible to have an alias for asdf that no-ops these functions.

Apologies if this is a duplicate, I looked around and didn't see anything related exactly to this.

Rust install doesn't perform a complete installation

I'm trying to convert from asdf to rtx on my QNAP NAS, and I noticed that doing rtx global [email protected] and then source "$HOME/.local/share/rtx/installs/rust/1.58.1/env" doesn't result in a working rust install. I still needed to perform rustup default 1.58.1 (would be easier to script if there was an rtxcommand that returns the currently configured rust version).

Is this known? I don't recall having to call rustup with asdf.

Fails to install hadolint package

I have hadolint v2.10.0 on my ~/.tool-versions file. When I run rtx install it stops midway due to:

rtx: Installing runtime: [email protected]
* Downloading hadolint release v2.10.0...
curl: (22) The requested URL returned error: 404
asdf-hadolint: Could not download https://github.com/hadolint/hadolint/releases/download/vv2.10.0/hadolint-Darwin-x86_64
rtx: error command ["/Users/pedropombeiro/.local/share/rtx/plugins/hadolint/bin/download"] exited with code 1
rtx: Run with RTX_DEBUG=1 for more information.

It looks like it doesn't like the v prefix in the version, but asdf wants it. It would be nice to have this working so that it is possible to run asdf and rtx on the same project (different team members can have different preferences).

create bootstrap guide for direnv setup

direnv has 2 commands source_url and fetchurl. I haven't used these before but they will download files from the internet if you match them to a sha in your envrc config.

I haven't fully thought out how this would work, but I have an idea that we could make the direnv setup not involve installing rtx first. You could just copy a snippet into ~/.config/direnv/lib/use_rtx.sh that is capable of fetching rtx if it doesn't exist. It would probably need to fetch assets from github releases, or maybe we can put them on rtx.jdxcode.com.

Missing asdf lib required by some plugins

Tried to install java but which failed with

rtx: Installing runtime: java@latest
/Users/neeraj/.local/share/rtx/plugins/java/bin/install: line 3: /Users/neeraj/.asdf/lib/utils.bash: No such file or directory
Unknown release: latest
rtx: error command ["/Users/neeraj/.local/share/rtx/plugins/java/bin/install"] exited with code 1
rtx: Run with RTX_DEBUG=1 for more information.

This seems like some plugin need https://github.com/asdf-vm/asdf/tree/master/lib, Should I install asdf also to make it work.

Cat rtx setup these files automatically on first install?

Regex error parsing Ruby Gemfile

Given a ~/.config/rtx/config.toml like this:

legacy_version_file=true

And a Gemfile like this:

# frozen_string_literal: true

ruby "3.0.5"

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

And no .tool-versions or .ruby-version file.

When I cd into the directory with the Gemfile, or when I run rtx ls in that directory I get an error like this:

$ rtx ls

Error: 
   0: regex parse error:
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1: ^\s*# frozen_string_literal: true
      2: 
      3: ruby "3.0.5"
      4: 
      5: source "https://rubygems.org"
      6: git_source(:github) { |repo| "https://github.com/#{repo}.git" }
                               ^
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      error: repetition quantifier expects a valid decimal

Location:
   src/plugins.rs:196

Which is from this line:
https://github.com/jdxcode/rtx/blob/bf15c1dcaaa3ddc5b4d8addd5d7ec4786ca60ccd/src/plugins.rs#L196

Perhaps something to do with asdf-ruby handling of Gemfile files?
https://github.com/asdf-vm/asdf-ruby/blob/13b395f9610b322a226abdc7167d56f9581a8fa4/bin/parse-legacy-file#L7

`rtx install --parallel`

I think this speaks for itself, we should be able to install runtimes (maybe plugins too, but that's less important since they're not that slow).

I'm not sure how well this would work, or how much it would improve performance since most builds will be parallel anyways, but I think we should offer this as an option. The tricky part here is that we'll probably need to not show spinners on each runtime install, but one spinner for all of them. Ideally it should get updated when each runtime is done installing.

`--log-level`

this flag exists in the codebase but doesn't work and is hidden. Fixing it is kind of tricky due to the order of initialization. If someone is more familiar with rust than me I could use some help with this.

The problem is that in main.rs I call logger::init(log_Level)which is way before the CLI parses the commands. I need to do that because CLI parsing does logging and otherwise no logs would be displayed then.

If there is a way to modify the logger with a new level, I think that might be sufficient. Or maybe we do 2 passes on CLI parsing? Once to check for --log-level and again for running the command?

Setting of asdf-plugin environment variables inconsistent

I tested the environment variables a bit more using rtx 1.2.6 and found some unexpected behavior while using them.

Using eval "$(rtx activate -s zsh)" in a new zsh session (no direnv):

  1. All environment variables unset/empty, when switching to a new directory without .tool-versions
# initially all environment variables are set as expectedecho $RUBYLIB
/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin
❯ echo $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-17.0.5+8

# Issue: All environment variables unset/empty, when switching to a new directory
# Expected: All environment variables have the same value as above
# `~/dev` doesn't contain a .tool-versions filecd ~/dev
❯ echo $RUBYLIBecho $JAVA_HOMEecho $GOROOT
  1. RUBYLIB unset in directory containing a local .tool-versions file -> This might be no real issues with rtx, as RUBYLIB seems to contain only a file needed for asdf related reshimming, when installing a rubygem file with an executable. But perhaps it is still relevant to understand the behavior.
# initially all environment variables are set as expectedecho $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-17.0.5+8
❯ echo $RUBYLIB
/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin

# switching directorycd ~/dev/tmp/rtx-env-variables
❯ cat .tool-versions
java temurin-11.0.15+10
golang 1.18.1
ruby 3.0.5

# all environment variables besides RUBYLIB set to new values. RUBYLIB is unset. Not sure, if this is on purpose the same in asdf.
# Expected: RUBYLIB still set (?)echo $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.18.10/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-11.0.15+10
❯ echo $RUBYLIB

# again, when traversing to a subdirectory all environment variables are unset. But this time RUBYLIB is unexpectedly set now
# Expected: All environment variables set to the values of nearest local .tool-versions

❯ mkdir testcd testecho $GOROOTecho $JAVA_HOMEecho $RUBYLIB
/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin

# for completeness, the value when switching back to the previous directorycd ..
❯ echo $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.18.10/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-11.0.15+10
❯ echo $RUBYLIB

Using eval "$(rtx env -s zsh)" in a new zsh session in combination with use rtx in direnv:

  1. GOROOT not updated and RUBYLIB concatenated to incorrect value
# initially all environment variables are set as expectedecho $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-17.0.5+8
❯ echo $RUBYLIB
/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin

# switching to a project folder managed by direnvcd ~/dev/tmp/rtx-env-variables-direnv
direnv: loading ~/Projects/tmp/rtx-env-variables-direnv/.envrc
direnv: using rtx
direnv: export ~JAVA_HOME ~PATH ~RUBYLIB

# Expected: GOROOT set to 1.18.1 and not unchanged
# Is set correctly for JAVA_HOMEecho $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go
❯ echo $JAVA_HOME
/Users/user/.local/share/rtx/installs/java/temurin-11.0.15+10

# Expected: RUBYLIB value set to `/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin` and not concatenatedecho $RUBYLIB
/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin:/Users/user/.local/share/rtx/plugins/ruby/rubygems-plugin

# folder setup

❯ cat .envrc
use rtx

❯ cat .tool-versions
java temurin-11.0.15+10
golang 1.18.1
ruby 3.0.5

❯ rtx local
java temurin-11.0.15+10
golang 1.18.1
ruby 3.0.5
❯ go version
go version go1.18.10 darwin/arm64
❯ java --version
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
❯ ruby --version
ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [arm64-darwin22]

When exactly should rtx be hooked into in a shell

upd: the docs mean on every prompt redraw, not shell launch, and fish implementation is consistent with that (it has some extra hooks to account for the arrow-cd functionality that doesn't redraw the prompt, but still doesn't refresh on every command)

I've updated rtx to work with this great Python-powered, cross-platform, Unix-gazing shell https://github.com/xonsh/xonsh (will send a PR eventually) and when converting the hook functions noticed differences between fish/bash, and then got a bit confused, so need some clarification

Your Readme suggests that there should only be two hook events

  • on shell launch (makes sense, before any cd you still need to check the cwd)
  • on cd (makes sense, every new cwd can have a different environment)

rtx installs as a shell extension (e.g. rtx activate -s zsh) that sets the PATH environment variable to point your shell to the correct runtime binaries. When you cd into a directory containing a .tool-versions file, rtx will automatically activate the correct versions.
Every time your prompt starts it will call rtx hook-env to fetch new environment variables. This should be very fast and it exits early if the the directory wasn't changed or the .tool-version files haven't been updated. On my machine this takes 1-2ms even if it doesn't exit early.

But then zsh has two hooks in activate functions

  • chpwd_functions on cd
  • precmd_functions before every command
  • no 3rd hook on shell launch, but I guess you don't need to do anything on shell launch if you don't execute any commands?

Bash has one in an activate function

  • if ! [[ "${PROMPT_COMMAND:-}" =~ _rtx_hook ]] on every command?
  • also no hook on launch?

Fish is a bit more complicated

  • fish_prompt on every prompt, but within and then an extra check for cd depending on user config
  • fish_preexec before every command, but also depends on user config
    The hook on launch comes from fish_prompt, I guess

Xonsh allows more granularity than the shells above (before/after prompt, before/after command, on cd), so I'm just trying to understand what the minimum viable set of hooks should be

So a few questions:

  • why do you need to hook every single command execution, is cd+launch from the Readme not enough?
  • why do you need any hooks on cd if you already hook into every command?
  • why do you need to update on every prompt (fish) even after launch without any commands/cd (so I guess every hit of Enter on an emtpy line updates?)

Thanks for any clarification!

`rtx cache clear`

We should have a single command to blow away the cache for everything in rtx.

I believe this is simply a matter of running effectively:

$ rm ~/.local/share/rtx/installs/*/.rtxconf.msgpack
$ rm ~/.local/share/rtx/plugins/*/.rtxcache.msgpack.gz

And maybe we can throw the shorthand repo in there for good measure:

$ rm -rf ~/.local/share/rtx/repository

Look at https://github.com/jdxcode/rtx/blob/62d3afbe5cbcbed877930ece88cac6b37ff96c0e/src/dirs.rs for how to get these directories.

Output tweaks/colors

This is just a collection of minor UI things that I want to tweak. If you would like to contribute these are pretty easy tasks I think:

  • add color to global error output
$ rtx ...
rtx [error]: ...
  • use the same output as ^^ for trace!, debug!, warn!, etc
  • dim the rtx: before general output:
$ rtx install plugin foo
rtx: 
  • rtx: should be shown after all output, this should probably be a helper or macro somewhere. Ideally in output.rs I think.
  • Add a spinner for plugin install
  • Add a spinner for runtime install

I'll add to this as I notice more things I'd like to modify.

Reach out to me on discord if you want to help out with this and I can give more guidance.

move commands out of README and into their own files

we should have a structure like this for the command help:

  • README.md
  • docs/
    • commands.md # command index
    • commands/
      • activate.md
      • exec.md
      • ...
      • plugins/
        • install.md
        • list.md
        • ...

This is a relatively easy change, the code is all in src/cli/render_help.rs. The hardest part is going to be that currently that command outputs text. I think that has to change and it will need to write the files directly. This means the pre-commit hook in ./justfile will also need to be updated slightly.

alias management commands

I've implemented commands for CRUD operations on settings as rtx settings *, we need the same for aliases:

$ rtx aliases
$ rtx aliases set "nodejs.lts/hydrogen" 18.0.0
$ rtx aliases get "nodejs.lts/hydrogen"

This is a great issue for someone that wants to contribute to the project since it'll be fairly straightforward how to do this. You can copy most of src/cli/settings/* to get started.

`rtx ls` not replacing HOME with ~ correctly

This is just a cosmetic bug. See rtx ls:

-> shfmt latest             (set by /local~/.tool-versions)

I think this is happening because it's basically /local/$HOME/.tool-versions. This should probably just show the full path unless the path starts with HOME.

`rtx where` is broken

rtx where should show the current install path but it's showing the latest:

$ rtx install python [email protected]
$ rtx local [email protected]
$ rtx where python
/Users/jdx/.local/share/rtx/installs/python/3.11.1
# should be:
/Users/jdx/.local/share/rtx/installs/python/3.10.x

asdf-java incompatibilities

There seems to be 2 (non-critical?) errors thrown with the Java plugin when installing a new Java version:

❯ rtx install [email protected]
rtx: Installing runtime: [email protected]
/Users/blopker/.local/share/rtx/plugins/java/bin/install: line 3: /Users/blopker/.asdf/lib/utils.bash: No such file or directory
######################################################################################################## 100.0%
openjdk-19.0.2_macos-aarch64_bin.tar.gz
openjdk-19.0.2_macos-aarch64_bin.tar.gz: OK
/Users/blopker/.local/share/rtx/plugins/java/bin/install: line 139: get_asdf_config_value: command not found

It seems to install fine though, not sure if it's worth investigating.

Also, rtx install java does not work. Not sure if it should though.

Check if rtx bin path is already on PATH when calling rtx activate

When eval "$(rtx activate -s zsh)" is run on shell loading, the directory of the rtx binary is added to the front of PATH.
Although the directory is already on the path. Therefore overwriting my custom PATH order.

Fix:

rtx checks, if the bin path is already in PATH and only updates the PATH when needed.

Reproduce:

.zshrc

echo $PATH
eval "$(rtx activate -s zsh)"
echo $PATH

start new terminal shell:

/Users/user/bin:/Users/user/.local/bin:/Users/user/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

# /opt/homebrew/bin: added although already on the PATH, overriding the custom order

/opt/homebrew/bin:/Users/user/bin:/Users/user/.local/bin:/Users/user/.cargo/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

warn if version not installed

If I have a version in my .tool-versions file that isn't installed, it should warn me by default:

$ echo 'ruby 3.1' > .tool-versions # ruby 3.1 is not currently installed, but some other ruby version is, show a warning in `hook-env`

There is some kind of bug that's having it use the last version of ruby from a previous tool-versions file. This has been fixed.

change behavior of `rtx local/global golang`

Currently if you run rtx local golang it will be the same as running rtx local golang@latest. I think this is wrong. rtx local golang should return the current value in .tool-versions. If you put the @ and a version, then it should set the version.

$ rtx local nodejs@20
nodejs 20.0.0
$ rtx local nodejs
20.0.0
$ rtx global nodejs@18
nodejs 18.0.0
$ rtx global nodejs
18.0.0

At least I think so. I'm still questioning this one.

`rtx env` should default to bash

Related to #71

The automatic shell detection that uses the SHELL environment variable is far from reliable. However, because the output in rtx env is identical for bash/zsh, the only time it would be different is for fish. Even then, the syntax is likely compatible since you can do export FOO=bar in fish (it's just not idiomatic). I think it's safe in this case for us to default the shell to bash unless it is specified with --shell or can be detected via SHELL.

e.g.:

$ rtx env -s fish # fish
$ SHELL=/bin/fish rtx env # fish
$ SHELL= rtx env # bash

Currently it errors out in the final case.

rtx activate/deactivate should continue to error out if the shell isn't specified. They behave differently because they're very infrequently run directly (they just go into the rc file) and also because the syntax between zsh and bash is different.

PATH update behavior by rtx hooks

I created this as a separate issue, as this might be working as expected, be a more complex discussion, or a complicated change.
I look here especially at PATH, but it might be similar for other environment variables set by plugins.
For this example, I use eval "$(rtx activate -s zsh)" without direnv.

Issue: A manually customized PATH will be overwritten, when switching directories.
Expected: Only updated the PATH if necessary and in a "expected way".

Current behavior:

echo $PATH
/Users/user/.local/share/rtx/installs/python/3.10.9/bin:...
❯ export PATH="$HOME/bin:${PATH}"echo $PATH
/Users/user/bin:/Users/user/.local/share/rtx/installs/python/3.10.9/bin:...

# switch to a directory not containing a local .tool-versions configcd dev

# expected: no change of PATH
# but customized PATH is overwritten and my custom added PATH value goneecho $PATH
/Users/user/.local/share/rtx/installs/python/3.10.9/bin:...

"Expected" behavior:

  1. zsh load -> add global tool version bin paths to PATH
    1. on directory change, new directory has no local .tool-versions: instead of an overwrite (as is done today?), don't update/set PATH
      1. would fix a custom extended PATH being overwritten by rtx
    2. on directory change, new directory has local .tool-versions: "in place" update of rtx bin paths as needed according to local .tool-versions
      1. "in-place" update would allow keeping custom changes and order of PATH

I don't know, if this "expected" behavior is just my personal preference or expected by a majority of users. I can also not tell, if this is possible with rtx or if it would require using shims. Something you wanted to avoid with rtx.

For me, a valid alternative way forward, is probably to not use eval "$(rtx activate -s zsh)", but direnv in combination with an initial global PATH setup via eval "$(rtx env -s zsh)".

But wanted to mention this and open it for comments.

Docs mention [alias.nodejs], but needs to be [aliases.nodejs]

This is probably just an WIP issue. Just wanted to mention it, in case someone else wonders as I did.

Instead of using [alias.nodejs] as documented in the README.md:

[alias.nodejs]
my_custom_node = '18'  # makes `rtx install nodejs@my_custom_node` install node-18.x

it must be [aliases.nodejs]

[aliases.nodejs]
my_custom_node = '18'  # makes `rtx install nodejs@my_custom_node` install node-18.x

Not sure, what the final idea is. Using [alias.nodejs] and updating the code or using [aliases.nodejs] and updating the README.

Feature request: upgrade and/or clean support

I install multiple major latest version of a tool, e.g. erlang@25, erlang@24 and erlang@23 (standard in the Erlang ecosystem is to support the three latest major versions). It's easy to automate upgrading to the latest major versions using rtx:

$ alias upgrade_erlang='rtx install erlang@25 erlang@24 erlang@23'

There are two downsides to this approach:

  1. The alias has to be updated whenever a new major version is released
  2. It leaves the old versions lying around

The following are some suggestions for syntax and commands:

To solve (1) it would be nice with some support to install previous major versions.

$ rtx install erlang@latest erlang@-1 erlang@-2
...would install the latest erlang and the two previous major versions

A clean command of sorts would also be useful to solve (2). The command would uninstall all older versions than the latest major versions. An example (again, only a suggestion):

$ rtx list
  -> python     3.11.0 (set by ~/.tool-versions)
     python     3.10.0
     python     2.7.18
     python     2.7.14
     python     2.7.10
$ rtx clean python
...would uninstall python 3.10.0, 2.7.14 and 2.7.10
$ rtx list
  -> python     3.11.0 (set by ~/.tool-versions)
     python     2.7.18

Apologies if this is outside the scope of rtx or has already been suggested or solved (if so, please let me know!).

bake shorthand repo into rtx codebase

rtx clones the shorthand repo around the first time it launches, then there is a fair amount of code in place to keep it up to date. It's not super complex but I think we could remove it and just hardcode all of this data somehow. I wrote a shell script with gh to fetch the github stargazer count of the entire database, it's not big at all.

I'm thinking this could just go into a rust file. Maybe as a dependency so it doesn't need to get recompiled all the time.

687	nodejs	 https://github.com/asdf-vm/asdf-nodejs.git
506	ruby	 https://github.com/asdf-vm/asdf-ruby.git
470	python	 https://github.com/danhper/asdf-python.git
395	direnv	 https://github.com/asdf-community/asdf-direnv.git
353	elixir	 https://github.com/asdf-vm/asdf-elixir.git
351	erlang	 https://github.com/asdf-vm/asdf-erlang.git
322	golang	 https://github.com/kennyp/asdf-golang.git
285	java	 https://github.com/halcyon/asdf-java.git
169	waypoint	 https://github.com/asdf-community/asdf-hashicorp.git
169	vault	 https://github.com/asdf-community/asdf-hashicorp.git
169	tfc-agent	 https://github.com/asdf-community/asdf-hashicorp.git
169	terraform-ls	 https://github.com/asdf-community/asdf-hashicorp.git
169	terraform	 https://github.com/asdf-community/asdf-hashicorp.git
169	serf	 https://github.com/asdf-community/asdf-hashicorp.git
169	sentinel	 https://github.com/asdf-community/asdf-hashicorp.git
169	packer	 https://github.com/asdf-community/asdf-hashicorp.git
169	nomad	 https://github.com/asdf-community/asdf-hashicorp.git
169	levant	 https://github.com/asdf-community/asdf-hashicorp.git
169	consul	 https://github.com/asdf-community/asdf-hashicorp.git
169	boundary	 https://github.com/asdf-community/asdf-hashicorp.git
160	php	 https://github.com/asdf-community/asdf-php.git
147	postgres	 https://github.com/smashedtoatoms/asdf-postgres.git
117	rust	 https://github.com/code-lever/asdf-rust.git
113	yarn	 https://github.com/twuni/asdf-yarn.git
102	deno	 https://github.com/asdf-community/asdf-deno.git
93	kubectl	 https://github.com/asdf-community/asdf-kubectl.git
82	action-validator	 https://github.com/mpalmer/action-validator.git
75	dotnet-core	 https://github.com/emersonsoares/asdf-dotnet-core.git
73	flutter	 https://github.com/oae/asdf-flutter.git
68	crystal	 https://github.com/asdf-community/asdf-crystal.git
49	neovim	 https://github.com/richin13/asdf-neovim.git
47	poetry	 https://github.com/asdf-community/asdf-poetry.git
46	haskell	 https://github.com/asdf-community/asdf-haskell.git
42	link	 https://github.com/asdf-community/asdf-link.git
38	lua	 https://github.com/Stratus3D/asdf-lua.git
38	bun	 https://github.com/cometkim/asdf-bun.git
35	redis	 https://github.com/smashedtoatoms/asdf-redis.git
35	gcloud	 https://github.com/jthegedus/asdf-gcloud.git
34	helm	 https://github.com/Antiarchitect/asdf-helm.git
33	gleam	 https://github.com/vic/asdf-gleam.git
32	awscli	 https://github.com/MetricMike/asdf-awscli.git
30	dart	 https://github.com/PatOConnor43/asdf-dart.git
28	conan	 https://github.com/amrox/asdf-pyapp.git
28	awsebcli	 https://github.com/amrox/asdf-pyapp.git
28	aws-sam-cli	 https://github.com/amrox/asdf-pyapp.git
28	ansible-base	 https://github.com/amrox/asdf-pyapp.git
27	kotlin	 https://github.com/asdf-community/asdf-kotlin.git
26	pnpm	 https://github.com/jonathanmorley/asdf-pnpm.git
23	ocaml	 https://github.com/asdf-community/asdf-ocaml.git
22	rebar	 https://github.com/Stratus3D/asdf-rebar.git
20	julia	 https://github.com/rkyleg/asdf-julia.git
20	elm	 https://github.com/asdf-community/asdf-elm.git
18	R	 https://github.com/asdf-community/asdf-r.git
17	nim	 https://github.com/asdf-community/asdf-nim.git
17	alias	 https://github.com/andrewthauer/asdf-alias.git
16	mysql	 https://github.com/iroddis/asdf-mysql.git
16	minikube	 https://github.com/alvarobp/asdf-minikube.git
16	gradle	 https://github.com/rfrancis/asdf-gradle.git
15	zig	 https://github.com/cheetah/asdf-zig.git
15	shellcheck	 https://github.com/luizm/asdf-shellcheck.git
15	scala	 https://github.com/asdf-community/asdf-scala.git
15	maven	 https://github.com/halcyon/asdf-maven.git
15	kustomize	 https://github.com/Banno/asdf-kustomize.git
15	graalvm	 https://github.com/asdf-community/asdf-graalvm.git
14	sbcl	 https://github.com/smashedtoatoms/asdf-sbcl.git
14	protoc	 https://github.com/paxosglobal/asdf-protoc.git
14	perl	 https://github.com/ouest/asdf-perl.git
12	tmux	 https://github.com/aphecetche/asdf-tmux.git
12	opam	 https://github.com/asdf-community/asdf-opam.git
12	haxe	 https://github.com/asdf-community/asdf-haxe.git
12	go-sdk	 https://github.com/yacchi/asdf-go-sdk.git
12	firebase	 https://github.com/jthegedus/asdf-firebase.git
11	racket	 https://github.com/asdf-community/asdf-racket.git
11	clojure	 https://github.com/asdf-community/asdf-clojure.git
10	github-cli	 https://github.com/bartlomiejdanek/asdf-github-cli.git
10	clusterctl	 https://github.com/pfnet-research/asdf-clusterctl.git
9	starship	 https://github.com/grimoh/asdf-starship.git
9	shfmt	 https://github.com/luizm/asdf-shfmt.git
9	mongodb	 https://github.com/sylph01/asdf-mongodb.git
9	kube-credential-cache	 https://github.com/ryodocx/kube-credential-cache.git
9	caddy	 https://github.com/salasrod/asdf-caddy.git
8	swift	 https://github.com/fcrespo82/asdf-swift.git
8	sqlite	 https://github.com/cLupus/asdf-sqlite.git
8	imagemagick	 https://github.com/mangalakader/asdf-imagemagick.git
8	aws-vault	 https://github.com/karancode/asdf-aws-vault.git
7	yq	 https://github.com/sudermanjr/asdf-yq.git
7	vim	 https://github.com/tsuyoshicho/asdf-vim.git
7	syncher	 https://github.com/nwillc/syncher.git
7	lfe	 https://github.com/asdf-community/asdf-lfe.git
7	leiningen	 https://github.com/miorimmax/asdf-lein.git
7	docker-slim	 https://github.com/everpeace/asdf-docker-slim.git
7	buf	 https://github.com/truepay/asdf-buf.git
7	bazel	 https://github.com/rajatvig/asdf-bazel.git
6	zellij	 https://github.com/chessmango/asdf-zellij.git
6	swiprolog	 https://github.com/mracos/asdf-swiprolog.git
6	stack	 https://github.com/sestrella/asdf-ghcup.git
6	sops	 https://github.com/feniix/asdf-sops.git
6	pulumi	 https://github.com/canha/asdf-pulumi.git
6	ninja	 https://github.com/asdf-community/asdf-ninja.git
6	minio	 https://github.com/aeons/asdf-minio.git
6	k9s	 https://github.com/looztra/asdf-k9s.git
6	jq	 https://github.com/azmcode/asdf-jq.git
6	golangci-lint	 https://github.com/hypnoglow/asdf-golangci-lint.git
6	gauche	 https://github.com/sakuro/asdf-gauche.git
6	flux2	 https://github.com/tablexi/asdf-flux2.git
6	elasticsearch	 https://github.com/asdf-community/asdf-elasticsearch.git
6	dotty	 https://github.com/vic/asdf-dotty.git
6	dotnet	 https://github.com/hensou/asdf-dotnet
6	bundler	 https://github.com/jonathanmorley/asdf-bundler.git
6	bats	 https://github.com/timgluz/asdf-bats.git
6	aria2	 https://github.com/asdf-community/asdf-aria2.git
6	1password-cli	 https://github.com/NeoHsu/asdf-1password-cli.git
5	terragrunt	 https://github.com/ohmer/asdf-terragrunt.git
5	rabbitmq	 https://github.com/w-sanches/asdf-rabbitmq.git
5	purescript	 https://github.com/nsaunders/asdf-purescript.git
5	please	 https://github.com/asdf-community/asdf-please.git
5	opa	 https://github.com/tochukwuvictor/asdf-opa.git
5	lean	 https://github.com/asdf-community/asdf-lean.git
5	lazygit	 https://github.com/nklmilojevic/asdf-lazygit.git
5	kubebuilder	 https://github.com/virtualstaticvoid/asdf-kubebuilder.git
5	gohugo	 https://github.com/nklmilojevic/asdf-hugo.git
5	fzf	 https://github.com/kompiro/asdf-fzf.git
5	coq	 https://github.com/gingerhot/asdf-coq.git
5	chezmoi	 https://github.com/joke/asdf-chezmoi.git
5	cf	 https://github.com/mattysweeps/asdf-cf.git
5	ccache	 https://github.com/asdf-community/asdf-ccache.git
4	zoxide	 https://github.com/nyrst/asdf-zoxide
4	zola	 https://github.com/salasrod/asdf-zola.git
4	wasi-sdk	 https://github.com/coolreader18/asdf-wasi-sdk.git
4	stern	 https://github.com/looztra/asdf-stern.git
4	steampipe	 https://github.com/carnei-ro/asdf-steampipe.git
4	solidity	 https://github.com/diegodorado/asdf-solidity.git
4	saml2aws	 https://github.com/elementalvoid/asdf-saml2aws.git
4	raku	 https://github.com/m-dango/asdf-raku.git
4	peco	 https://github.com/asdf-community/asdf-peco.git
4	operator-sdk	 https://github.com/Medium/asdf-operator-sdk.git
4	openresty	 https://github.com/smashedtoatoms/asdf-openresty.git
4	neko	 https://github.com/asdf-community/asdf-neko.git
4	mlton	 https://github.com/asdf-community/asdf-mlton.git
4	meson	 https://github.com/asdf-community/asdf-meson.git
4	kops	 https://github.com/Antiarchitect/asdf-kops.git
4	k6	 https://github.com/grimoh/asdf-k6.git
4	k3d	 https://github.com/spencergilbert/asdf-k3d.git
4	janet	 https://github.com/Jakski/asdf-janet.git
4	idris2	 https://github.com/asdf-community/asdf-idris2.git
4	hugo	 https://github.com/NeoHsu/asdf-hugo.git
4	furyctl	 https://github.com/sighupio/asdf-furyctl.git
4	etcd	 https://github.com/particledecay/asdf-etcd.git
4	esy	 https://github.com/asdf-community/asdf-esy.git
4	dmd	 https://github.com/sylph01/asdf-dmd.git
4	dep	 https://github.com/paxosglobal/asdf-dep.git
4	cmake	 https://github.com/srivathsanmurali/asdf-cmake.git
4	cloudsql-proxy	 https://github.com/itspngu/asdf-cloudsql-proxy.git
4	brig	 https://github.com/Ibotta/asdf-brig.git
4	bitwarden	 https://github.com/vixus0/asdf-bitwarden.git
4	azure-cli	 https://github.com/itspngu/asdf-azure-cli.git
4	act	 https://github.com/grimoh/asdf-act.git
3	velero	 https://github.com/looztra/asdf-velero.git
3	tool-versions-to-env	 https://github.com/smartcontractkit/tool-versions-to-env-action.git
3	tfsec	 https://github.com/woneill/asdf-tfsec.git
3	tflint	 https://github.com/skyzyx/asdf-tflint.git
3	terramate	 https://github.com/martinlindner/asdf-terramate.git
3	terraform-docs	 https://github.com/looztra/asdf-terraform-docs.git
3	talos	 https://github.com/particledecay/asdf-talos.git
3	semver	 https://github.com/mathew-fleisch/asdf-semver.git
3	rlwrap	 https://github.com/asdf-community/asdf-rlwrap.git
3	quarkus	 https://github.com/asdf-community/asdf-quarkus.git
3	pdm	 https://github.com/1oglop1/asdf-pdm
3	opensearch	 https://github.com/randikabanura/asdf-opensearch.git
3	mkcert	 https://github.com/salasrod/asdf-mkcert.git
3	mint	 https://github.com/mint-lang/asdf-mint
3	luaJIT	 https://github.com/smashedtoatoms/asdf-luaJIT.git
3	loki-logcli	 https://github.com/comdotlinux/asdf-loki-logcli.git
3	logtalk	 https://github.com/LogtalkDotOrg/asdf-logtalk.git
3	kind	 https://github.com/johnlayton/asdf-kind.git
3	idris	 https://github.com/asdf-community/asdf-idris.git
3	groovy	 https://github.com/weibemoura/asdf-groovy.git
3	grain	 https://github.com/cometkim/asdf-grain.git
3	gomplate	 https://github.com/sneakybeaky/asdf-gomplate.git
3	glab	 https://github.com/particledecay/asdf-glab.git
3	gitui	 https://github.com/looztra/asdf-gitui.git
3	ginkgo	 https://github.com/jimmidyson/asdf-ginkgo.git
3	emsdk	 https://github.com/RobLoach/asdf-emsdk.git
3	dotenv-linter	 https://github.com/wesleimp/asdf-dotenv-linter.git
3	dive	 https://github.com/looztra/asdf-dive.git
3	dhall	 https://github.com/aaaaninja/asdf-dhall.git
3	desk	 https://github.com/endorama/asdf-desk.git
3	concourse	 https://github.com/mattysweeps/asdf-concourse.git
3	cockroach	 https://github.com/salasrod/asdf-cockroach.git
3	chezscheme	 https://github.com/asdf-community/asdf-chezscheme.git
3	camunda-modeler	 https://github.com/barmac/asdf-camunda-modeler.git
3	argocd	 https://github.com/beardix/asdf-argocd.git
3	alp	 https://github.com/asdf-community/asdf-alp.git
2	zigmod	 https://github.com/kachick/asdf-zigmod.git
2	watchexec	 https://github.com/nyrst/asdf-watchexec.git
2	wasmtime	 https://github.com/tachyonicbytes/asdf-wasmtime
2	wasmer	 https://github.com/tachyonicbytes/asdf-wasmer
2	vela	 https://github.com/pdemagny/asdf-vela
2	tfenv	 https://github.com/carlduevel/asdf-tfenv.git
2	terraform-lsp	 https://github.com/bartlomiejdanek/terraform-lsp.git
2	teleport-ent	 https://github.com/highb/asdf-teleport-ent
2	task	 https://github.com/particledecay/asdf-task.git
2	swiftformat	 https://github.com/younke/asdf-swiftformat.git
2	spring-boot	 https://github.com/joschi/asdf-spring-boot.git
2	spago	 https://github.com/nsaunders/asdf-spago.git
2	snyk	 https://github.com/nirfuchs/asdf-snyk.git
2	smlnj	 https://github.com/samontea/asdf-smlnj.git
2	sloth	 https://github.com/slok/asdf-sloth.git
2	semgrep	 https://github.com/brentjanderson/asdf-semgrep.git
2	rust-analyzer	 https://github.com/Xyven1/asdf-rust-analyzer
2	protolint	 https://github.com/spencergilbert/asdf-protolint.git
2	pre-commit	 https://github.com/jonathanmorley/asdf-pre-commit.git
2	pluto	 https://github.com/FairwindsOps/asdf-pluto.git
2	odo	 https://github.com/rm3l/asdf-odo.git
2	mvnd	 https://github.com/joschi/asdf-mvnd.git
2	mockery	 https://github.com/cabify/asdf-mockery.git
2	kubectl-kots	 https://github.com/ganta/asdf-kubectl-kots.git
2	kube-score	 https://github.com/bageljp/asdf-kube-score.git
2	ktlint	 https://github.com/esensar/asdf-ktlint.git
2	krew	 https://github.com/jimmidyson/asdf-krew.git
2	jx	 https://github.com/vbehar/asdf-jx.git
2	just	 https://github.com/olofvndrhr/asdf-just.git
2	jsonnet	 https://github.com/Banno/asdf-jsonnet.git
2	jmespath	 https://github.com/skyzyx/asdf-jmespath.git
2	istioctl	 https://github.com/virtualstaticvoid/asdf-istioctl.git
2	io	 https://github.com/mracos/asdf-io.git
2	hygen	 https://github.com/brentjanderson/asdf-hygen.git
2	httpie-go	 https://github.com/abatilo/asdf-httpie-go.git
2	hadolint	 https://github.com/devlincashman/asdf-hadolint.git
2	grails	 https://github.com/weibemoura/asdf-grails.git
2	goreleaser	 https://github.com/kforsthoevel/asdf-goreleaser.git
2	gopass	 https://github.com/trallnag/asdf-gopass.git
2	github-markdown-toc	 https://github.com/skyzyx/asdf-github-markdown-toc.git
2	gitconfig	 https://github.com/0ghny/asdf-gitconfig.git
2	ghq	 https://github.com/kajisha/asdf-ghq.git
2	getenvoy	 https://github.com/asdf-community/asdf-getenvoy.git
2	fluxctl	 https://github.com/stefansedich/asdf-fluxctl.git
2	ffmpeg	 https://github.com/acj/asdf-ffmpeg
2	editorconfig-checker	 https://github.com/gabitchov/asdf-editorconfig-checker.git
2	dprint	 https://github.com/asdf-community/asdf-dprint
2	docker-compose-v1	 https://github.com/kompiro/asdf-docker-compose-v1
2	djinni	 https://github.com/cross-language-cpp/asdf-djinni.git
2	coursier	 https://github.com/jiahuili430/asdf-coursier.git
2	cookiecutter	 https://github.com/shawon-crosen/asdf-cookiecutter.git
2	conftest	 https://github.com/looztra/asdf-conftest.git
2	cheat	 https://github.com/jmoratilla/asdf-cheat-plugin
2	cargo-make	 https://github.com/kachick/asdf-cargo-make.git
2	buildpack	 https://github.com/johnlayton/asdf-buildpack.git
2	bpkg	 https://github.com/bpkg/asdf-bpkg.git
2	asciidoctorj	 https://github.com/gliwka/asdf-asciidoctorj.git
2	argo-rollouts	 https://github.com/abatilo/asdf-argo-rollouts.git
2	actionlint	 https://github.com/crazy-matt/asdf-actionlint.git
1	zprint	 https://github.com/carlduevel/asdf-zprint.git
1	ytt	 https://github.com/vmware-tanzu/asdf-carvel.git
1	yor	 https://github.com/ordinaryexperts/asdf-yor
1	yay	 https://github.com/aaaaninja/asdf-yay.git
1	xh	 https://github.com/NeoHsu/asdf-xh
1	xcodegen	 https://github.com/younke/asdf-xcodegen.git
1	wren-cli	 https://github.com/jtakakura/asdf-wren-cli.git
1	wasm4	 https://github.com/jtakakura/asdf-wasm4
1	vendir	 https://github.com/vmware-tanzu/asdf-carvel.git
1	v	 https://github.com/jthegedus/asdf-v.git
1	upx	 https://github.com/jimmidyson/asdf-upx.git
1	trivy	 https://github.com/zufardhiyaulhaq/asdf-trivy.git
1	tridentctl	 https://github.com/asdf-community/asdf-tridentctl.git
1	tomcat	 https://github.com/mbutov/asdf-tomcat
1	tilt	 https://github.com/eaceaser/asdf-tilt.git
1	thrift	 https://github.com/alisaifee/asdf-thrift.git
1	tf-summarize	 https://github.com/adamcrews/asdf-tf-summarize.git
1	terraform-validator	 https://github.com/looztra/asdf-terraform-validator.git
1	terradozer	 https://github.com/chessmango/asdf-terradozer.git
1	telepresence	 https://github.com/pirackr/asdf-telepresence.git
1	tanka	 https://github.com/trotttrotttrott/asdf-tanka.git
1	svu	 https://github.com/asdf-community/asdf-svu
1	stylua	 https://github.com/jc00ke/asdf-stylua.git
1	sqldef	 https://github.com/cometkim/asdf-sqldef.git
1	spark	 https://github.com/joshuaballoch/asdf-spark.git
1	sourcery	 https://github.com/younke/asdf-sourcery.git
1	soft-serve	 https://github.com/chessmango/asdf-soft-serve.git
1	skate	 https://github.com/chessmango/asdf-skate.git
1	skaffold	 https://github.com/nklmilojevic/asdf-skaffold.git
1	riak	 https://github.com/smashedtoatoms/asdf-riak.git
1	redo	 https://github.com/chessmango/asdf-redo.git
1	redis-cli	 https://github.com/NeoHsu/asdf-redis-cli.git
1	reckoner	 https://github.com/FairwindsOps/asdf-reckoner.git
1	rclone	 https://github.com/johnlayton/asdf-rclone.git
1	rancher	 https://github.com/abinet/asdf-rancher.git
1	purty	 https://github.com/nsaunders/asdf-purty.git
1	pivnet	 https://github.com/laidbackware/asdf-github-release-downloader.git
1	patat	 https://github.com/airtonix/asdf-patat.git
1	osqueryi	 https://github.com/davidecavestro/asdf-osqueryi.git
1	om	 https://github.com/laidbackware/asdf-github-release-downloader.git
1	okteto	 https://github.com/BradenM/asdf-okteto
1	odin	 https://github.com/jtakakura/asdf-odin
1	nova	 https://github.com/elementalvoid/asdf-nova.git
1	nfpm	 https://github.com/ORCID/asdf-nfpm
1	newrelic-cli	 https://github.com/NeoHsu/asdf-newrelic-cli.git
1	mongo-tools	 https://github.com/itspngu/asdf-mongo-tools.git
1	minishift	 https://github.com/sqtran/asdf-minishift.git
1	mill	 https://github.com/asdf-community/asdf-mill.git
1	micronaut	 https://github.com/weibemoura/asdf-micronaut.git
1	memcached	 https://github.com/furkanural/asdf-memcached
1	mc	 https://github.com/penpyt/asdf-mc.git
1	make	 https://github.com/yacchi/asdf-make.git
1	mage	 https://github.com/mathew-fleisch/asdf-mage.git
1	kwt	 https://github.com/vmware-tanzu/asdf-carvel.git
1	kubesec	 https://github.com/vitalis/asdf-kubesec.git
1	kubeseal	 https://github.com/stefansedich/asdf-kubeseal.git
1	kubectl-buildkit	 https://github.com/ezcater/asdf-kubectl-buildkit.git
1	kubeconform	 https://github.com/lirlia/asdf-kubeconform.git
1	kube-linter	 https://github.com/devlincashman/asdf-kube-linter.git
1	kpt	 https://github.com/nlamirault/asdf-kpt.git
1	kn	 https://github.com/joke/asdf-kn.git
1	kbld	 https://github.com/vmware-tanzu/asdf-carvel.git
1	kapp	 https://github.com/vmware-tanzu/asdf-carvel.git
1	k2tf	 https://github.com/carlduevel/asdf-k2tf.git
1	jiq	 https://github.com/chessmango/asdf-jiq.git
1	jbang	 https://github.com/joschi/asdf-jbang.git
1	jb	 https://github.com/beardix/asdf-jb.git
1	imgpkg	 https://github.com/vmware-tanzu/asdf-carvel.git
1	iamlive	 https://github.com/chessmango/asdf-iamlive.git
1	hwatch	 https://github.com/chessmango/asdf-hwatch.git
1	hey	 https://github.com/raimon49/asdf-hey.git
1	helmfile	 https://github.com/feniix/asdf-helmfile.git
1	helm-diff	 https://github.com/dex4er/asdf-helm-diff.git
1	helm-ct	 https://github.com/tablexi/asdf-helm-ct.git
1	hcloud	 https://github.com/chessmango/asdf-hcloud.git
1	hasura-cli	 https://github.com/gurukulkarni/asdf-hasura.git
1	hamler	 https://github.com/scudelletti/asdf-hamler.git
1	guile	 https://github.com/indiebrain/asdf-guile.git
1	grype	 https://github.com/poikilotherm/asdf-grype.git
1	grpcurl	 https://github.com/asdf-community/asdf-grpcurl.git
1	gomigrate	 https://github.com/joschi/asdf-gomigrate.git
1	gojq	 https://github.com/jimmidyson/asdf-gojq.git
1	go-jira	 https://github.com/dguihal/asdf-go-jira.git
1	go-getter	 https://github.com/ryodocx/asdf-go-getter.git
1	gcc-arm-none-eabi	 https://github.com/dlech/asdf-gcc-arm-none-eabi.git
1	flyctl	 https://github.com/chessmango/asdf-flyctl.git
1	fly	 https://github.com/laidbackware/asdf-github-release-downloader.git
1	exa	 https://github.com/nyrst/asdf-exa.git
1	dust	 https://github.com/looztra/asdf-dust.git
1	dtm	 https://github.com/zhenyuanlau/asdf-dtm.git
1	driftctl	 https://github.com/nlamirault/asdf-driftctl.git
1	doctoolchain	 https://github.com/joschi/asdf-doctoolchain
1	doctl	 https://github.com/maristgeek/asdf-doctl.git
1	difftastic	 https://github.com/volf52/asdf-difftastic.git
1	delta	 https://github.com/andweeb/asdf-delta.git
1	dbmate	 https://github.com/juusujanar/asdf-dbmate.git
1	dasel	 https://github.com/asdf-community/asdf-dasel.git
1	cue	 https://github.com/asdf-community/asdf-cue.git
1	credhub	 https://github.com/laidbackware/asdf-github-release-downloader.git
1	codefresh	 https://github.com/gurukulkarni/asdf-codefresh.git
1	cmctl	 https://github.com/asdf-community/asdf-cmctl.git
1	clusterawsadm	 https://github.com/kahun/asdf-clusterawsadm.git
1	chromedriver	 https://github.com/schinckel/asdf-chromedriver.git
1	bosh	 https://github.com/laidbackware/asdf-github-release-downloader.git
1	babashka	 https://github.com/fredZen/asdf-babashka
1	awsweeper	 https://github.com/chessmango/asdf-awsweeper.git
1	awsrm	 https://github.com/chessmango/asdf-awsrm.git
1	awsls	 https://github.com/chessmango/asdf-awsls.git
1	aws-nuke	 https://github.com/bersalazar/asdf-aws-nuke.git
1	aws-copilot	 https://github.com/NeoHsu/asdf-copilot
1	argo	 https://github.com/sudermanjr/asdf-argo.git
0	zephyr	 https://github.com/nsaunders/asdf-zephyr.git
0	yj	 https://github.com/ryodocx/asdf-yj.git
0	yadm	 https://github.com/particledecay/asdf-yadm.git
0	xchtmlreport	 https://github.com/younke/asdf-xchtmlreport.git
0	wtfutil	 https://github.com/NeoHsu/asdf-wtfutil.git
0	websocat	 https://github.com/bdellegrazie/asdf-websocat.git
0	weave-gitops	 https://github.com/deas/asdf-weave-gitops
0	wasm3	 https://github.com/tachyonicbytes/asdf-wasm3
0	vultr-cli	 https://github.com/ikuradon/asdf-vultr-cli.git
0	viddy	 https://github.com/ryodocx/asdf-viddy.git
0	vhs	 https://github.com/chessmango/asdf-vhs.git
0	velad	 https://github.com/pdemagny/asdf-velad
0	vals	 https://github.com/dex4er/asdf-vals.git
0	usql	 https://github.com/itspngu/asdf-usql.git
0	upt	 https://github.com/ORCID/asdf-upt.git
0	tsuru	 https://github.com/virtualstaticvoid/asdf-tsuru.git
0	trdsql	 https://github.com/johnlayton/asdf-trdsql.git
0	tonnage	 https://github.com/elementalvoid/asdf-tonnage.git
0	tokei	 https://github.com/gasuketsu/asdf-tokei.git
0	titan	 https://github.com/gabitchov/asdf-titan.git
0	tfupdate	 https://github.com/yuokada/asdf-tfupdate.git
0	tfstate-lookup	 https://github.com/carnei-ro/asdf-tfstate-lookup.git
0	tfmigrate	 https://github.com/dex4er/asdf-tfmigrate.git
0	tfctl	 https://github.com/deas/asdf-tfctl
0	teleport-community	 https://github.com/MaloPolese/asdf-teleport-community
0	tekton-cli	 https://github.com/johnhamelink/asdf-tekton-cli.git
0	syft	 https://github.com/davidgp1701/asdf-syft.git
0	swiftlint	 https://github.com/klundberg/asdf-swiftlint.git
0	swiftgen	 https://github.com/younke/asdf-swiftgen.git
0	swag	 https://github.com/behoof4mind/asdf-swag.git
0	stripe-cli	 https://github.com/offbyone/asdf-stripe.git
0	step	 https://github.com/log2/asdf-step.git
0	starport	 https://github.com/nikever/asdf-starport.git
0	starboard	 https://github.com/zufardhiyaulhaq/asdf-starboard.git
0	spruce	 https://github.com/woneill/asdf-spruce.git
0	spin	 https://github.com/pavloos/asdf-spin.git
0	spectral	 https://github.com/vbyrd/asdf-spectral.git
0	sopstool	 https://github.com/elementalvoid/asdf-sopstool.git
0	sinker	 https://github.com/elementalvoid/asdf-sinker.git
0	shellspec	 https://github.com/poikilotherm/asdf-shellspec.git
0	serverless	 https://github.com/pdemagny/asdf-serverless.git
0	semtag	 https://github.com/junminahn/asdf-semtag
0	schemacrawler	 https://github.com/davidecavestro/asdf-schemacrawler.git
0	scenery	 https://github.com/skyzyx/asdf-scenery.git
0	sccache	 https://github.com/emersonmx/asdf-sccache.git
0	scaleway-cli	 https://github.com/albarralnunez/asdf-plugin-scaleway-cli
0	sbt	 https://github.com/bram2000/asdf-sbt.git
0	rstash	 https://github.com/carlduevel/asdf-rstash.git
0	rke	 https://github.com/particledecay/asdf-rke.git
0	riff	 https://github.com/abinet/asdf-riff.git
0	richgo	 https://github.com/paxosglobal/asdf-richgo.git
0	regctl	 https://github.com/ORCID/asdf-regctl.git
0	reg	 https://github.com/looztra/asdf-reg.git
0	redskyctl	 https://github.com/sudermanjr/asdf-redskyctl.git
0	rbac-lookup	 https://github.com/looztra/asdf-rbac-lookup.git
0	purerl	 https://github.com/GoNZooo/asdf-purerl.git
0	protoc-gen-js	 https://github.com/pbr0ck3r/asdf-protoc-gen-js.git
0	protoc-gen-grpc-web	 https://github.com/pbr0ck3r/asdf-protoc-gen-grpc-web.git
0	protoc-gen-go-grpc	 https://github.com/pbr0ck3r/asdf-protoc-gen-go-grpc.git
0	protoc-gen-go	 https://github.com/pbr0ck3r/asdf-protoc-gen-go.git
0	powershell-core	 https://github.com/daveneeley/asdf-powershell-core.git
0	popeye	 https://github.com/nlamirault/asdf-popeye.git
0	polaris	 https://github.com/particledecay/asdf-polaris.git
0	pint	 https://github.com/sam-burrell/asdf-pint.git
0	pachctl	 https://github.com/abatilo/asdf-pachctl.git
0	osm	 https://github.com/nlamirault/asdf-osm.git
0	opsgenie-lamp	 https://github.com/ORCID/asdf-opsgenie-lamp
0	openshift-install	 https://github.com/hhemied/asdf-openshift-install.git
0	openfaas-faas-cli	 https://github.com/zekker6/asdf-faas-cli.git
0	oc	 https://github.com/sqtran/asdf-oc.git
0	nsc	 https://github.com/dex4er/asdf-nsc.git
0	nerdctl	 https://github.com/dmpe/asdf-nerdctl
0	nano	 https://github.com/mfakane/asdf-nano.git
0	nancy	 https://github.com/iilyak/asdf-nancy.git
0	mutanus	 https://github.com/soriur/asdf-mutanus.git
0	mongosh	 https://github.com/itspngu/asdf-mongosh.git
0	mitmproxy	 https://github.com/NeoHsu/asdf-mitmproxy.git
0	melt	 https://github.com/chessmango/asdf-melt.git
0	mdbook-linkcheck	 https://github.com/cipherstash/asdf-mdbook-linkcheck.git
0	mdbook	 https://github.com/cipherstash/asdf-mdbook.git
0	mask	 https://github.com/aaaaninja/asdf-mask.git
0	mark	 https://github.com/jfreeland/asdf-mark.git
0	mani	 https://github.com/anweber/asdf-mani.git
0	lucy	 https://github.com/cometkim/asdf-lucy.git
0	litestream	 https://github.com/threkk/asdf-litestream
0	liqoctl	 https://github.com/pdemagny/asdf-liqoctl
0	linkerd	 https://github.com/kforsthoevel/asdf-linkerd.git
0	lab	 https://github.com/particledecay/asdf-lab.git
0	kuttl	 https://github.com/jimmidyson/asdf-kuttl.git
0	kubie	 https://github.com/johnhamelink/asdf-kubie.git
0	kubeval	 https://github.com/stefansedich/asdf-kubeval.git
0	kubespy	 https://github.com/jfreeland/asdf-kubespy.git
0	kubergrunt	 https://github.com/NeoHsu/asdf-kubergrunt.git
0	kubent	 https://github.com/virtualstaticvoid/asdf-kubent.git
0	kubemqctl	 https://github.com/johnlayton/asdf-kubemqctl.git
0	kubelogin	 https://github.com/sechmann/asdf-kubelogin.git
0	kubefedctl	 https://github.com/kvokka/asdf-kubefedctl.git
0	kubectl-bindrole	 https://github.com/looztra/asdf-kubectl-bindrole.git
0	kubecm	 https://github.com/samhvw8/asdf-kubecm
0	kube-controller-tools	 https://github.com/jimmidyson/asdf-kube-controller-tools.git
0	kube-code-generator	 https://github.com/jimmidyson/asdf-kube-code-generator.git
0	kube-capacity	 https://github.com/looztra/asdf-kube-capacity.git
0	ksonnet	 https://github.com/Banno/asdf-ksonnet.git
0	kscript	 https://github.com/edgelevel/asdf-kscript.git
0	kompose	 https://github.com/technikhil314/asdf-kompose.git
0	ko	 https://github.com/zasdaym/asdf-ko.git
0	ki	 https://github.com/comdotlinux/asdf-ki
0	kconf	 https://github.com/particledecay/asdf-kconf.git
0	kcctl	 https://github.com/joschi/asdf-kcctl.git
0	kcat	 https://github.com/douglasdgoulart/asdf-kcat.git
0	kafkactl	 https://github.com/anweber/asdf-kafkactl.git
0	kafka	 https://github.com/ueisele/asdf-kafka.git
0	k3sup	 https://github.com/cgroschupp/asdf-k3sup.git
0	jreleaser	 https://github.com/joschi/asdf-jreleaser.git
0	jmeter	 https://github.com/comdotlinux/asdf-jmeter
0	jless	 https://github.com/jc00ke/asdf-jless.git
0	jib	 https://github.com/joschi/asdf-jib.git
0	inlets	 https://github.com/nlamirault/asdf-inlets.git
0	infracost	 https://github.com/dex4er/asdf-infracost.git
0	iam-policy-json-to-terraform	 https://github.com/carlduevel/asdf-iam-policy-json-to-terraform.git
0	hyperfine	 https://github.com/volf52/asdf-hyperfine.git
0	hurl	 https://github.com/raimon49/asdf-hurl.git
0	hub	 https://github.com/vixus0/asdf-hub.git
0	heroku-cli	 https://github.com/treilly94/asdf-heroku-cli.git
0	helmsman	 https://github.com/luisdavim/asdf-helmsman
0	helm-docs	 https://github.com/sudermanjr/asdf-helm-docs.git
0	helm-cr	 https://github.com/Antiarchitect/asdf-helm-cr.git
0	hcl2json	 https://github.com/dex4er/asdf-hcl2json.git
0	has	 https://github.com/sylvainmetayer/asdf-has
0	gwvault	 https://github.com/GoodwayGroup/asdf-gwvault.git
0	gum	 https://github.com/lwiechec/asdf-gum
0	grpc-health-probe	 https://github.com/zufardhiyaulhaq/asdf-grpc-health-probe.git
0	grex	 https://github.com/ouest/asdf-grex
0	granted	 https://github.com/dex4er/asdf-granted.git
0	gradle-profiler	 https://github.com/joschi/asdf-gradle-profiler.git
0	goss	 https://github.com/raimon49/asdf-goss.git
0	go-swagger	 https://github.com/jfreeland/asdf-go-swagger.git
0	go-junit-report	 https://github.com/jwillker/asdf-go-junit-report.git
0	go-containerregistry	 https://github.com/dex4er/asdf-go-containerregistry.git
0	glow	 https://github.com/chessmango/asdf-glow.git
0	glooctl	 https://github.com/halilkaya/asdf-glooctl.git
0	glen	 https://github.com/bradym/asdf-glen
0	gitsign	 https://github.com/spencergilbert/asdf-gitsign.git
0	gitleaks	 https://github.com/jmcvetta/asdf-gitleaks.git
0	git-chglog	 https://github.com/GoodwayGroup/asdf-git-chglog.git
0	ghorg	 https://github.com/gbloquel/asdf-ghorg.git
0	ghidra	 https://github.com/Honeypot95/asdf-ghidra.git
0	gator	 https://github.com/MxNxPx/asdf-gator.git
0	gam	 https://github.com/offbyone/asdf-gam.git
0	func-e	 https://github.com/carnei-ro/asdf-func-e.git
0	flarectl	 https://github.com/ORCID/asdf-flarectl.git
0	fission	 https://github.com/virtualstaticvoid/asdf-fission.git
0	fillin	 https://github.com/ouest/asdf-fillin
0	figma-export	 https://github.com/younke/asdf-figma-export.git
0	envcli	 https://github.com/zekker6/asdf-envcli.git
0	embulk	 https://github.com/yuokada/asdf-embulk.git
0	eksctl	 https://github.com/elementalvoid/asdf-eksctl.git
0	ejson	 https://github.com/cipherstash/asdf-ejson.git
0	duf	 https://github.com/NeoHsu/asdf-duf.git
0	drone	 https://github.com/virtualstaticvoid/asdf-drone.git
0	draft	 https://github.com/kristoflemmens/asdf-draft.git
0	dome	 https://github.com/jtakakura/asdf-dome.git
0	docuum	 https://github.com/bradym/asdf-docuum.git
0	dockle	 https://github.com/mathew-fleisch/asdf-dockle.git
0	digdag	 https://github.com/jtakakura/asdf-digdag.git
0	devspace	 https://github.com/NeoHsu/asdf-devspace.git
0	depot	 https://github.com/depot/asdf-depot.git
0	deck	 https://github.com/nutellinoit/asdf-deck.git
0	datree	 https://github.com/lukeab/asdf-datree.git
0	dagger	 https://github.com/virtualstaticvoid/asdf-dagger.git
0	ctop	 https://github.com/NeoHsu/asdf-ctop.git
0	ctlptl	 https://github.com/ezcater/asdf-ctlptl.git
0	crossplane-cli	 https://github.com/joke/asdf-crossplane-cli.git
0	crc	 https://github.com/sqtran/asdf-crc.git
0	crane	 https://github.com/dmpe/asdf-crane
0	copper	 https://github.com/vladlosev/asdf-copper.git
0	container-structure-test	 https://github.com/jonathanmorley/asdf-container-structure-test.git
0	container-diff	 https://github.com/cgroschupp/asdf-container-diff.git
0	conform	 https://github.com/skyzyx/asdf-conform.git
0	conduit	 https://github.com/gmcabrita/asdf-conduit.git
0	codeql	 https://github.com/bored-engineer/asdf-codeql.git
0	cloudflared	 https://github.com/threkk/asdf-cloudflared
0	cilium-hubble	 https://github.com/NitriKx/asdf-cilium-hubble.git
0	cilium-cli	 https://github.com/carnei-ro/asdf-cilium-cli.git
0	cidr-merger	 https://github.com/ORCID/asdf-cidr-merger.git
0	choose	 https://github.com/carbonteq/asdf-choose.git
0	chicken	 https://github.com/evhan/asdf-chicken.git
0	checkov	 https://github.com/bosmak/asdf-checkov.git
0	chamber	 https://github.com/mintel/asdf-chamber
0	cfssl	 https://github.com/mathew-fleisch/asdf-cfssl.git
0	certstrap	 https://github.com/carnei-ro/asdf-certstrap.git
0	carthage	 https://github.com/younke/asdf-carthage.git
0	btrace	 https://github.com/joschi/asdf-btrace.git
0	bottom	 https://github.com/carbonteq/asdf-btm.git
0	borg	 https://github.com/lwiechec/asdf-borg
0	bombardier	 https://github.com/NeoHsu/asdf-bombardier.git
0	binnacle	 https://github.com/Traackr/asdf-binnacle.git
0	benthos	 https://github.com/benthosdev/benthos-asdf.git
0	batect	 https://github.com/johnlayton/asdf-batect.git
0	bashbot	 https://github.com/mathew-fleisch/asdf-bashbot.git
0	balena-cli	 https://github.com/boatkit-io/asdf-balena-cli
0	azure-functions-core-tools	 https://github.com/daveneeley/asdf-azure-functions-core-tools.git
0	aws-iam-authenticator	 https://github.com/zekker6/asdf-aws-iam-authenticator
0	assh	 https://github.com/zekker6/asdf-assh.git
0	arc	 https://github.com/ORCID/asdf-arc.git
0	apollo-router	 https://github.com/safx/asdf-apollo-router.git
0	ant	 https://github.com/jackboespflug/asdf-ant.git
0	amazon-ecr-credential-helper	 https://github.com/dex4er/asdf-amazon-ecr-credential-helper.git
0	amass	 https://github.com/dhoeric/asdf-amass.git
0	allure	 https://github.com/comdotlinux/asdf-allure.git
0	aks-engine	 https://github.com/robsonpeixoto/asdf-aks-engine.git
0	agebox	 https://github.com/slok/asdf-agebox.git
0	age	 https://github.com/threkk/asdf-age
0	ag	 https://github.com/koketani/asdf-ag.git

Feature request: Support .ruby-version files

You're probably already aware of this, but most of the ruby-versioning tools support a .ruby-version file, which just looks like this:

3.0.5

Would you please consider adding support for .ruby-version files?
It would make it easier for a Ruby dev to start using rtx immediately because many projects will already have a .ruby-version file.

Examples:

document dependencies needed for local development

I should do a clean-room setup of the dev environment for building rtx itself. I know it requires just which isn't documented really. There are likely other things that's required, and possibly special configuration that's only on my machines I don't even realize is required. It'll be hard for people to contribute if they can't easy setup this project locally.

This likely also means git hooks which currently uses husky. We may want to revisit that to remove the dependency on node for such a simple thing.

GOROOT not set/updated on directory change

GOROOT environment variable is empty, when switching directories.

Reproduce:

cd ~
❯ rtx global
golang 1.19.5
❯ rtx env
export GOROOT=/Users/user/.local/share/rtx/installs/golang/1.19.5/go
...
❯ echo $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go

❯ mkdir ~/dev/tmp/empty-rtx-goroot
❯ cd ~/dev/tmp/empty-rtx-goroot
❯ echo $GOROOT\ls -la ~/dev/tmp/empty-rtx-goroot
total 0
drwxr-xr-x@  2 user  staff   64 Jan 27 18:21 .
drwxr-xr-x@ 12 user  staff  384 Jan 27 18:21 ..
❯ rtx global
golang 1.19.5
❯ rtx env
# no `export GOROOT`

Similar with local golang version:

New zsh:

# New zsh shell in user home (contains .tool-versions)
❯ rtx global
golang 1.19.5
❯ echo $GOROOT
/Users/user/.local/share/rtx/installs/golang/1.19.5/go
❯ cd ~/dev/tmp/rtx-goroot
❯ rtx env
export GOROOT=/Users/user/.local/share/rtx/installs/golang/1.18.10/go
...
❯ echo $GOROOT

❯ rtx local
golang 1.18.10
❯ cat .tool-versions
golang 1.18.10

Fix:

This seems to be related to the bin/exec-env handling. Not sure, if this should be fixed in the asdf-golang plugin or in rtx. I would expect GOROOT/JAVA_HOME be set always and updated on based on local overrides.

Update: Seems to be similar with JAVA_HOME

Feature request: command to get path to selected runtime

It would be great to be able to obtain path to single runtime as command, same value that is being injected to $PATH.

My use case is that I want to set pipx to use currently selected Python. With asdf in Fish, I use set -gx PIPX_DEFAULT_PYTHON "$HOME/.asdf/shims/python", but since rtx does not use shims, there is no "stable" path to use here.

I imagine solution like:
set -gx PIPX_DEFAULT_PYTHON (rtx runtime-path python)/python

where rtx runtime-path python (or whatever command name, I don't have a preference here) would return the same path as is injected to $PATH (e.g. $HOME/.local/share/rtx/installs/python/3.11.1/bin).

If there is other solution for this use case, I have not figured it out and would like to hear about it.

btw, thanks for a great tool, creating and open-sourcing it, looking forward to using it actively :)

`rtx install nodejs@18 --verbose`

There should be a --verbose flag on install so we can hide the build output unless there has been a failure. (In essence: rtx install nodejs@18 --verbose should be the output that exists today, and without --verbose would be this simplified output)

I'm thinking something like this:

$ rtx install nodejs@18
Installing [email protected]... installed to ~/.rtx/installs/nodejs/v18.13.0

These sort of one-liner things with a before/after message was something I did a lot of in the Heroku CLI. I think it's great to be able to limit output to a single line of status for these kind of things.

improve performance with no cache

If the plugin cache isn't fresh (which happens daily), then it runs list-all on every plugin (in parallel) for commands like rtx env.

This ideally should not be necessary. We don't need to list all the version for a command like that I don't think, we may currently but I think that can change.

rtx exec not fetching new plugins

I'm trying to strike a balance with prompting at the right times and not at the wrong times. However look at this command and imagine I'm on a brand new box (but one that has node on it):

$ rtx exec nodejs@14 -- node -v

I would think this would fetch node 14 and run it, but what actually happens is it runs the system node since the plugin isn't installed. I think ignoring runtimes when the plugin isn't installed makes sense for .tool-versions. Otherwise it's too complex.

However in this case, this should prompt to install nodejs plugin and node. Or maybe just if you specify a version with @, but I think if any argument is specified it should be treated similar to rtx install (which will prompt to install plugins).

Unfortunately this is kind of tricky to fix. I have a PR up but it's not a complete fix. It needs to call .fetch_latest() on the version because otherwise it tried to literally install "14" but it needs to install the latest version of 14. The code isn't well suited for this, unfortunately.

BTW if anyone is reading this and wondering about Rust: this is exactly what I hate about it. Everything basically has to be immutable pretty much so I can't really make this change without a huge design change. If I was writing this in Node or Go or most other languages I could just change the value of the runtime and it would be fine, but that's a lot harder in Rust. I don't dislike Rust, but it certainly is taking me a lot longer to do relatively simple things for sure.

adopt tiny/dummy plugins for every unit test

I've abused the unit tests and many of them are quite slow because they are, in fact, integration tests that would be better suited for the E2E test suite. The entire suite isn't too bad currently but as the project grows it will continue to get worse.

We should make the unit tests faster by using the tiny and dummy plugins for all of the unit tests (or at least most of them).

Support for bin/latest-stable

I didn't add this yet since I couldn't find a plugin that actually had one, but golang does so I can use that as a reference.

use positional arg for `rtx activate SHELL`

I regret using an option for rtx activate, rtx hook-env, and rtx env. This is how you use them currently:

$ rtx activate -s bash
$ rtx hook-env -s bash
$ rtx env -s bash

this is how they should work:

$ rtx activate bash
$ rtx hook-env bash
$ rtx env -s bash

In order to not break current users we should make either usage supported but -s should have hide = true set in the clap config so it doesn't show in the help.

We're not doing rtx env because it also accepts runtimes as positional arguments and this is an optional argument.

`rtx activate` incompatible with direnv

I started playing with rtx today to replace my asdf-direnv setup.

When using layout python3 from the direnv stdlib, it used my global rtx python3 version and not the rtx local one. In the shell itself, the venv of direnv wasn't used, as rtx added the configured path sections to the fron of PATH.

Updated: My fix was to move eval "$(rtx activate -s zsh)" after my direnv one in .zshrc The work-around is only working in the folder containing .envrc and .tool-versions, but not in subfolders (see comment below):

eval "$(direnv hook zsh)"
eval "$(rtx activate -s zsh)"

Is this something for a known-issues/documentation section or can the zsh call sequence somehow be influenced?

Thank you for this initial release of rtx. It's a great start.

Reproduce:

~/.tool-versions:

python 3.10.9

.zshrc

eval "$(rtx activate -s zsh)"
eval "$(direnv hook zsh)"

~/dev/tmp/rtx-direnv/.envrc:

layout python3

~/dev/tmp/rtx-direnv/.tool-versions:

python 3.8.10

Steps:

echo $PATH
/Users/user/.local/share/rtx/installs/python/3.10.9/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/.rd/bin:/opt/homebrew/opt/fzf/bin
❯ cd ~/dev/tmp/rtx-direnv
direnv: error /Users/user/Projects/tmp/rtx-direnv/.envrc is blocked. Run `direnv allow` to approve its content

# after the initial `direnv allow` it will seem to work, as the path is already adjusted by rtx
❯ direnv allow
direnv: loading ~/Projects/tmp/rtx-direnv/.envrc
direnv: export +VIRTUAL_ENV ~PATH
❯ cd ..
direnv: unloading
❯ cd ~/dev/tmp/rtx-direnv
direnv: loading ~/Projects/tmp/rtx-direnv/.envrc
direnv: export +VIRTUAL_ENV ~PATH

# direnv venv path overwritten and venv pointing to wrong python versionecho $PATH
/Users/user/.local/share/rtx/installs/python/3.8.10/bin:/Users/user/Projects/tmp/rtx-direnv/.direnv/python-3.10.9/bin:/opt/homebrew/bin:/Users/user/bin:/Users/user/go/bin:/Users/user/.local/bin:/Users/user/.cargo/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/user/.rd/bin:/opt/homebrew/opt/fzf/bin

With updated .zshrc:

eval "$(direnv hook zsh)"
eval "$(rtx activate -s zsh)"

Steps:

# open new shellcd ~/dev/tmp/rtx-direnv
direnv: loading ~/Projects/tmp/rtx-direnv/.envrc
direnv: export +VIRTUAL_ENV ~PATH
❯ echo $PATH
/Users/user/Projects/tmp/rtx-direnv/.direnv/python-3.8.10/bin:/Users/user/.local/share/rtx/installs/python/3.8.10/bin:/opt/homebrew/bin:/Users/user/bin:/Users/user/go/bin:/Users/user/.local/bin:/Users/user/.cargo/bin:/opt/homebrew/opt/mysql-client/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

Command suggestion with invalid .tool-versions format can cause panic

If you have an invalid .tool-versions file like this:

ruby: 3.0.5

and you run this:

rtx install

then you get this:

[WARN] plugin ruby: is not installed. Install it with `rtx plugin add ruby:`

Running that command (with the trailing :) causes a panic:

rtx plugin add ruby:
Downloading ruby-build...
The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: src/cli/plugins/install.rs:74

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Abort trap: 6
❌ exit code: 134

My bad for not having read the documentation better, but it might be nice to have some
validation warning for invalid .tool-versions file formats? Or maybe a nicer error message when an invalid
language (e.g. ruby:) is specified?

Not a big deal of course :)

Brew install method requires Github credentials?

When I use the Homebrew install method on MacOS, it prompts me for my Github credentials. Is this expected?

❯ brew install jdxcode/tap/rtx
==> Tapping jdxcode/tap
Cloning into '/opt/homebrew/Library/Taps/jdxcode/homebrew-tap'...
Username for 'https://github.com':

cargo-binstall type error

Thanks for the tip about cargo-binstall, seems like a great alternative to wasting all the time rebuilding everything from scratch!

However, I couldn't use it with your project. After manually downloading the prebuilt cargo-binstall binary and simply cloning your project, then trying to run cargo binstall rtx-cli from your project's root on a macOS I get the following error:

cargo binstall rtx-cli
 INFO resolve: Resolving package: 'rtx-cli'
ERROR Fatal error:

  × For crate rtx-cli: invalid type: string "rtx/bin/rtx", expected struct PkgOverride for key `package.metadata.binstall.overrides.bin-dir` at line 49
  │ column 11
  ├─▶ invalid type: string "rtx/bin/rtx", expected struct PkgOverride for key `package.metadata.binstall.overrides.bin-dir` at line 49 column 11
  ╰─▶ invalid type: string "rtx/bin/rtx", expected struct PkgOverride for key `package.metadata.binstall.overrides.bin-dir` at line 49 column 11

I see that your Cargo.toml has

[package.metadata.binstall.overrides]
bin-dir = "rtx/bin/rtx"

(though it's not on line 49, but maybe the crate.io version is different?)
Tried changing it, but it has no effect (likely for the same reason)

hook-env should show unload message

direnv shows messages like this which I think are useful:

~ ❯ cd ..
direnv: unloading
/Users ❯ cd
direnv: loading ~/.envrc
direnv: export +RTX_DATA_DIR +RTX_LOG_FILE +RTX_LOG_FILE_LEVEL ~PATH

Currently we only show this (and nothing on unload):

We may or may not want this to be the default. For us, we would probably want to display not just the top-level config file, but all of them. That may be a lot of output. This could be a part of rtx activate --verbose or something.

If for no other reason, this would be useful for me trying to fix issues like #8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.