Flutter Version Management: A simple cli to manage Flutter SDK versions.

Overview

fvm

Flutter Version Management: A simple cli to manage Flutter SDK versions.

Features:

  • Configure Flutter SDK version per project or globally
  • Ability to install and cache multiple Flutter SDK Versions
  • Easily switch between Flutter channels & versions

Version Management

This tool allows you to manage multiple channels and releases, and caches these versions locally, so you don't have to wait for a full setup every time you want to switch versions.

Also, it allows you to grab versions by a specific release, i.e. 1.2.0. In case you have projects in different Flutter SDK versions and do not want to upgrade.

Usage

To Install fvm:

brew tap befovy/taps
brew install fvm

Or install fvm through go get

> go get -u -v github.com/befovy/fvm

The command above will install binary executable fvm file to $GOPATH/bin.
Add $GOPATH/bin to your system PATH, or move the binary fvm file to an existing PATH directory.

And then, for information on each command:

> fvm help

FVM_HOME

fvm use environment variable FVM_HOME as a working path.
The installed cache and config file are all stored in this path.

If no FVM_HOME in environment variable, fvm will use the default value returned by os.UserConfigDir() append fvm.
On Mac OS, default FVM_HOME is $HOME/Library/Application Support/fvm

Install a SDK Version

FVM gives you the ability to install many Flutter releases or channels.

> fvm install <version>

Use master to install the Master channel and v1.8.0 to install the release.

Use --repo to install flutter from unoffical repo

> fvm install master --repo https://github.com/flutter/flutter.git

Import Flutter from previous installation

FVM has subcommand import which can import your previous installed flutter into fvm.

> fvm import <name>

If you have installed master channel flutter, just use fvm import master.
Or if you have installed a special derived flutter, just use any name you want to import this flutter. You can use a name from you company, or any other you want. fvm import xianyu

Use a SDK Version

You can use the installed Flutter SDK versions for your computer user account globally. To do that just:

> fvm use <version>

Also, you can use different Flutter SDK versions per project. To do that you have to go into the root of the project and:

> fvm use <version> --locol

Show current SDK info

Get current active Flutter sdk version, link path and actually path

> fvm current

Remove a SDK Version

Using the remove command will uninstall the SDK version locally. This will impact any projects that depend on that version of the SDK.

> fvm remove <version>

List Installed Versions

List all the versions that are installed on your machine.

> fvm list

Running Flutter SDK

Call Global SDK

After add fvm global path to your system environment variable, flutter command is usable every where.

Your will get tip when you run fvm use firstly.

Proxy Commands

Flutter command within fvm proxies all calls to the CLI just changing the SDK to be the local one.

> fvm flutter run

This will run flutter run command using the local project SDK. If no FVM config is found in the project. FMV will recursively try for a version in a parent directory.

If FVM config is still not found, this will run flutter run command using the global Flutter SDK.

Call Local SDK Directly

FVM creates a symbolic link within your project called .fvm/current which links to the installed version of the SDK.

Add $(pwd)/.fvm/current/bin to your PATH, or

> .fvm/current/bin/flutter run

This will run flutter run command using the local project SDK.

As an example calling fvm flutter run is the equivalent of calling flutter run using the local project SDK.

License

This project is licensed under the Apache License 2.0 License - see the LICENSE file for details

Comments
  • [feature] 支持配置文件制定flutter版本和仓库地址

    [feature] 支持配置文件制定flutter版本和仓库地址

    有时我们在一个工程的不同分支可能会使用不同的引擎版本(如适配新引擎的时候),目前的做法是切换完分支后,手动调用 fvm use xxx --local 来切换,我建议可以支持项目中定义一个fvm.properties 文件,文件中记录flutter git ref 和 flutter 仓库地址,该文件可以提交到代码仓库中,这样在切换不同分支时,fvm 命令自动根据 fvm.properties 文件中的版本切换引擎,体验会更好,并且也可以多人开发时确保使用相同的引擎。

    opened by cikelengfeng 6
  • 如何彻底删除fvm

    如何彻底删除fvm

    如何彻底删除fvm 如下: Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead. running Flutter tool: /Users/cp/flutter previous reference : /Users/cp/Library/Application Support/fvm/versions/stable This can happen if you deleted or moved your copy of the Flutter repository, or if it was on a volume that is no longer mounted or has been mounted at a different location. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).

    opened by aluo44 2
  • [question]where is my flutter?

    [question]where is my flutter?

    look at picture below. 0 macos 10.15.4 ,mbp 2019 1 brew install fvm 2 previous flutter path: ~/flutter/flutter/xxxxxx ; channel:master 3 exec fvm import ~/flutter/flutter/, wait some minutes,
    4 terrible result, my flutter is lost!!! 5 how can i find or rescue it? 6 in your dir:/Users/chy/Library/Application Support/fvm/versions, no exists my flutter sdk!!! 7 please help me , i am searching globally in mac but no result. flutter存储 fvm2

    opened by ariagecheney 2
  • Sorry could not link /xxxx/fvm/versions/1.8.0/bin/flutter

    Sorry could not link /xxxx/fvm/versions/1.8.0/bin/flutter

    描述: fvm install 1.8.0 Downloading 1.8.0... 256.8s fvm use 1.8.0 Activating 1.8.0... Sorry could not link /Users/dawns/fvm/versions/1.8.0/bin/flutter 预期 成功切换版本 结果 报错

    opened by dawnyu 1
  • FVM is obsolete

    FVM is obsolete

    Please stop using this tool.

    I spent over 3 days trying to figure it out only to discover flutter now has its own fvm. :(

    Just install with flutter pub global activate fvm

    hope this helps someone else...

    opened by NightOwlCoder 0
  • FVM is awesome

    FVM is awesome

    Hello! Thank you for creating fvm. I had a better experience using this fvm instead of https://github.com/fluttertools/fvm Very straight forward and useful. Keep up the good work!

    opened by cmarincia 0
  • fvm install 失败

    fvm install 失败

    jizhigang@jizhigangdeMacBook-Pro ~ % fvm install master --repo https://github.com/flutter/flutter.git fvm: You have installed flutter outside of fvm fvm: --> /opt/flutter/bin/flutter fvm: To import this into fvm, use fvm import fvm: Install flutter from repo https://github.com/flutter/flutter.git fvm: Command 'git' exited with error: chdir /Users/jizhigang/Library/Application Support/fvm/versions/master: no such file or directory jizhigang@jizhigangdeMacBook-Pro ~ %

    opened by jizhigang 4
  • 使用之后flutter run提供的command执行无效

    使用之后flutter run提供的command执行无效

    fvm flutter run之后,提示的以下命令,都无法使用了: Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h Repeat this help message. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device).

    这个怎么解决?

    opened by vanetaotie 1
Owner
于飞
于飞
Replaces Flutter's bundled Dart SDK with the macOS arm64 version

This script replaces Flutter's bundled Dart SDK with the macOS arm64 version Get

null 21 Oct 9, 2022
A flutter plugin to get android version(SDK INT).

get_sdk_int A new flutter plugin project. Getting Started This project is a starting point for a Flutter plug-in package, a specialized package that i

jinyus 0 Dec 28, 2021
An updated version of flutter_kid_starter from - quangrau using the latest Flutter 3.0 SDK

This application is an updated version of flutter_kid_starter from - quangrau using the latest Flutter 3.0 SDK, to update this awesome open-source application.

Md. Siam 29 Oct 12, 2022
A simple to-do list built using flutter based on BLoC state management to manage your daily tasks .

?? Table of Contents About ScreenShots from the app Demo vedio Contributors About A to-do list flutter app to manage your daily tasks. it is built bas

Heba Ashraf 6 Oct 12, 2022
Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null Safety 📑🚩

Todo ?? ?? ?? Introduction Todo is an Simple Task Management App coded using Dart which is a peogramming language for Flutter SDK(2.5) supports Null S

navee-ramesh 6 Nov 5, 2022
Woocommerce SDK for Flutter. The Complete Woo Commerce SDK for Flutter.

woocommerce Woocommerce SDK for Flutter. Getting Started Add the package to your pubspec.yaml and import. import 'package:woocommerce/woocommerce.dart

RAY 105 Dec 6, 2022
A most easily usable cookie management library in Dart. With SweetCookieJar, you can easily manage cookie on your application.

A most easily usable cookie management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use SweetCookieJar 1

Kato Shinya 9 Oct 27, 2022
A most easily usable cache management library in Dart. With CacheStorage, you can easily manage cache on your application.

A most easily usable cache management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use CacheStorage 1.2.

Kato Shinya 1 Dec 13, 2021
Sales representative and sales management system to manage sales representatives, goods, and sales.

Sales Rep and Sales Management app. This mobile app is used to manage daily activities of a wholesale business. Getting Started This project is a star

Imesh Gunathilake 6 Jul 1, 2022
Group25 - A poultry farm management app built to help farmers manage poultry releated farm activies

poultry A poultry farm management app built to help farmers manage poultry relea

null 0 Feb 15, 2022
Simple Dart calculator for use in a CLI

Dart-calculator Simple Dart calculator for use in a CLI Related to the Medium article: Building a Simple CLI Calculator App in Dart Overview This appl

Jean Luc Kabulu 6 Sep 13, 2022
A simple dart CLI to do various file conversion

Dart Converters A simple dart CLI to do various file conversion Ever get tired from changing old code to follow the current standards i.e snake_case t

Nour Magdi 1 Apr 18, 2022
A new video calling mobile application using Flutter, Agora SDK and GetX state management.

LiveBox : A Video Calling App A new video calling mobile application using Flutter, Agora SDK and GetX state management. Features Login Registration F

Nikhil Rajput 14 Dec 3, 2022
A basic boilerplate template for starting a Flutter GetX project. GetX, Dio, MVVM, get CLI, Localization, Pagination etc are implemented.

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We

Hasan Abdullah 214 Jan 9, 2023
A CLI to help with using FlutterFire in your Flutter applications.

FlutterFire CLI Documentation • License A CLI to help with using FlutterFire in your Flutter applications. Local development setup To setup and use th

Invertase 100 Dec 12, 2022
Custom flutter testing CLI tool for individual test runs and group testing

fluttertest Custom flutter testing CLI tool for inidividual test runs or group testing Overview Flutter is a great framework which has helps developer

vi_mi 15 Nov 6, 2022
An example Flutter application built with Very Good CLI and Supabase 🦄

Supabase Example Generated by the Very Good CLI ?? An example Flutter application built with Very Good CLI and Supabase ?? Getting Started ?? This pro

Very Good Ventures 46 Dec 27, 2022
Command Line Interface (CLI) for Lucifer

Lucy Command Line Interface (CLI) for Lucifer. Installation Activate command line from your terminal with this command. pub global activate lucy Usage

Salman S 1 Dec 16, 2021