11 ms·
Asdf – An Extendable Version Manager
- Mathnerd314 6y ago"Please head over the documentation site" is a link back to the site. The ballad links to an old repo (fortunately Github redirects it) The all-plugins page 404's. After giving up on the website I look at the code. It's a shell script. Wonderful. I'll stick with Nix any day. Or maybe conda.
- vages 6y agoThe all-plugins page works fine for me, and is no Shell script: https://asdf-vm.com/#/plugins-all https://asdf-vm.com/#/plugins-all
- viraptor 6y agoAre you browsing with JS turned off? (The page does some JS tricks)
- Mathnerd314 6y agoIndeed, JS was off as it usually is.
- kemayo 6y agoDo you have JS enabled? It does seem to be one of those pointlessly-JS SPAs. (Yes, I'm judging them for this choice.)
- xfer 6y agoYeah considering it doesn't work on windows, the more general tool nix, which has good integration with direnv works very well.
- marius_k 6y agoYes. My experience with nix-shell[0] is very smooth so far. [0] https://nixos.wiki/wiki/Development_environment_with_nix-shell https://nixos.wiki/wiki/Development_environment_with_nix-she...
- iFreilicht 6y agoI wanted to see what the differences between asdf and nix were, and found a pretty lengthy article[1] that explained it quite well in the first few paragraphs. asdf is better than nothing, and better than multiple version managers for each language in one project, but it is a far cry from the portability and reliability of nix. If you wanna do something quickly to ease the pain of version management, asdf is there, helpful, and ergonomic. But if you want to make version management an issue of the past and fix it for good, nix is the way to go. So they both have their use. nix just feels more proper.
- followben 6y agoI'd be interested in that article - be great if you could re-up the footnote :)
- iFreilicht 6y agoOh damnit, completely forgot. Seems like I can’t edit my comment anymore, so here you go: https://ejpcmac.net/blog/about-using-nix-in-my-development-workflow/ https://ejpcmac.net/blog/about-using-nix-in-my-development-w...
- pmontra 6y agoI've been using it since 2017 for an Elixir/Phoenix backend, React frontend and PostgreSQL database. It works very well and spares me from having to use three language managers (one for Elixir, one for Erlang and one for JS) plus a docker container for PostgreSQL. I was pleasantly surprised that it manages the database too.
- dceddia 6y agoMind elaborating on how it manages the database? That sounds useful! Does it install and run the db for you or something?
- styluss 6y agoIt manages the version of the database that you run. https://github.com/smashedtoatoms/asdf-postgres https://github.com/smashedtoatoms/asdf-postgres
- sgerrand 6y agoI'm assuming the author was referring to this plugin: https://github.com/smashedtoatoms/asdf-postgres https://github.com/smashedtoatoms/asdf-postgres
- pmontra 6y agoSibling answers link to the plugin with the details. The general idea is that it installs the binaries and the data into a subdirectory of ~/.asdf, then sets PATH and the other environment variables to point to there. Then pg_ctl start starts the database. Each project has its own .tool_versions file so you can have different versions of the same database running in parallel. I was doing that with docker containers but this is easier.
- pavel_lishin 6y agoMy install of asdf at some point broke so badly, I could not get anything to run. I wish I remembered the exact trouble, but it was bad enough that I just un-installed it in favor of `nvm` for node versioning, and never looked back.
- nescioquid 6y agoNot the ASDF (https://common-lisp.net/project/asdf/ https://common-lisp.net/project/asdf/) I was expecting.
- dj_mc_merlin 6y agoLooking up documentation when you have build problems in CL is now very hard. It was already very hard however, so no big deal.
- Snarwin 6y agoNot the Advanced Scientific Data Format either. https://github.com/asdf-format/asdf https://github.com/asdf-format/asdf
- JasonFruit 6y agoNeither that ASDF, nor that kind of VM, despite the URL.
- samatman 6y agoYeah I'm not usually a "hey there's another project with that name" kinda guy but, build manager and version manager? Isn't there some other part of the keyboard they could have mashed?
- nathell 6y agoSure there is. One of the proposed successors to ASDF the Common Lisp package manager is XCVB (https://common-lisp.net/project/xcvb/ https://common-lisp.net/project/xcvb/), the eXtensible Component Verifier and Builder.
- cstml 6y agoWhy is there no common place where people can see names that have been used already? It could make us avoid such nuissance.
- 6y ago
- sergiotapia 6y agoasdf makes my life so much easier seriously, it's amazing. Try it! I have a .tool-versions file in code repo that lists what I need for a project. elixir 1.2.3 erlang 1.2.3 nodejs 1.2.3 Whenever I `cd` into the folder, asdf automatically uses the right versions for me. I don't have to worry about anything. Razer sharp scalpel of a tool.
- nikolay 6y agoThe only issue is (was?) that you need to preinstall these unless this has changed in the past year. When I integrated it with direnv [0], I made the missing ones autoinstall. [0]: https://direnv.net/ https://direnv.net/
- sergiotapia 6y agoCorrect, you must have them installed so the `cd` into the directory auto switches. But that's a simple `asdf install elixir 1.2.3` boom you're set
- richjdsmith 6y agoCouldn't agree more. asdf has made working across multiple computers and projects dead simple.
- pensatoio 6y ago:heavyplus: .tool-versions means everyone on the team knows which version(s) to use for a project, for anything outside of docker. Auto-install is an awesome feature, too.
- vages 6y agoMy team is using this, and I have no complaints about it.
- nikolay 6y agoI've been using it and has contributed to it, but I wish it supported out of the box GitHub-based release binaries as 90% of my code for different vendors was relatively the same, so, instead of having multiple identical repositories, I created one, which uses introspection [0]. I wish this was available out of the box to handle literary 90% of the tools. Also, I typically pair it with direnv [1] for even more magic. [0]: https://github.com/Banno/asdf-hashicorp https://github.com/Banno/asdf-hashicorp [1]: https://direnv.net/ https://direnv.net/
- burlesona 6y agoThanks for sharing direnv, I didn’t know about that but I’ve wished for it before. Great find :)
- nikolay 6y agoIt's a gem, really.
- fiddlerwoaroof 6y agoI use nix/direnv/lorri to manage all my projects. It’s easily the best def experience, once you get over the learning curve for nix.
- ahawkins 6y agoThank you for asdf-hashicorp. We use it at Skillshare.
- nikolay 6y agoThank you! It's nothing special.
- mwudka1 6y agoThank you for asdf-hashicorp. We use it at HashiCorp.
- 6y ago
- burlesona 6y agoSmart that it’s based on rbenv and the many spin-offs (pyenv, nodenv etc). The name is off putting to me though, because it’s meaningless. Maybe I could alias it to something like xenv and pretend it didn’t bother me.
- 1123581321 6y agoNo way! asdf is full of vast meaning. :) http://asdf.com/whatisasdf.html http://asdf.com/whatisasdf.html
- cheph 6y agoConan (https://conan.io/ https://conan.io/) can do the same thing, and I think it is quite a lot more versatile at doing things like that.
- amrox 6y agoI know that Conan claims to be a generic packager and tool manager (https://docs.conan.io/en/latest/howtos/other_languages_package_manager.html https://docs.conan.io/en/latest/howtos/other_languages_packa...) but is anyone using it for that? asdf seems like it has much wider support
- rmsaksida 6y agoI've been using it for Ruby and Node.js for years and never had issues with it. Great tool.
- TheRealPomax 6y agoWould be nice if, instead of a poem, the main page showed a representative example so folks can get an impression of what it's actually like.
- maqbool 6y agosimple and straight forward using this for a while now for BEAM.
- deleted 6y ago[deleted]
- koolk3ychain 6y agoAsdf is fantastic for forcing versions of elixir, especially since no native version control exists for the elixir vm itself. Tools like this are developer friendly and also easy to introduce and share - I've had nothing but fantastic experiences with Asdf.
- rdtsc 6y agoI am using it for python, erlang, elixir and nodejs. It works great on MacOS so far. I used to use a mix of homebrew versions of those tools and some language-specific install scripts like kerl or pyenv. One of my favorite things is to quickly start a new shell with a specific version to test something: 'asdf shell python $ver'. I did try direnv as others mentioned here, but I found it a bit too magical and eventually abandoned it.
- mamcx 6y agoSo, this in contrast to docker? Is this for development or for deployment?
- momothereal 6y agoIt's for switching versions of your local CLI tools quickly. > asdf is a CLI tool that can manage multiple language runtime versions on a per-project basis. It is like gvm, nvm, rbenv & pyenv (and more) all in one! Simply install your language’s plugin! For example: $ asdf global python 3.6.2 $ python -V Python 3.6.2 $ asdf local python 3.9.1 $ python -V Python 3.9.1 "asdf local" stores the version to use for the current directory across shells, which is neat. "shell" is for the current session, and "global" is for the system. The supported CLI tools is extendable via plugins: https://asdf-vm.com/#/plugins-all https://asdf-vm.com/#/plugins-all
- e12e 6y agoNo, it's one system to have in your shell rc - that does the work of nvm, pyenv, rbenv etc. Main benefit is you no longer need N half-baked utilities fighting over your path and shell completions, just asdf. And plug-ins mostly re-use other tools, so it's both simple to set up and mostly avoids duplicating effort.
- rgoulter 6y agoYeah, looks this would be an alternative to setting up a development environment with Docker or a VM or whatever.
- bismark 6y agoMy greatest asdf wish (well, I guess not greatest since I've never taken the time to submit a patch...) is for supporting pre-compiled Erlang (see https://github.com/asdf-vm/asdf-erlang/issues/120 https://github.com/asdf-vm/asdf-erlang/issues/120). It's often an adventure getting the whole team updated whenever we bump our Erlang version.
- vlunkr 6y agoWe started using this for elixir/erlang and quickly replaced all the other version managers company-wide. The only issue we've really had is that sometimes people don't understand reshim and when they need to do it.
- whitepoplar 6y agoWhen does one need to use reshim?
- b0afc375b5 6y agoIn my experience, after installing a version of nodejs, whenever I install a global npm package I have to manually reshim (`asdf reshim nodejs`) so that bash will be able to locate it in $PATH.
- tareqak 6y agoCould this tool be used to create a meant a software bill of materials, or is there more work needed for that effort? > A bill of materials or product structure (sometimes bill of material, BOM or associated list) is a list of the raw materials, sub-assemblies, intermediate assemblies, sub-components, parts, and the quantities of each needed to manufacture an end product. [0] [0] https://en.wikipedia.org/wiki/Bill_of_materials https://en.wikipedia.org/wiki/Bill_of_materials
- gangstead 6y agoI've had mostly good experience with asdf except last month when I tried to get it working on an m1 Mac. Eventually gave up and just brew installed everything (erlang, elixir, nodejs, java. New work laptop that only needed one version of everything for now). There's an open issue on the project for support. Later on I ran into still more problems on the m1 and convinced a project manager to take it and got an Intel Mac instead and back to blissful working asdf.
- forix 6y agoBeen using it for kubectl, kops, terraform, and a few others. It's really great!
- SingAlong 6y agoI just woke up to find this thread on home page and read all the comments. Thank you for the feedback. I’ll ping the team to let them know about this thread. The plugins were kept as separate repos - like Heroku Buildpacks, because I never had the time to vet/review them. I had written plugins for Ruby, Node.js, Erlang and Elixir because those are the ones I wanted. I did not expect the project to be active this long or have these many contributors, maintainers and users. We’ll bring back the readme in the repo with usage instructions. P.S: Author here. Not an active maintainer except helping clean issues
- DanielKehoe 6y agoIt's growing in popularity in the Rails community (probably because Rails now requires both Ruby and Node). Previously I recommended chruby in my installation guide for Ruby [0] and Rails [1], but after doing an informal survey of Rails users, I now show how to use asdf. [0]: [https://mac.install.guide/ruby/index.html https://mac.install.guide/ruby/index.html] [1]: [https://learn-rails.com/install-rails-mac/index.html https://learn-rails.com/install-rails-mac/index.html]
- DanielKehoe 6y agoActually I should add, I wrote a bit more nuanced recommendation in the installation guide. I say: Install with Homebrew if you’re building only one project with Ruby (especially if you are a student learning Ruby). If you’re a solo developer and you're juggling multiple projects that can't be updated all at once, use asdf or chruby or rbenv. Choose asdf if you're using multiple languages such as Ruby, Node, and Python; otherwise chruby or rbenv are fine for just managing Ruby versions. Finally, use Docker or Nix if you’re on a team with a complex project environment (for example, Ruby, Node, Redis, and PostgreSQL all in one project).
- pensatoio 6y agoI use asdf for python, golang, and hashicorp tools. Having a single tool instead of a separate "env"/"vm" tool for each new thing is fantastic.
- jaxn 6y agoDoes anyone know a good way for asdf to inform which versions are installed in container? I feel like I keep having to hack together ways to do the same thing when building containers for apps build with asdf. (Github actions, dockerfile, heroku, etc)
- pensatoio 6y agoI don't think using asdf in your container builds is a good idea tbh. You should pin your container to a specific version, or perhaps set the base image version by parsing the .tool-version file.
- jaxn 6y agoYeah, I didn't write that clearly. We have this great .tool-versions file defining the version of ruby, node, yarn, etc. It's great. Then we setup github actions to run linting/tests/etc, and we have to define those same versions either explicitly in the .yml or via some hacky shell commands to pull version info into a RUN curl... It would be great if there was a little more standardization around language versions. Or maybe there is a secret convention that I just haven't heard of yet.
- desmap 6y agoTried asdf few months ago but couldn't get warm with it. Went back to nvm for node and just venv/ for Python. Anyone went back too and if yes, why? Thinking of giving it another try.
- crymer11 6y agoYes. I tried it, ended up writing my own node version manager inspired by chruby, then went back to asdf and have been so glad I made the switch back. It's performant, it makes it easy to manage all the things where I care about using a specific version so easy, and the maintainers are super responsive and engaged.
- desmap 6y agoFWIW and a note to myself before I check it out a third time: I just checked it a second time and recall now what was turning me off: I found the installation of the node plugin and node super tedious and too much overhead[1], it's just once but yeah, didn't like the the UX (eg reshim), then asdf always forgot my current node version and finally, I was missing a quick ls command for checking out installed node versions and versions/lts-versions available remotely (nvm ls and ls-remote ) without having to checkout the node website or repo. I cannot speak for other languages but I found it for node rather a bigger step back and for stuff like Mongo—it's in their plugins!—I just use Docker, IDK but asdf feels just wrong for things like Mongo. I usually use node also from the node Docker image and have node versions only locally installed for stuff like coc-vim or when quickly needing the node REPL but anything serious runs in a container with a volume mapped to the project folder. So, I guess it's rather for languages that do not have a proper version manager and/or folks not into containerization. [1] https://github.com/asdf-vm/asdf-nodejs https://github.com/asdf-vm/asdf-nodejs
- leipert 6y agoWe use it at GitLab since a few months in order to manage our development toolchain [0]. Before we had people using rvm, rbenv, nvm, homebrew, system packages and everything in between. Supporting our engineers and non-engineers has been a lot easier since asdf, and the whole version manager related issues calmed down a bit. The only thing I miss from homebrew is the pre-compiled stuff like e.g. Postgres or redis [0]: https://gitlab.com/gitlab-org/gitlab-development-kit/-/merge_requests/1330 https://gitlab.com/gitlab-org/gitlab-development-kit/-/merge...
- devoutsalsa 6y agoFor Postgres & Redis version management, have you seen DBngin? It supports MySQL, too. https://github.com/TablePlus/DBngin https://github.com/TablePlus/DBngin
- leipert 6y agoLooks nice, but we’d still need to support Linux too. And CLI for the win! Eventually moving our Postgres, Redis, etc. to docker is also a solution. Unfortunately node and ruby take a performance hit if you mount them into containers and update loads of files.
- iFreilicht 6y agoHave you used or considered nix before? I’m looking into both right now and wonder what the advantage of asdf is, as nix seems to be the more robust option.
- leipert 6y agoI think we have looked into Nix briefly. It seems great. I wonder how well it works cross-platform or if it forces us to either maintain a Darwin and Linux version, or using the Linux version in a VM.
- iFreilicht 6y agoThe whole idea seems to be that you don’t need to care about the platform. You use the same .nix file to start a shell with a custom environment on Linux, Darwin and Windows WSL. Even aarch64 is fully supported and all binary packages are built for it as well, so even on the M1 Macs it should just work. Granted, I didn’t try any of this yet, but the more I read about it, the more I want to. You can even build docker images from the .nix file so the CI/CD pipeline will have the exact same environment as all the dev machines.
- pgt 6y agoAs a Colemak user, where do I submit a PR to rename this project to Arst? For usability sake.
- mekster 6y agoAre you kidding to change the name for some niche users? Use alias. Although I don't like the name as well as it's only easy to type but nothing really meaningful.
- dwdz 6y agoThe webpage doesn't load with JS disabled, and when you enable it, it just displays a bunch of text and some hyperlinks. This is beyond ridiculous.
- haar 6y agoI introduced ASDF at the company I currently work at and it spread like wildfire to every team. Having a single version manager that manages the versions for numerous tools across different teams has been invaluable.
- dustfinger 6y agoIf you are interested in an extensible distribution independent package manager, then you might be interested in Guix: https://guix.gnu.org/manual/en/html_node/Package-Management.html https://guix.gnu.org/manual/en/html_node/Package-Management....
- AlchemistCamp 6y agoASDF is great. I've been using it for four years now with no real complaints. It's made collaboration with contractors much easier to just be able to drop a .tool-versions file into a project and know that regardless of what OS each of us are on, we'll have the same language versions.
- KSteffensen 6y agoSo how does this tool compare to module[0]? [0]: https://modules.readthedocs.io/en/latest/module.html https://modules.readthedocs.io/en/latest/module.html
- 4b11b4 6y agoUsed this recently for installing Erlang and Elixir on my Debian system where apt was out of date.