Code Monkey home page Code Monkey logo

nuse's Introduction

n-use (nuse)

Node.js version switcher / manager for Windows.

It finds and downloads the latest version according to specified version.
The last used node is persisted to env, so a new cmd will inherit it automatically.
Current cmd will keep its own version (if set) or will use the version set in env.
Different cmd instances can use different node versions.
Unlike similar tools, this:

  • allows node code-names and matching semver (see #use section)
  • updates the matched version if a newer build is published

Prerequisites

Windows 10 x64 (build 17063+) or Windows 11 x64

Install

  1. download main script
    • latest version (main): curl https://raw.githubusercontent.com/vallyian/nuse/main/nuse.bat -o nuse.bat
    • specific version (tag): curl https://raw.githubusercontent.com/vallyian/nuse/1.3.0/nuse.bat -o nuse.bat
    • specific SHA: curl https://raw.githubusercontent.com/vallyian/nuse/be91101c99fe11bfa1c156e5f2a89fad3093529f/nuse.bat -o nuse.bat (immutable commit, if security is very important to you)
  2. (recommended) inspect the downloaded script before executing first time
  3. nuse wanted-version (ie nuse 18)

Use

nuse number | semver | code-name | -v | -h [debugger]

where:

  • number: node "major version" (e.g. 16)
  • semver: node "semver" (e.g. 16.9 or 16.9.1)
  • code-name: node "code-name" (e.g. gallium or hydrogen)
  • -v: prints the current node and npm versions
  • -h: echoes back the usage
  • debugger: outputs debug messages if value is "true" (defaults to false)

Examples

  • nuse 16 => v16.9.1
  • nuse 16.9 => v16.9.1
  • nuse 16.8 => v16.8.0
  • nuse 16.8.0 => v16.8.0
  • nuse gallium => v16.9.1
  • nuse 16.42.42 => version not found

nuse's People

Contributors

vallyian avatar

Stargazers

 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.