{"id":18686844,"url":"https://github.com/yakiyo/dsm","last_synced_at":"2025-04-12T05:07:33.369Z","repository":{"id":169755139,"uuid":"619913617","full_name":"Yakiyo/dsm","owner":"Yakiyo","description":"Version Manager for the Dart SDK","archived":false,"fork":false,"pushed_at":"2024-02-17T11:53:04.000Z","size":1051,"stargazers_count":10,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T07:43:57.624Z","etag":null,"topics":["cli","dart","dart-sdk","fnm","rust","version-manager"],"latest_commit_sha":null,"homepage":"https://dsm-vm.vercel.app/","language":"Rust","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/Yakiyo.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}},"created_at":"2023-03-27T16:57:53.000Z","updated_at":"2024-04-02T17:41:10.000Z","dependencies_parsed_at":"2023-12-16T14:01:05.223Z","dependency_job_id":"1270731c-4d37-44d6-90bf-67594504a668","html_url":"https://github.com/Yakiyo/dsm","commit_stats":null,"previous_names":["yakiyo/dsm"],"tags_count":8,"template":false,"template_full_name":"Yakiyo/rust-codespace-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yakiyo%2Fdsm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yakiyo%2Fdsm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yakiyo%2Fdsm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yakiyo%2Fdsm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yakiyo","download_url":"https://codeload.github.com/Yakiyo/dsm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519543,"owners_count":21117761,"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":["cli","dart","dart-sdk","fnm","rust","version-manager"],"created_at":"2024-11-07T10:29:31.013Z","updated_at":"2025-04-12T05:07:33.322Z","avatar_url":"https://github.com/Yakiyo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DSM - Dart SDK Manager\n[![ci](https://github.com/Yakiyo/dsm/actions/workflows/ci.yml/badge.svg)](https://github.com/Yakiyo/dsm)\n\nSimplified version manager for the Dart SDK. Inspired by [fnm](https://github.com/Schniz/fnm) and [nvm](https://github.com/nvm-sh/nvm). \n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./tools/dsm.svg\" alt=\"demo svg\"\u003e\n\u003c/div\u003e\n\n## Installation\nTo quickly install dsm, you can use one of the following scripts\n\n#### bash (linux/macos/windows)\n```bash\n$ curl -fsSL https://dsm-vm.vercel.app/install.sh | bash\n```\nThe bash script works on windows too if you have git bash, since it comes with the associated utilities like `uname`, `curl` and others. The script accepts options like the `-F` or `--filename` flag to override what file to use (see the release section to see the available ones). Run the `--help` flag to see available ones. For example\n```bash\n$ curl -fsSL https://dsm-vm.vercel.app/install.sh | bash -s -- --install-dir \"path/to/file\" -F \"x86_64-unknown-linux-musl\" --skip-shell\n```\n#### powershell (windows)\n```powershell\n$ irm https://dsm-vm.vercel.app/install.ps1 | iex\n```\nYou can specify the version by declaring a `$v` variable beforehand and change the installation dir by a env variable named `DSM_INSTALL`\n### crates.io:\n```bash\n$ cargo install dsm\n```\n\n### Locally\nClone the repo first. Then build it. You need the rust toolchain installed in your local environment. Get it from [here](https://www.rust-lang.org/tools/install). You also need [git](git-scm.com).\n```bash\n$ git clone https://github.com/Yakiyo/dsm\n\n$ cd dsm\n\n$ cargo build --release\n```\n\n### Pre-built binaries\nPre-built binaries for some platforms are available in [github releases](https://github.com/Yakiyo/dsm/releases) section. You can download the file, rename it and add it to your system PATH.\n\nAfter installation, setup your shell as mentioned in [setup](#setup).\n\n## Setup\nThe `dsm env \u003cSHELL\u003e` command is used for setting up shell. Currently powershell, bash. zsh, cmd and fish are supported.\n\n### Bash/Zsh\nAdd the following to your `.bashrc` or `.zshrc` file.\n```bash\neval $(dsm env bash)\n# or for zsh\neval $(dsm env zsh)\n```\nWindows users using Git Bash should check out this issue: https://github.com/Yakiyo/dsm/issues/20\n\n### Fish\nCreate `~/.config/fish/conf.d/dsm.fish` and add the following.\n```fish\ndsm env fish | source\n```\n\n### Powershell\nAdd the following to your powershell profile\n```powershell\ndsm env powershell | Out-String | Invoke-Expression\n```\nYou can view the path to your profile with the `$PROFILE` variable.\n\n### Command Prompt\nCreate a [startup script](https://superuser.com/questions/144347/is-there-windows-equivalent-to-the-bashrc-file-in-linux/144348#144348) and add the following.\n```batch\nFOR /f \"tokens=*\" %i IN ('dsm env cmd') DO CALL %i\n```\n## Usage\n\nFor installing a specific version\n```bash\n$ dsm install 3.0.3\n```\nYou can use `latest` to install the latest stable sdk version. Latest versions of dev/beta channels are also supported via `latest/channel` or `latest-channel` format.\n```bash\n$ dsm install latest-dev # or dsm install latest/dev\n\n$ dsm install latest # same as latest-stable or latest/stable\n```\n\nThen use the `use` command to activate it\n```bash\n$ dsm use 3.0.3\n```\nFor creating aliases, use the `alias` and `unalias` commands\n```bash\n$ dsm alias 3.0.3 pinned\n\n$ dsm unalias pinned\n```\nView all installed versions\n```bash\n$ dsm ls # or dsm list\n```\n\nFor a list of all commands, do `dsm --help`.\n\n## Logs\nDsm logs additional information throughout the program. The level of the emitted logs can be manually customized using the `DSM_LOG` environment variable. The env takes one of the following values:\n\n- error\n- warn\n- info\n- debug\n- trace\n\nThe default is error. If `info` is set, then all logs of level info, warn and error will be emitted. Similar for the others too. See the docs at [`env_logger`](https://docs.rs/env_logger/0.10.0/env_logger/#enabling-logging) for additional details\n\nColors can be disabled either via the `--disable-colors` flag or by setting `DSM_LOG_STYLE` env to \"never\".\n\n## Contributing\nContributions are always welcome. You can start with any of the open [issues](https://github.com/Yakiyo/dsm/issues) to work on. For adding a new feature, please open an issue before working on it in order to discuss it. Feature commits are prefered so please open individual prs for individual features instead of doing several feature additions/changes in a single pull request. For any changes, add a changeset via `pnpm changeset` if its applicable. \n\nMake sure your code passes the CI and please merge and resolve conflicts from upstream before finalizing the pr. \n\nIf you cannot code yourself but would like to request a feature, please open an issue and I'll see what can be done.\n\n## Credits\nA huge amount of code and inspiration has been taken from Schniz's [`fnm`](https://github.com/Schniz/fnm). The project structure, some of the hacks and codes are based from it. \n\n## Author\n\n**dsm** © [Yakiyo](https://github.com/Yakiyo). Authored and maintained by Yakiyo.\n\nReleased under [MIT](https://opensource.org/licenses/MIT) License\n\nIf you like this project, consider leaving a star ⭐ and sharing it with your friends and colleagues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakiyo%2Fdsm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakiyo%2Fdsm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakiyo%2Fdsm/lists"}