Code Monkey home page Code Monkey logo

asdf-demo's Introduction

asdf-demo

What is asdf?

asdf1 is a tool version manager.

All tool version definitions are contained within one file (.tool-versions2) which you can check in to your project's Git repository to share with your team.

Why use asdf?

asdf

  • ensures teams are using the exact same versions of tools (for each project)
  • supports Github Actions (you can use the same configuration for local dev machine and CI/CD workflows)
  • support for many tools via a plugin system3
  • is simple (it's a single Shell script you include in your Shell config)

Getting started

  • Install asdf core4: official guide5

  • Install asdf plugins & the tools for each project

    • For each of the projects, e.g. node-19, node-20

      • "Install" asdf plugins6 for tools defined in .tool-versions

        cat .tool-versions | awk '{print $1}' | xargs -I _ asdf plugin add _

        [!IMPORTANT] You need to "install" plugin for a tool, before using asdf to install a version of that tool.

        e.g.

        asdf plugin add node

        [!TIP] Plugins are how asdf knows to handle different tools like Node.js, Ruby, ...

    • For each of the tool, install the version defined in .tool-versions

    asdf install

    [!TIP] In asdf words, asdf install "Installs all the package versions listed in the .tool-versions file"

  • Confirm that for each project, the correct version of tool is invoked

    cd node-19
    node -v       # Should be v19.0.0
    cd ../node-20 #
    node -v       # Should be v20.0.0
    cd kubectl-1.28.3
    kubectl version      # Client Version: v1.28.3
    cd ../kubectl-1.29.4 #
    kubectl version      # Client Version: v1.29.4

Caution

A completions that match a version of a tool is still an unsolved problem7.

Footnotes

  1. https://asdf-vm.com/

  2. https://asdf-vm.com/manage/configuration.html#tool-versions

  3. https://github.com/asdf-community

  4. https://asdf-vm.com/manage/core.html

  5. https://asdf-vm.com/guide/getting-started.html

  6. https://asdf-vm.com/manage/plugins.html

  7. Support command completions from installed tools - Issue #752

asdf-demo's People

Contributors

lethang7794 avatar

Watchers

 avatar

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.