{"id":13801777,"url":"https://github.com/ghosind/dvm","last_synced_at":"2025-04-06T00:31:32.467Z","repository":{"id":42525355,"uuid":"263263629","full_name":"ghosind/dvm","owner":"ghosind","description":"Deno Version Manager (DVM) - A lightweight, and powerful Deno Version Manager for MacOS, Linux, WSL, and Windows with Bash.","archived":false,"fork":false,"pushed_at":"2024-10-16T16:52:27.000Z","size":336,"stargazers_count":38,"open_issues_count":5,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-18T15:46:01.379Z","etag":null,"topics":["deno","deno-version-manager","dvm","install","version-manager"],"latest_commit_sha":null,"homepage":"https://github.com/ghosind/dvm","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/ghosind.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-12T07:23:19.000Z","updated_at":"2024-10-16T16:49:42.000Z","dependencies_parsed_at":"2024-01-18T09:30:15.767Z","dependency_job_id":"42fa4d78-4508-4f32-8598-2e85104c6371","html_url":"https://github.com/ghosind/dvm","commit_stats":null,"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosind%2Fdvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosind%2Fdvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosind%2Fdvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghosind%2Fdvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghosind","download_url":"https://codeload.github.com/ghosind/dvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419597,"owners_count":20936009,"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":["deno","deno-version-manager","dvm","install","version-manager"],"created_at":"2024-08-04T00:01:27.247Z","updated_at":"2025-04-06T00:31:27.452Z","avatar_url":"https://github.com/ghosind.png","language":"Shell","readme":"# DVM - Deno Version Manager\n\n![test](https://github.com/ghosind/dvm/workflows/test/badge.svg)\n![lint](https://github.com/ghosind/dvm/workflows/lint/badge.svg)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e11bedd87a194dd6a67140ec447ab51f)](https://www.codacy.com/manual/ghosind/dvm?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=ghosind/dvm\u0026amp;utm_campaign=Badge_Grade)\n![Version Badge](https://img.shields.io/github/v/release/ghosind/dvm)\n![License Badge](https://img.shields.io/github/license/ghosind/dvm)\n\n简体中文 | [English](./README.md)\n\nDVM是一个强大的轻量级[Deno](https://deno.land/)版本管理工具，可在MacOS、Linux、WSL以及装有Bash的Windows上使用。\n\nDVM仅在v0.7.0及之后的版本支持Windows。对于Windows用户，使用DVM前需要安装Bash Shell。例如，可以在安装WSL后在PowerShell中执行`bash`命令。\n\n***在使用DVM管理你的多版本环境时，请避免使用`deno upgrade`命令进行升级deno版本。***\n\n- [安装与升级](#安装与升级)\n    - [安装DVM](#安装DVM)\n    - [升级DVM](#升级DVM)\n- [依赖需求](#依赖需求)\n- [DVM入门](#DVM入门)\n    - [列出可安装版本](#列出可安装版本)\n    - [列出已安装的版本](#列出已安装的版本)\n    - [安装版本](#安装版本)\n    - [删除版本](#删除版本)\n    - [切换版本](#切换版本)\n    - [当前版本信息](#当前版本信息)\n    - [设置别名](#设置别名)\n    - [运行指定版本](#运行指定版本)\n- [DVM命令](#DVM命令)\n- [如何卸载DVM](#如何卸载DVM)\n    - [使用`purge`命令](#使用purge命令)\n    - [手工卸载](#手工卸载)\n- [许可](#许可)\n\n## 安装与升级\n\n### 安装DVM\n\n我们提供了以下两种方式以安装DVM：\n\n1. 运行下列命令从网络安装DVM：\n\n```sh\ncurl -o- https://raw.githubusercontent.com/ghosind/dvm/master/install.sh | bash\n```\n\n对于国内的用户，可使用DVM的Gitee镜像以提高下载速度：\n\n```sh\ncurl -o- https://gitee.com/ghosind/dvm/raw/master/install.sh | DVM_SOURCE=gitee bash\n```\n\n2. Clone远程git仓库至本地，并运行`install.sh`脚本：\n\n```sh\ngit clone \"https://github.com/ghosind/dvm.git\"\n# 同样，可以从我们的gitee项目上clone\n# git clone \"https://gitee.com/ghosind/dvm.git\"\ncd dvm\n./install.sh\n```\n\n在完成DVM的安装后，请重启终端或运行`source \u003cShell_配置文件\u003e`以应用更改，安装程序将会提醒具体的操作步骤。\n\n默认情况下，DVM将安装在`~/.dvm`目录下，可使用`-d \u003cdir\u003e`参数（仅限于本地安装使用）或`$DVM_DIR`环境变量指定一个不存在的目录作为DVM的安装目录。\n\n```sh\ncurl -o- \"https://raw.githubusercontent.com/ghosind/dvm/master/install.sh\" | DVM_DIR=~/deno/dvm bash\n./install.sh -d ~/deno/dvm\n```\n\n### 升级DVM\n\n若您使用DVM `v0.3.0`及以上版本，可通过DVM本身提供的`upgrade`命令将本地DVM升级至最新的稳定版本。\n\n```sh\ndvm upgrade\n```\n\n若您使用DVM `v0.3.0`以下的版本时，需要卸载现有版本并重新安装的方法进行升级。您可通过[手工卸载](#手工卸载)章节提供的卸载方式卸载DVM，再重新进行安装。\n\n## 依赖需求\n\n请确保下列依赖软件已经安装：\n\n- curl\n- git\n- unzip (Deno v0.36.0及更新的版本)\n- gunzip (Deno v0.35.0及更旧的版本)\n\n若需要从源码安装Deno，请确保以下依赖软件已经安装：\n\n- rustc\n- cargo\n- cc\n- cmake\n\n## DVM入门\n\n### 列出已安装的版本\n\n使用`dvm ls`命令列出所有已安装的版本（及别名）：\n\n```sh\n# 列除所有当前已安装的版本\ndvm ls\n```\n\n### 列出可安装版本\n\n使用`dvm ls-remote`脚本列出所有可安装的版本：\n\n```sh\n# 列出所有可安装的版本\ndvm ls-remote\n```\n\n### 安装版本\n\n使用`dvm install \u003cversion\u003e`下载并安装指定版本：\n\n```sh\ndvm install v1.0.0\ndvn install v0.42.0\n```\n\n### 源码安装\n\nDVM v0.8.0及以上版本支持从源码安装Deno：\n\n```sh\ndvm install --from-source v1.35.0\n```\n\n### 删除版本\n\n使用`dvm uninstall \u003cversion\u003e`卸载指定版本：\n\n```\ndvm uninstall v0.39.0\ndvm uninstall v1.0.0-rc\n```\n\n### 切换版本\n\n使用`dvm use [version]`命令将指定的版本设置为当前使用的版本，若未指定则将从当前目录下的`.dvmrc`文件中读取：\n\n```sh\n# 使用Deno v1.0.0\ndvm use v1.0.0\n\n# 使用通过.dvmrc文件指定的版本\n# cat .dvmrc\n# # v1.0.0\ndvm use\n```\n\n通过`use`命令设置的版本仅适用于当前终端会话中，若希望为所有的终端会话设置使用的版本，请为版本设置`default`别名，可参考[设置别名](#设置别名)章节为指定版本设置别名。\n\n### 当前版本信息\n\n使用`dvm current`命令输出当前使用的Deno版本信息：\n\n```sh\ndvm current\n# v1.0.0\n```\n\n### 设置别名\n\n使用`dvm alias`命令可为已安装的版本设置别名：\n\n```sh\ndvm alias default v1.0.0\n```\n\n### 运行指定版本\n\n通过`dvm run`命令运行指定版本Deno，在有参数指定的情况下通过对应的参数执行对应的脚本：\n\n```sh\n# 使用Deno v1.0.0运行app.ts\ndvm run v1.0.0 app.ts\n```\n\n## DVM命令\n\nDVM支持的命令包括有：\n\n| 命令 | 使用方法 | 描述 |\n|:-------:|:-----:|:------------|\n| `install` | `dvm install` | 下载并安装从`.dvmrc`读取的指定版本或最新deno版本 |\n| | `dvm install \u003cversion \\| prefix\u003e` | 下载并安装指定的版本，或安装满足指定前缀的最新版本 |\n| | `dvm install \u003cversion\u003e --registry=\u003cregistry\u003e` | 通过指定的镜像下载deno |\n| | `dvm install \u003cversion\u003e --skip-validation` | 下载deno前不对版本进行校验 |\n| | `dvm install \u003cversion\u003e --from-source` | 编译源码并安装Deno |\n| | `dvm install \u003cversion\u003e --skip-download-cache` | 不使用已下载的文件，重新下载并安装 |\n| `uninstall` | `dvm uninstall \u003cversion\u003e` | 卸载指定的版本 |\n| `use` | `dvm use` | 将指定的版本设置为当前使用的版本，未指定版本将从当前目录下的`.dvmrc`文件中读取 |\n| | `dvm use \u003cversion\u003e` | 将指定的版本设置为当前使用的版本 |\n| | `dvm use \u003cname\u003e` | 将指定的别名对应的版本设置为当前使用的版本 |\n| `run` | `dvm run \u003cversion\u003e [args]` | 运行指定版本Deno，并传递对应的参数 |\n| `alias` | `dvm alias \u003cname\u003e \u003cversion\u003e` | 为指定版本设置别名 |\n| `unalias` | `dvm unalias \u003cname\u003e` | 删除指定的别名 |\n| `current` | `dvm current` | 显示当前使用的Deno版本 |\n| `ls` | `dvm ls` | 显示所有当前已安装的版本及别名 |\n| `list` | `dvm list` | 与`ls`相同 |\n| `ls-remote` | `dvm ls-remote` | 显示所有可安装的版本 |\n| `list-remote` | `dvm list-remote` | 与`ls-remote`相同 |\n| `which` | `dvm which` | 显示指定版本Deno安装的目录，未指定版本将从当前目录下的`.dvmrc`文件中读取 |\n| | `dvm which current` | 显示当前使用的版本Deno安装的目录 |\n| | `dvm which \u003cversion\u003e` | 显示指定版本Deno安装的目录 |\n| `clean` | `dvm clean` | 清除下载及版本信息缓存 |\n| `deactivate` | `dvm deactivate` | 取消当前shell中活跃的Deno |\n| `doctor` | `dvm doctor` | 列出存在问题的版本（未安装成功/版本号错误） |\n| | `dvm doctor --fix` | 扫描并修复存在问题的版本 |\n| `upgrade` | `dvm upgrade` | 更新DVM |\n| `purge` | `dvm purge` | 卸载DVM |\n| `help` | `dvm help` | 打印帮助信息 |\n\n更多信息请参考[dvm wiki](https://github.com/ghosind/dvm/wiki)。\n\n### 可选参数\n\n| 参数 | 描述 |\n|:------:|:------------|\n| `-q`, `--quiet` | 安静模式，大大减少输出的数量，只保留了少数必要的输出 |\n| `--color` | 以色彩模式运行，输出的文本不再单调 |\n| `--no-color` | 以默认颜色输出 |\n| `--verbose` | 打印debug信息 |\n\n## 如何卸载DVM\n\n### 使用`purge`命令\n\nDVM `v0.3.2`及以上版本提供了`purge`命令，该命令可被用于卸载DVM本身，它将移除DVM所在的目录以及Shell环境配置文件中的相关内容。若您的DVM版本低于`v0.3.2`，请通过下面手工卸载的方法卸载。\n\n### 手工卸载\n\nDVM所有的文件都保存在`$DVM_DIR`变量指定的目录下，若需要卸载DVM，只需删除`$DVM_DIR`指定的目录即可。\n\n```sh\nrm -rf \"$DVM_DIR\"\n```\n\n除文件目录外，DVM将配置信息写入了Shell环境配置文件中（如`.bashrc`或`.zshrc`，根据具体使用的Shell种类决定），您可编辑对应的文件删除下列几行代码：\n\n```sh\n# Deno Version Manager\nexport DVM_DIR=\"$HOME/.dvm\"\n[ -f \"$DVM_DIR/dvm.sh\" ] \u0026\u0026 . \"$DVM_DIR/dvm.sh\"\n[ -f \"$DVM_DIR/bash_completion\" ] \u0026\u0026 . \"$DVM_DIR/bash_completion\"\n```\n\n## 许可\n\n本项目通过MIT许可发布，查看LICENSE文件获取更多信息。\n","funding_links":[],"categories":["Tools"],"sub_categories":["XML"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosind%2Fdvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghosind%2Fdvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghosind%2Fdvm/lists"}