{"id":20235089,"url":"https://github.com/ajnasz/znvm","last_synced_at":"2025-04-10T18:52:26.693Z","repository":{"id":66854983,"uuid":"240867609","full_name":"Ajnasz/znvm","owner":"Ajnasz","description":"Nodejs version managment for zsh","archived":false,"fork":false,"pushed_at":"2025-01-16T18:44:14.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:39:55.604Z","etag":null,"topics":["node-version-manager","nodejs","nvm","plugin","version-manager","znvm","zsh","zsh-plugin"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ajnasz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-16T09:55:08.000Z","updated_at":"2025-01-16T18:44:15.000Z","dependencies_parsed_at":"2024-04-16T14:36:32.113Z","dependency_job_id":"55a16a4c-c164-4fea-88bd-cd1de1e02133","html_url":"https://github.com/Ajnasz/znvm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fznvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fznvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fznvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fznvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajnasz","download_url":"https://codeload.github.com/Ajnasz/znvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248274716,"owners_count":21076458,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-version-manager","nodejs","nvm","plugin","version-manager","znvm","zsh","zsh-plugin"],"created_at":"2024-11-14T08:14:35.407Z","updated_at":"2025-04-10T18:52:26.684Z","avatar_url":"https://github.com/Ajnasz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ZNVM: Nodejs Version Manager for ZSH\n\nSimilar to [nvm-sh](https://github.com/nvm-sh/nvm) but meant to be faster (on startup at least).\n\n## Features\n\n- Install nodejs versions\n- Use nodejs version defined in `.nvmrc`, `.znvmrc` or `Dockerfile`\n  - To automatically use the version add `znvm hookwdchange` to your `.zshrc`\n- Aliases for nodejs versions: for example `default` can be an alias for `v12`\n- Support of closest version:\n  - if a certain version is not installed, it will try to find the closest version and will choose the newest one\n    for example if you try to use `v10.0.0` but you don't have it installed, it will use `v10.24.0` if you have it installed\n- Autocompletion for znvm commands\n- Load default nodejs version on shell startup\n\n## Install\n\n### Dependencies\n\nYou shell must be [zsh](https://www.zsh.org/)\n\nThe following commands also needed for operation:\n- `curl`\n- `awk`\n- `tail`\n- `head`\n- `cut`\n- `sort`\n- `uniq`\n\n### General installation\n\n```\ngit clone https://github.com/Ajnasz/znvm $HOME/src/znvm\n```\n\nEdit you .zshrc and the following line to enable the plugin:\n\n```bash\n# enable znvm plugin\n. $HOME/src/znvm/znvm.plugin.zsh\n# enable autocompletion for znvm\nfpath+=$HOME/src/znvm\n# load default nodejs version\n# but only if it's not set (for example it will be set if you use tmux)\n# remove the if statement if you want to make sure the default version used in a new shell\nif ! znvm current \u003e /dev/null\nthen\n\tznvm use default\nfi\n# load version defined in .nvmrc\nznvm hookwdchange\n```\n\n### Install in oh-my-zsh\n\n```bash\ncd $ZSH\ngit submodule add https://github.com/Ajnasz/znvm custom/plugins/znvm\n```\n\n### Install in [zgenom](https://github.com/jandamm/zgenom)\n\nAdd `zgenom load Ajnasz/znvm` in your `.zshrc` with your other `zgenom load` commands.\n\n#### Enable the `znvm` plugin in your `.zshrc`.\n\n[How to enable plugins in oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh#plugins)\n\n### Load default nodejs version\n\n```bash\n# load default nodejs version\nznvm use default\n# load version defined in .nvmrc\nznvm hookwdchange\n```\n\n## Configuration\n\nThe `ZNVM_DIR` environment variable, default value is `$HOME/.znvm`\n\n```\nZNVM_DIR=\"$HOME/.znvm\"\n```\n\nThe `ZNVM_SEARCH_FILENAMES` environment variable is a list of filenames (separated by space) znvm will look for whenever it executes the `chpwd` hook listener. Default value is `.znvmrc .nvmrc Dockerfile`\n\nTo disable Dockerfile read remove it from the list:\n\n```\nZNVM_SEARCH_FILENAMES=\".znvmrc .nvmrc\"\n```\n## Usage\n\n### Install a nodejs version\n\nTo install the latest nodejs v12:\n\n```bash\nznvm install v12\n```\n\nTo install nodejs v8.1.1\n\n```bash\nznvm install v8.1.1\n```\n\n### Create or update an alias\n\n```bash\nznvm alias default v12\n```\n\n### Load a version\n\n```bash\nznvm use v12\n```\n\nUse a default version\n\n```bash\nznvm use default\n```\n\n### Auto use from `.znvmrc`, `.nvmrc` or `Dockerfile` files\n\nAdd the following line to the .zshrc\n\n```bash\nznvm hookwdchange\n```\n\nThe hook will traverse directory structure upwards from the current directory looking for the files defined in `$ZNVM_SEARCH_FILENAMES` every time you change directory.\n\nThat will add a hook, which executes every time you change directory. The hook listener will search `.znvmrc`, `.nvmrc` and `Dockerfile` in the directory you entered to. If no file found, it will try to find it in the parent directory until it reaches the root directory.\n\nWhen it searches in a `Dockerfile`, it will try to extract the version number from `FROM node:` line.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajnasz%2Fznvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajnasz%2Fznvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajnasz%2Fznvm/lists"}