{"id":13395495,"url":"https://github.com/Schniz/fnm","last_synced_at":"2025-03-13T21:31:40.296Z","repository":{"id":37470257,"uuid":"166045424","full_name":"Schniz/fnm","owner":"Schniz","description":"🚀 Fast and simple Node.js version manager, built in Rust","archived":false,"fork":false,"pushed_at":"2025-01-06T01:41:50.000Z","size":4167,"stargazers_count":18888,"open_issues_count":272,"forks_count":481,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-01-06T17:30:31.404Z","etag":null,"topics":["hacktoberfest","javascript","nodejs","nvm","reasonml","version"],"latest_commit_sha":null,"homepage":"https://fnm.vercel.app","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Schniz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-01-16T13:32:14.000Z","updated_at":"2025-01-06T16:57:22.000Z","dependencies_parsed_at":"2022-07-13T10:50:32.991Z","dependency_job_id":"8d8cd762-22f3-4d6e-9c92-b67c532aba5f","html_url":"https://github.com/Schniz/fnm","commit_stats":{"total_commits":717,"total_committers":102,"mean_commits":7.029411764705882,"dds":0.5690376569037656,"last_synced_commit":"439964440d80d72f7b09ae947471da70d1f8fca2"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schniz%2Ffnm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schniz%2Ffnm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schniz%2Ffnm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schniz%2Ffnm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schniz","download_url":"https://codeload.github.com/Schniz/fnm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243485537,"owners_count":20298350,"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":["hacktoberfest","javascript","nodejs","nvm","reasonml","version"],"created_at":"2024-07-30T17:02:02.376Z","updated_at":"2025-03-13T21:31:40.287Z","avatar_url":"https://github.com/Schniz.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003e\n  Fast Node Manager (\u003ccode\u003efnm\u003c/code\u003e)\n  \u003cimg alt=\"Amount of downloads\" src=\"https://img.shields.io/github/downloads/Schniz/fnm/total.svg?style=flat\" /\u003e\n  \u003ca href=\"https://github.com/Schniz/fnm/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/Schniz/fnm/rust.yml?branch=master\u0026label=workflow\" alt=\"GitHub Actions workflow status\" /\u003e\u003c/a\u003e\n\u003c/h1\u003e\n\n\u003e 🚀 Fast and simple Node.js version manager, built in Rust\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./docs/fnm.svg\" alt=\"Blazing fast!\"\u003e\n\u003c/div\u003e\n\n## Features\n\n🌎 Cross-platform support (macOS, Windows, Linux)\n\n✨ Single file, easy installation, instant startup\n\n🚀 Built with speed in mind\n\n📂 Works with `.node-version` and `.nvmrc` files\n\n## Installation\n\n### Using a script (macOS/Linux)\n\nFor `bash`, `zsh` and `fish` shells, there's an [automatic installation script](./.ci/install.sh).\n\nFirst ensure that `curl` and `unzip` are already installed on you operating system. Then execute:\n\n```sh\ncurl -fsSL https://fnm.vercel.app/install | bash\n```\n\n#### Upgrade\n\nOn macOS, it is as simple as `brew upgrade fnm`.\n\nOn other operating systems, upgrading `fnm` is almost the same as installing it. To prevent duplication in your shell config file, pass `--skip-shell` to the install command:\n\n```sh\ncurl -fsSL https://fnm.vercel.app/install | bash -s -- --skip-shell\n```\n\n#### Parameters\n\n`--install-dir`\n\nSet a custom directory for fnm to be installed. The default is `$XDG_DATA_HOME/fnm` (if `$XDG_DATA_HOME` is not defined it falls back to `$HOME/.local/share/fnm` on linux and `$HOME/Library/Application Support/fnm` on MacOS).\n\n`--skip-shell`\n\nSkip appending shell specific loader to shell config file, based on the current user shell, defined in `$SHELL`. e.g. for Bash, `$HOME/.bashrc`. `$HOME/.zshrc` for Zsh. For Fish - `$HOME/.config/fish/conf.d/fnm.fish`\n\n`--force-install`\n\nmacOS installations using the installation script are deprecated in favor of the Homebrew formula, but this forces the script to install using it anyway.\n\nExample:\n\n```sh\ncurl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir \"./.fnm\" --skip-shell\n```\n\n### Manually\n\n#### Using Homebrew (macOS/Linux)\n\n```sh\nbrew install fnm\n```\n\nThen, [set up your shell for fnm](#shell-setup)\n\n#### Using Winget (Windows)\n\n```sh\nwinget install Schniz.fnm\n```\n\n#### Using Scoop (Windows)\n\n```sh\nscoop install fnm\n```\n\nThen, [set up your shell for fnm](#shell-setup)\n\n#### Using Chocolatey (Windows)\n\n```sh\nchoco install fnm\n```\n\nThen, [set up your shell for fnm](#shell-setup)\n\n#### Using Cargo (Linux/macOS/Windows)\n\n```sh\ncargo install fnm\n```\n\nThen, [set up your shell for fnm](#shell-setup)\n\n#### Using a release binary (Linux/macOS/Windows)\n\n- Download the [latest release binary](https://github.com/Schniz/fnm/releases) for your system\n- Make it available globally on `PATH` environment variable\n- [Set up your shell for fnm](#shell-setup)\n\n### Removing\n\nTo remove fnm (😢), just delete the `.fnm` folder in your home directory. You should also edit your shell configuration to remove any references to fnm (ie. read [Shell Setup](#shell-setup), and do the opposite).\n\n## Completions\n\nfnm ships its completions with the binary:\n\n```sh\nfnm completions --shell \u003cSHELL\u003e\n```\n\nWhere `\u003cSHELL\u003e` can be one of the supported shells:\n\n- `bash`\n- `zsh`\n- `fish`\n- `powershell`\n\nPlease follow your shell instructions to install them.\n\n### Shell Setup\n\nEnvironment variables need to be setup before you can start using fnm.\nThis is done by evaluating the output of `fnm env`.\n\n\u003e [!NOTE]\n\u003e Check out the [Configuration](./docs/configuration.md) section to enable highly\n\u003e recommended features, like automatic version switching.\n\nAdding a `.node-version` to your project is as simple as:\n\n```bash\n$ node --version\nv14.18.3\n$ node --version \u003e .node-version\n```\n\nCheck out the following guides for the shell you use:\n\n#### Bash\n\nAdd the following to your `.bashrc` profile:\n\n```bash\neval \"$(fnm env --use-on-cd --shell bash)\"\n```\n\n#### Zsh\n\nAdd the following to your `.zshrc` profile:\n\n```zsh\neval \"$(fnm env --use-on-cd --shell zsh)\"\n```\n\n#### Fish shell\n\nCreate `~/.config/fish/conf.d/fnm.fish` and add this line to it:\n\n```fish\nfnm env --use-on-cd --shell fish | source\n```\n\n#### PowerShell\n\nAdd the following to the end of your profile file:\n\n```powershell\nfnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression\n```\n\n- For macOS/Linux, the profile is located at `~/.config/powershell/Microsoft.PowerShell_profile.ps1`\n- For Windows location is either:\n  - `%userprofile%\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1` Powershell 5\n  - `%userprofile%\\Documents\\PowerShell\\Microsoft.PowerShell_profile.ps1` Powershell 6+\n- To create the profile file you can run this in PowerShell:\n  ```powershell\n  if (-not (Test-Path $profile)) { New-Item $profile -Force }\n  ```\n- To edit your profile run this in PowerShell:\n  ```powershell\n  Invoke-Item $profile\n  ```\n\n#### Windows Command Prompt aka Batch aka WinCMD\n\nfnm is also supported but is not entirely covered. You can set up a startup script for [cmd.exe]( https://superuser.com/a/144348) or [Windows Terminal](https://superuser.com/a/1855283) and append the following lines:\n\n```batch\n@echo off\n:: for /F will launch a new instance of cmd so we create a guard to prevent an infnite loop\nif not defined FNM_AUTORUN_GUARD (\n    set \"FNM_AUTORUN_GUARD=AutorunGuard\"\n    FOR /f \"tokens=*\" %%z IN ('fnm env --use-on-cd') DO CALL %%z\n)\n```\n\n#### Usage with Cmder\n\nUsage is very similar to the normal WinCMD install, apart for a few tweaks to allow being called from the cmder startup script. The example **assumes** that the `CMDER_ROOT` environment variable is **set** to the **root directory** of your Cmder installation.\nThen you can do something like this:\n\n- Make a .cmd file to invoke it\n\n```batch\n:: %CMDER_ROOT%\\bin\\fnm_init.cmd\n@echo off\nFOR /f \"tokens=*\" %%z IN ('fnm env --use-on-cd') DO CALL %%z\n```\n\n- Add it to the startup script\n\n```batch\n:: %CMDER_ROOT%\\config\\user_profile.cmd\ncall \"%CMDER_ROOT%\\bin\\fnm_init.cmd\"\n```\n\nYou can replace `%CMDER_ROOT%` with any other convenient path too.\n\n## [Configuration](./docs/configuration.md)\n\n[See the available configuration options for an extended configuration documentation](./docs/configuration.md)\n\n## [Usage](./docs/commands.md)\n\n[See the available commands for an extended usage documentation](./docs/commands.md)\n\n## Contributing\n\nPRs welcome :tada:\n\n### Developing:\n\n```sh\n# Install Rust\ngit clone https://github.com/Schniz/fnm.git\ncd fnm/\ncargo build\n```\n\n### Running Binary:\n\n```sh\ncargo run -- --help # Will behave like `fnm --help`\n```\n\n### Running Tests:\n\n```sh\ncargo test\n```\n","funding_links":[],"categories":["Rust","Packages","Repository","Plugins","Projects by main language","Local Development","🌏开源项目","🏃🏽‍♀️ Runtime","JavaScript框架","Miscellaneous","Reason","Included Software","hacktoberfest","Dev-Utilities","nodejs","Desktop \u0026 Web Applications","Uncategorized","Applications","OCaml","List of \\*env-, ch\\*- and \\*vm- style version managers","Developer Experience (DX)","Version Managers","包","System \u0026 Command","HarmonyOS"],"sub_categories":["Node.js management","Node.js Management","Node version manager","rust","Setup","其他_文本生成、文本对话","Acknowledgments","macOS Specific ","Uncategorized","System tools","Node.js","Node.js 管理","Other","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSchniz%2Ffnm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSchniz%2Ffnm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSchniz%2Ffnm/lists"}