https://github.com/nodenv/nodenv-aliases
Create aliases for nodenv Node versions
https://github.com/nodenv/nodenv-aliases
hacktoberfest
Last synced: 8 months ago
JSON representation
Create aliases for nodenv Node versions
- Host: GitHub
- URL: https://github.com/nodenv/nodenv-aliases
- Owner: nodenv
- License: mit
- Created: 2015-06-05T01:38:16.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2025-02-01T11:55:45.000Z (over 1 year ago)
- Last Synced: 2025-05-07T04:08:34.745Z (about 1 year ago)
- Topics: hacktoberfest
- Language: Shell
- Homepage:
- Size: 263 KB
- Stars: 39
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nodenv-aliases
A [nodenv][] plugin to create and manage aliases for Node versions.
[](https://github.com/nodenv/nodenv-aliases/actions/workflows/test.yml)
[](https://github.com/nodenv/nodenv-aliases/releases/latest)
[![Latest Homebrew Release]()](https://github.com/nodenv/homebrew-nodenv/blob/main/Formula/nodenv-aliases.rb)
[](https://www.npmjs.com/package/@nodenv/nodenv-aliases/v/latest)
Invoke `nodenv alias ` to make a symbolic link from `` to
`` in the [nodenv][] versions directory, effectively creating an
alias. The cool part is that if you pass in a major or major.minor release as the name, you
can give `--auto` to link to the latest installed minor or patch level (respectively). For example,
`nodenv alias 4.4 --auto` will automatically create an alias from `4.4` to
`4.4.7` (or to whatever is the most recent version you have installed). Similarly,
`nodenv alias 6 --auto` will automatically create an alias from `6` to
`6.10.3` (or to whatever is the most recent version you have installed).
Plus, if you're using [node-build][], `nodenv install major.minor.patch`
automatically invokes `nodenv alias major --auto` and
`nodenv alias major.minor --auto`, so you'll always have
up to date aliases.
- [Installation](#installation)
- [Usage](#usage)
- [Credits](#credits)
## Installation
git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases
## Usage
Create a `major` and `major.minor` alias for each installed major and minor release:
nodenv alias --auto
Create a `major` alias for the highest major release of, say 6:
nodenv alias 6 --auto
Create a `major.minor` alias for the highest minor release of, say 0.8:
nodenv alias 0.8 --auto
Create a `major.minor.patch-pre` alias for the highest prerelease of, say 8:
nodenv alias 8.0.0-rc --auto
Create a named alias for a specific release:
nodenv alias boron 6
Remove an alias:
nodenv unalias
or
nodenv alias --remove
## Credits
Forked from [Tim Pope][tpope]'s [rbenv-aliases][] by [Jason Karns][jasonkarns] and modified for nodenv.
[nodenv]: https://github.com/nodenv/nodenv
[node-build]: https://github.com/nodenv/node-build
[rbenv-aliases]: https://github.com/tpope/rbenv-aliases
[tpope]: https://github.com/tpope
[jasonkarns]: https://github.com/jasonkarns