All Projects → ghosind → dvm

ghosind / dvm

Licence: MIT License
A lightweight, and powerful Deno Version Manager for Linux/macOS.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to dvm

Nvm
nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
Stars: ✭ 53,926 (+256690.48%)
Mutual labels:  install, version-manager
core
🌈 light, fast, and easy to use, dependencies free javascript syntax highlighter, with automatic language detection
Stars: ✭ 40 (+90.48%)
Mutual labels:  deno
Fedora-KDE-Minimal-Install-Guide
Guide to install KDE Plasma desktop environment on a minimal Fedora installation
Stars: ✭ 125 (+495.24%)
Mutual labels:  install
twd
🚩 Simple tailwind like CLI tool for deno 🦕
Stars: ✭ 33 (+57.14%)
Mutual labels:  deno
deno-docker
Dockerfiles for Deno
Stars: ✭ 74 (+252.38%)
Mutual labels:  deno
dino-bot
a bot that execute your deno code and send you the output! 🦕
Stars: ✭ 24 (+14.29%)
Mutual labels:  deno
composer-install
A GitHub Action to streamline installation of PHP dependencies with Composer.
Stars: ✭ 151 (+619.05%)
Mutual labels:  install
tailspin
Site generator and design system in one
Stars: ✭ 19 (-9.52%)
Mutual labels:  deno
installme-osx
My personal script to setup a new OSX
Stars: ✭ 57 (+171.43%)
Mutual labels:  install
lesvim
Nvim config focus on Javascript, Typescript, Rust and Lua - 🚀 💪 ( Fast and Powerfull ) - Deno and other typescript LSP working well together
Stars: ✭ 69 (+228.57%)
Mutual labels:  deno
deno-aws api
From-scratch Typescript client for accessing AWS APIs
Stars: ✭ 33 (+57.14%)
Mutual labels:  deno
get-installed-path
Get locally or globally installation path of given package name.
Stars: ✭ 39 (+85.71%)
Mutual labels:  install
cron-schedule
A zero-dependency cron parser and scheduler for Node.js, Deno and the browser.
Stars: ✭ 28 (+33.33%)
Mutual labels:  deno
zarch
The Ultimate Script For Arch Linux
Stars: ✭ 49 (+133.33%)
Mutual labels:  install
flora
Upgrade and version manager for terraform
Stars: ✭ 16 (-23.81%)
Mutual labels:  version-manager
fast-base64
Fastest base64 on the web, with Wasm + SIMD
Stars: ✭ 23 (+9.52%)
Mutual labels:  deno
deno nightly
🌙 Nightly builds for Deno 🦕
Stars: ✭ 11 (-47.62%)
Mutual labels:  deno
matterless
Self-hosted serverless
Stars: ✭ 23 (+9.52%)
Mutual labels:  deno
deno notify
Send desktop notifications on all platforms in Deno
Stars: ✭ 27 (+28.57%)
Mutual labels:  deno
doa
A middleware framework for Deno's http serve🦕. Transplanted from Koa with ❤️
Stars: ✭ 20 (-4.76%)
Mutual labels:  deno

DVM - Deno Version Manager

test lint Codacy Badge Version Badge License Badge

English | 简体中文

Dvm is a simple, lightweight, and powerful Deno version manager for Linux/MacOS.

Please avoid use deno upgrade command to upgrade Deno when you're using DVM to manage your multiple version environment.

Installing and Updating

Installation

There are two ways to install DVM.

  1. Install dvm from network by the following command:
$ curl -o- "https://raw.githubusercontent.com/ghosind/dvm/master/install.sh" | bash

For Chinese user, you can also install it from Gitee by the following command:

$ curl -o- "https://gitee.com/ghosind/dvm/raw/master/install.sh" | bash -s -r gitee
  1. Clone this project and execute install.sh script:
$ git clone "https://github.com/ghosind/dvm.git"
# you can also clone it from gitee
# git clone "https://gitee.com/ghosind/dvm.git"
$ cd dvm
$ ./install.sh

After installed dvm, please restart your terminal or use source <your_rc_file> to apply changes.

The default install location is ~/.dvm, you can specify an inexistent directory as the install location.

$ curl -o- "https://raw.githubusercontent.com/ghosind/dvm/master/install.sh" | bash -s -d ~/deno/dvm
$ ./install.sh ~/deno/dvm

Upgrade DVM

Since DVM v0.3.0, we provided upgrade command to update your DVM to the latest version.

$ dvm upgrade

If you want to update the DVM that less than v0.3.0, you may need to uninstall the current version and re-install the latest version. You can get the uninstall steps from Manual uninstall section.

Getting Start

After installed dvm, you can use it to manage multiple version Deno environments.

List available versions

Use dvm list-remote or dvm ls-remote to list all available versions from remote.

# list all available versions
$ dvm list-remote
# ls-remote is an alias for list-remote command
$ dvm ls-remote

List installed versions

Use dvm list or dvm ls to list all installed versions.

# list all installed versions
$ dvm list
# ls command is an alias for list command
$ dvm ls

Install Deno

Use dvm install <version> command to download and install a specified version from the source.

$ dvm install v1.0.0
deno v1.0.0 has installed.
$ dvn install v0.42.0
deno v0.42.0 has installed.

Uninstall Deno

Use dvm uninstall <version|alias-name> command to uninstall a specified version.

$ dvm uninstall v0.39.0
uninstalled deno v0.39.0.
# default is an alias name
$ dvm uninstall default
uninstalled deno default.

Set active version

Use dvm use [version] command to link deno to the specified installed version by parameter or .dvmrc file.

# use v1.0.0
$ dvm use v1.0.0
using deno v1.0.0 now.

# get version from .dvmrc file
# $ cat .dvmrc
# # v1.4.0
$ dvm use
using deno v1.4.0 now.

Get current version

Use dvm current command to display the current version of Deno.

$ dvm current
v1.0.0

Set an alias

Use dvm alias command to set alias name for a installed version of Deno.

$ dvm ls
   v1.0.0
# Set an alias
$ dvm alias default v1.0.0
default -> v1.0.0
$ dvm ls
   v1.0.0
default -> v1.0.0

Run with a version

Use dvm run command to run Deno on the specified version with arguments.

$ dvm run v1.0.0
Running with deno v1.0.0
Deno 1.0.0
exit using ctrl+d or close()
>
# Run app.ts with Deno v1.0.0
$ dvm run v1.0.0 app.ts

Commands

DVM supported the following commands:

Command Usage Description
install dvm install Download and install the latest version or the version reading from .dvmrc file.
dvm install <version> Download and install the specified version from source.
dvm install <version> --registry=<registry> Download and install deno with the specified registry.
uninstall dvm uninstall <version> Uninstall the specified version.
use dvm use Use the specified version read from .dvmrc.
dvm use <version> Use the specified version that passed by argument.
dvm use <name> Use the specified version of the alias name that passed by argument.
run dvm run <version> [args] Run deno on the specified version with arguments.
alias dvm alias <name> <version> Set an alias name to specified version.
unalias dvm unalias <name> Delete the specified alias name.
current dvm current Display the current version of Deno.
ls dvm ls List all installed versions.
list dvm list Same as ls command.
ls-remote dvm ls-remote List all remote versions.
list-remote dvm list-remote Same as ls-remote command.
which dvm which Display the path of the version that specified in .dvmrc.
dvm which current Display the path of the current version.
dvm which <version> Display the path of specified version.
clean dvm clean Remove all downloaded packages.
deactivate dvm deactivate Deactivate Deno on current shell.
doctor dvm doctor Find invalid / corrupted versions.
dvm doctor --fix Find and fix invalid / corrupted versions.
upgrade dvm upgrade Update dvm itself.
purge dvm purge Remove dvm from your computer.
help dvm help Show dvm help message.

Please visit dvm wiki for more details.

Uninstalling DVM

There are two ways to remove DVM from your computer.

Use purge command

You can execute dvm purge to remove dvm from your computer if your dvm version is v0.3.2 and above. It will remove the $DVM_DIR and dvm configurations in shell config file.

If your dvm is less than v0.3.2, please following the next section (Manual uninstall) to remove DVM.

Manual uninstall

You can also execute following command to uninstall dvm:

rm -rf "$DVM_DIR"

Edit shell config file (like .bashrc or .zshrc), and remove the following lines:

# Deno Version Manager
export DVM_DIR="$HOME/.dvm"
export DVM_BIN="$DVM_DIR/bin"
export PATH="$PATH:$DVM_BIN"
[ -f "$DVM_DIR/dvm.sh" ] && alias dvm="$DVM_DIR/dvm.sh"
[ -f "$DVM_DIR/bash_completion" ] && . "$DVM_DIR/bash_completion"

Contribution

  1. Fork dvm project. (https://github.com/ghosind/dvm)
  2. Clone your fork to local. (git clone <your_forked_repo>)
  3. Create your branch. (git checkout -b features/someFeatures)
  4. Make your changes.
  5. Commit your changes. (git commit -m 'Add some features')
  6. Push to the branch. (git push origin features/someFeatures)
  7. Create a new Pull Request.

Please make sure your commits could pass the ShellCheck before creating pull request.

License

Distributed under the MIT License. See LICENSE file for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].