Skip to content

About

One-command Flutter development environment setup for Windows, Linux and macOS: Flutter SDK, Android SDK command-line tools, and the platform toolchain (Visual Studio 2026 / C++ + GTK / Xcode).

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

flutstaller

CI License: MIT Release

One command to get a working Flutter development environment on Windows, Linux or macOS — the Flutter SDK, the Android SDK command-line tools and the platform toolchain, installed from the vendors' own official sources.

Platform Script One-liner
Windows install.ps1 irm https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.ps1 | iex
Linux install.sh curl -fsSL https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.sh | bash
macOS install.sh curl -fsSL https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.sh | bash

This project was written by an AI

The installers, the CI workflow and these docs were generated by OpenCode, an AI coding agent, from a written specification, and reviewed before publishing.

Each installer is a single readable file, and every URL it downloads from is listed in How it works. Please read it before you run it — the reasoning is in About this project.


Contents


Before you run it

Four things worth knowing before the first run.

It only touches your own account

What Where Detail
The components C:\development (Windows) · ~/.bin/development (Linux, macOS) Nothing is written outside this folder, except the two Microsoft-controlled locations listed below.
ANDROID_HOME, ANDROID_SDK_ROOT your user environment The machine-wide environment is never modified.
PATH your user environment Your existing entries and their order are preserved; duplicates are skipped.
JAVA_HOME your user environment Only set if the installer installed a JDK and JAVA_HOME was not already set.

The exact PATH entries it adds:

<root>/flutter/bin
<root>/Android/Sdk/platform-tools
<root>/Android/Sdk/cmdline-tools/latest/bin
<root>/jdk/bin            (only if a JDK was installed)
<root>/Git/cmd            (only if Git was installed)

On Windows, the user PATH lives in the registry. On Linux and macOS the shell profile is edited inside a managed block that is rewritten on every run, so a PATH entry can never be duplicated.

Two Windows locations are outside your control. The Visual Studio Installer itself and the Windows SDK always install under %ProgramFiles% — Microsoft hard-codes both, so no flag can move them.

It needs two things it will not install unasked

Requirement Why If it is missing
Git The flutter command fails with "Unable to find git in your PATH". The installer shows a panel and asks whether to install it. Nothing is installed without that answer.
A JDK 17+ Gradle needs one to build Android apps. (The Android SDK tools carry their own runtime, so the SDK itself configures without one.) Same: you are asked. On Windows the installer can also add Microsoft's own Component.OpenJDK to the Visual Studio install instead.

Both can also be installed up front with -InstallPrerequisites (or FLUTSTALLER_INSTALL_PREREQUISITES=1) for unattended runs. If you decline, the rest of the installation still happens and the missing pieces are listed as outstanding actions in the final report.

It needs disk space

Windows Linux / macOS
Flutter SDK ~3.5 GB ~3.5 GB
Android SDK ~2 GB ~2 GB
Platform toolchain Visual Studio 2026: ~10–14 GB Linux packages: ~2 GB · macOS: Xcode is a separate download
Total ~20 GB ~8 GB

The Windows installer checks the free space and warns you if it looks tight.

Downloads are staged in a work directory next to the install root, on the same filesystem — not in /tmp or %TEMP%, which are often small or RAM-backed and cannot hold a 1 GB archive. The free space is checked before each transfer starts, so a full disk is reported plainly instead of as a confusing write error half way through.

It never accepts a licence for you

  • Android SDK — the installer shows you what the agreement is and where to read it, then waits for you to type y. -Yes does not answer this.
  • Visual Studio — the installer runs with --passive, never --quiet, so you accept Microsoft's licence in the installer window.
  • Xcode (macOS) — the installer shows you where to read Apple's agreement and asks before accepting it.

Quick start

1. Check your machine first

Both installers can report what they would do without changing anything.

# Windows
.\install.ps1 -PreflightOnly    # your environment: policy, prerequisites, what is missing
.\install.ps1 -DryRun           # the full plan: every download, install and variable
# Linux and macOS
./install.sh --preflight-only
./install.sh --dry-run

-PreflightOnly makes no network requests at all. -DryRun resolves the real vendor manifests so the plan is accurate, but installs nothing.

2. Install

# Windows
git clone https://github.com/kernelk14/flutstaller.git
cd REPO
.\install.ps1
# Linux and macOS
git clone https://github.com/kernelk14/flutstaller.git
cd REPO
./install.sh

Or without cloning, straight from the URL — see the table at the top of this page, or Remote execution for the details and the cautions.

On Windows there is also a launcher that checks your execution policy first and prints the exact command to fix it if PowerShell would refuse to run the script:

run-setup.cmd

3. Open a new terminal

The PATH changes only affect new shells. Open a new terminal (or source ~/.zshrc on Linux and macOS) and check:

flutter doctor -v
adb version

What it looks like

The installer is a small console application: a banner, framed section headers, boxed panels and a colour-coded report. It falls back to plain ASCII when the console cannot render box-drawing characters.

+==================================================================================================+
|   flutstaller   *   Flutter development environment for Windows                                  |
|   Flutter SDK   *   Android SDK (command-line tools)   *   Visual Studio 2026 (C++)              |
|   AI-generated with OpenCode - please read the source before running it.                         |
+==================================================================================================+

+- WHAT WOULD YOU LIKE TO INSTALL? ---------------------------------------------------------------+
|   ->  1   Install all three components                                                           |
|   ->  2   The Flutter SDK on its own                                                             |
|   ->  3   The Android SDK on its own                                                             |
|   ->  4   Visual Studio 2026 with the C++ workload                                               |
|   ->  5   Preflight report only (change nothing)                                                 |
+--------------------------------------------------------------------------------------------------+

Every download gets a live progress bar with the phase, the percentage, the transferred and total size, the current throughput and the ETA:

Downloading  flutter_windows_3.47.7-sta...  [###########------------------]   37.4%  412.3 MB / 1.10 GB  25.0 MB/s  ETA 00:27

Long-running steps (the Visual Studio installer, the Android CLI, flutter doctor -v) show a spinner and the elapsed time.

The run ends with a report that says exactly what happened to every component and what is still outstanding:

+- SUMMARY ---------------------------------------------------------------------------------------+
| [i] Flutter SDK                     already installed at C:\development\flutter                  |
| [i] Android SDK tools               already installed at C:\development\Android\Sdk              |
| [i] Git for Windows                 found at C:\Program Files\Git\mingw64\bin\git.exe            |
| [.] Visual Studio 2026              not installed in this run                                    |
| [+] Android SDK packages            installed -> C:\development\Android\Sdk                      |
| [!] Machine-wide ANDROID_HOME       set to 'C:\Android'                                          |
| [+] User environment                PATH, ANDROID_HOME, ANDROID_SDK_ROOT set                     |
+--------------------------------------------------------------------------------------------------+

  Still outstanding:
   [!] Visual Studio 2026
      Re-run the script from an elevated PowerShell window to install it.
   [!] Machine-wide ANDROID_HOME
      Change the machine-wide ANDROID_HOME to C:\development\Android\Sdk (or remove it), otherwise it
      shadows the value set for your account.

A failing component never stops the rest

Each component is installed in isolation. If one fails the run continues: the environment is still configured, the remaining components are still installed, and the failure is reported with a next action. The exit code is non-zero so automation can react.


How it works

Versions are resolved at run time, never hard-coded

Every download URL is read from the vendor's own published manifest immediately before use, so you always get current official artifacts:

Component Manifest Verification
Flutter storage.googleapis.com/flutter_infra_release/releases/releases_<platform>.json SHA-256 from the manifest
Android command-line tools dl.google.com/android/repository/repository2-3.xml SHA-1 from the manifest
Android packages the same manifest vendor-signed
Visual Studio 2026 aka.ms/vs/stable/vs_community.exe (always the latest servicing release) Microsoft installer
Git for Windows the official git-for-windows/git release feed vendor installer
Linux packages the distribution's own repository distribution-signed

A checksum mismatch aborts that download.

The Android SDK is configured with the current Android CLI

cmdline-tools 23.0 and newer ship the Android CLI (android), a native binary that manages the SDK itself and carries its own Java runtime. Google now marks sdkmanager as deprecated in favour of android sdk, so that is what the script uses:

android --sdk="C:\development\Android\Sdk" sdk install platform-tools build-tools/36.1.0 platforms/android-36

If an older cmdline-tools without that binary is found, the script falls back to sdkmanager — which does need a JDK.

The Android platform that gets installed is not guessed. The script reads compileSdkVersion out of the Flutter SDK it just installed (packages/flutter_tools/gradle/src/main/kotlin/FlutterExtension.kt) and installs exactly that platform, plus the newest published stable build-tools.

Administrator rights

Platform When elevation is needed
Windows Only for the Visual Studio step. The script checks first and asks whether it may re-launch in an elevated PowerShell window — it never re-launches elevated silently. If it does, your account's PATH and variables are still updated for you, even if the elevated window belongs to a different administrator.
Linux sudo, for the distribution's packages only.
macOS sudo, for the Xcode licence only.

Nothing else runs as root.

Visual Studio 2026 and the install path (Windows)

Visual Studio 2026 does support a custom install path, and the script uses it:

vs_community.exe --installPath C:\development\VisualStudio ...

On a machine with no previous Visual Studio installation it also relocates the shared components and the download cache:

--path shared=C:\development\VisualStudio\Shared
--path cache=C:\development\VisualStudio\Cache

Those two can only be set on the first Visual Studio installation on a machine; if the installer rejects them the script retries without them.

Only the C++ workload and what a Flutter Windows desktop build needs is installed:

  • Microsoft.VisualStudio.Workload.NativeDesktop — Desktop development with C++
  • Microsoft.VisualStudio.Component.VC.Tools.x86.x64 — MSVC x64/x86 build tools
  • Microsoft.VisualStudio.Component.VC.CMake.Project — C++ CMake tools for Windows
  • the Windows SDK — a recommended component of that workload. The recommended set is taken so the correct, current SDK build ships with Visual Studio 2026, rather than a hard-coded and quickly stale component ID.

No unrelated workload is added. Component.OpenJDK is added only when no JDK was found on the machine.


Options

Switches

Windows Linux / macOS Effect
-PreflightOnly --preflight-only Report the environment — policy, prerequisites, what is missing, what would change — and exit. No network access, nothing changed.
-DryRun --dry-run Resolve every version and URL, print the full plan, and exit. Nothing is changed.
-InstallRoot <path> --install-root <path> Install everything under a different root.
-VsEdition <Community|Professional|Enterprise> — Visual Studio 2026 edition. Default Community.
-Yes — Do not ask the "proceed with the installation" question. Licences are never accepted automatically.
-InstallPrerequisites --install-prerequisites Also install a missing Git and JDK, without being asked.
-SkipVisualStudio --skip-desktop-toolchain Do not install the platform toolchain.
-SkipAndroid --skip-android Do not install the Android SDK.
-SkipAndroidLicenses --skip-android-licenses Do not run the Android SDK licence step.
-SkipVerification --skip-verification Do not run the final checks.
-LogDirectory <path> --log-dir <path> Where to write the run log.

Environment variables

Needed when you cannot pass parameters — which is the case with irm … | iex and curl … | bash. A command-line parameter always wins.

Variable Equivalent
FLUTSTALLER_INSTALL_ROOT -InstallRoot
FLUTSTALLER_VS_EDITION -VsEdition
FLUTSTALLER_INSTALL_PREREQUISITES -InstallPrerequisites
FLUTSTALLER_SKIP_VISUAL_STUDIO -SkipVisualStudio
FLUTSTALLER_SKIP_ANDROID -SkipAndroid
FLUTSTALLER_SKIP_ANDROID_LICENSES -SkipAndroidLicenses
FLUTSTALLER_SKIP_VERIFICATION -SkipVerification
FLUTSTALLER_DRY_RUN -DryRun
FLUTSTALLER_PREFLIGHT_ONLY -PreflightOnly
FLUTSTALLER_YES -Yes
FLUTSTALLER_LOG_DIRECTORY -LogDirectory
FLUTSTALLER_INSTALL_ROOT=/opt/dev FLUTSTALLER_YES=1 \
  curl -fsSL https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.sh | bash

The interactive menu

Run without --yes (or -Yes) and the installer asks what you want:

+- WHAT WOULD YOU LIKE TO INSTALL? ---------------------------------------------------------------+
|   ->  1   Install all three components                                                           |
|   ->  2   The Flutter SDK on its own                                                             |
|   ->  3   The Android SDK on its own                                                             |
|   ->  4   The platform toolchain on its own                                                      |
|   ->  5   Preflight report only (change nothing)                                                 |
+--------------------------------------------------------------------------------------------------+

It is skipped when running unattended or from a pipe, so the one-liner and the CI paths stay non-interactive. An explicit switch always wins over the menu — -SkipAndroid still skips the Android SDK even if you pick "everything".

The platform differences, in one table

Windows Linux macOS
Install root C:\development ~/.bin/development ~/.bin/development
Toolchain Visual Studio 2026 + MSVC, CMake, Windows SDK clang, cmake, ninja, pkg-config, GTK 3 and libstdc++ headers Xcode, xcode-select, xcodebuild -license
Package manager the Visual Studio bootstrapper apt, dnf, yum, zypper, pacman, apk, xbps, emerge, eopkg — detected Homebrew, when present
Elevation UAC prompt sudo, for the packages only sudo, for the Xcode licence only
Shell profile the user PATH in the registry ~/.bashrc / ~/.zshrc / ~/.profile ~/.zshrc
Web target Chrome (detected) Chrome (detected) Safari (built in)
Apple Silicon — — the mac_arm64 Android tools are selected; Rosetta 2 is checked for

The Linux desktop packages

Flutter's documentation lists clang, cmake, ninja-build, pkg-config, libgtk-3-dev and libstdc++-12-dev. The script maps them onto whichever package manager it finds:

Purpose apt dnf / yum zypper pacman apk
C/C++ compiler clang clang clang clang clang
Build system cmake cmake cmake cmake cmake
Build executor ninja-build ninja-build ninja ninja ninja-build
Library discovery pkg-config pkgconf-pkg-config pkg-config pkgconf pkgconf
GTK 3 headers libgtk-3-dev gtk3-devel gtk3-devel gtk3 gtk3-dev
liblzma headers liblzma-dev liblzma-devel liblzma-devel xz xz-dev
OpenGL (Mesa) libglu1-mesa mesa-libGLU-devel libglu1-mesa glu mesa-glu-dev
C++ standard library libstdc++-N-dev libstdc++-devel libstdc++-devel gcc libstdc++-dev

xbps-install, emerge and eopkg are supported too. The -N- in libstdc++-N-dev is resolved at run time — the number follows the GCC major version (12 on Ubuntu 22.04, 13 on 24.04, 14 on 24.10), so the newest one the distribution actually offers is used.

On macOS

There is no package manager in the box, so:

  • Xcode is required. If the command line tools are missing, the installer offers to install them (xcode-select --install, which opens the system dialog) and explains what to do afterwards.
  • Rosetta 2 is checked for on Apple Silicon. The install command accepts a licence of its own, so it is left for you to run.
  • Homebrew, when present, is used for anything that needs installing.

Remote execution

Both installers are written to survive being piped, where there is no file on disk:

Situation Behaviour
No script file It never calls exit — on Windows that would close your PowerShell session.
Log location Written to a temporary folder; the path is printed.
Your session's StrictMode Restored to whatever it was when the script finishes.
Configuration Read from the environment variables above.
Elevation (Windows) It fetches the canonical copy of the script to a temporary file and runs that in the elevated window.

You can also pass parameters by turning the download into a script block:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.ps1))) -InstallRoot 'D:\dev' -DryRun
curl -fsSL https://raw.githubusercontent.com/kernelk14/flutstaller/main/install.sh | bash --dry-run

Running without a terminal

A piped run has no terminal on standard input, so anything that would ask a question would read EOF and silently do nothing. The installers therefore detect this and behave differently:

With a terminal Piped / unattended
The component menu shown skipped
"Proceed with the installation?" asked proceeds — you asked for it
The Android SDK licence asked accepted, after the agreement is printed in full. It is recorded in the SDK's licenses folder and listed in the report
The Xcode licence asked not accepted — an Apple licence always needs an explicit confirmation, so it is reported as an outstanding action instead
The prerequisites (Git, JDK) asked not installed unless you pass -InstallPrerequisites

A word of caution. irm … | iex executes whatever the server returns at that moment, without showing you the code first. That is a property of the pattern, not of this project. If that trade-off is not for you, download the file and read it — each installer is a single readable file, and every URL it uses is listed in How it works.

For a reproducible install, pin a version. main moves, and the CDN that serves it can briefly lag behind a push. Use a tag or a commit instead:

irm https://raw.githubusercontent.com/kernelk14/flutstaller/v0.2.0/install.ps1 | iex
curl -fsSL https://raw.githubusercontent.com/kernelk14/flutstaller/v0.2.0/install.sh | bash

Verification

When the installer finishes it runs and reports on:

  • flutter --version
  • flutter config --enable-windows-desktop (or --enable-linux-desktop / --enable-macos-desktop)
  • flutter doctor -v
  • flutter doctor --android-licenses (interactive — you confirm each licence)
  • adb version
  • Windows — the MSVC compiler (cl.exe), the CMake tools, MSBuild and the Windows SDK
  • Linux — clang, cmake, ninja, pkg-config and the GTK 3 development libraries (pkg-config --exists gtk+-3.0)
  • macOS — Xcode
  • that flutter and adb resolve through PATH
  • that the accepted Android SDK licence was recorded in the SDK's licenses folder

If any check fails the installer says so and exits non-zero — it never reports success when a verification failed.


Re-running it

The installers are safe to run again:

  • Existing installations are detected and left untouched — Flutter, the command-line tools, the Android packages and Visual Studio are each skipped.
  • PATH entries are compared case-insensitively and are never duplicated.
  • Nothing is deleted and no existing directory is overwritten. If a target directory exists but is not a valid installation, the script stops with an error instead of replacing it.
  • Environment variables that already hold the right value are left alone.

Logs

Every run writes a log next to the script — logs/flutter-setup-<timestamp>.log — or to a temporary folder (%TEMP%\flutstaller-logs, /tmp/flutstaller-logs) when the script is piped. It contains the full output of each step, the resolved download URLs, the checksums and the verification results.

Attach the log to any bug report — it is by far the most useful thing you can provide.


Troubleshooting

Symptom What to do
"Unable to find git in your PATH" Git is missing. Install it from https://git-scm.com/download/win on Windows, or with your package manager on Linux and macOS. Or re-run with -InstallPrerequisites.
flutter doctor reports no Java A JDK is missing. Re-run with -InstallPrerequisites, or allow the Visual Studio OpenJDK component on Windows (the installer does this automatically when no JDK is found).
"running scripts is disabled on this system" See Script execution policy below.
The Visual Studio installer was cancelled Exit code 1602 means the installer window was closed. Re-run the script.
The Visual Studio installer returns 740 It needs elevation. Re-run from an elevated PowerShell window.
flutter doctor cannot find the Android SDK Run flutter config --android-sdk <your install root>/Android/Sdk.
flutter doctor says the GTK 3 libraries are missing (Linux) Install libgtk-3-dev (or gtk3-devel, gtk3, gtk3-dev on the other distributions) — the installer does this, but it needs sudo.
xcode-select: error: tool 'xcode-select' requires macOS 10.15 or later (macOS) The command line tools are missing. Re-run the installer, or run xcode-select --install and finish the system dialog.
xcodebuild: error: The license is not accepted (macOS) Run sudo xcodebuild -license and read the agreement.
The Mac is Apple Silicon and an x86_64 tool will not run Install Rosetta 2: softwareupdate --install-rosetta --agree-to-license.
The Android CLI is not found after the install The command-line tools may be older than 23.0, which had no native android binary. Re-run the installer to update them.
Not enough disk space Free up space, or point -InstallRoot / --install-root at a drive with room.
The script is blocked by the execution policy (Windows) Unblock-File -LiteralPath .\install.ps1 — this changes no policy.
Permission denied running ./install.sh The file lost its executable bit. Run chmod +x install.sh, or just bash install.sh.

Script execution policy

Your effective policy is normally RemoteSigned, which runs local scripts freely and only blocks scripts that Windows has marked as "downloaded from the internet" (and that are unsigned).

Get-ExecutionPolicy -List

run-setup.cmd checks this for you and prints the right remedy:

Situation Remedy
The script carries a mark-of-the-web Unblock-File -LiteralPath '<path>' — one file, no policy change
The policy is Restricted Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force — per user, no admin rights needed
The policy is AllSigned and the script is unsigned Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force

Avoid Bypass and Unrestricted. Bypass disables script security entirely for that scope or process, so anything that runs in it is unverified. This project never uses it.


About this project

flutstaller was written by an AI. The whole repository — the installers, the CI workflow, this documentation — was generated by OpenCode, an AI coding agent, from a written specification. A human reviewed the result and published it, but the code itself came out of a model.

Why say so, plainly

An installer is a program that downloads and runs things on your machine with your permissions. That is exactly the kind of program where "trust me" is a weak argument, and exactly the kind of program a reader deserves to know the provenance of.

The honest position is:

  • You should not run code you have not read, and this code is no exception. That is why each installer is a single readable file rather than a framework.
  • The security properties are verifiable by reading it. The script downloads from a handful of hosts, all of them the vendor's own, and they are listed in How it works. It verifies the SHA-256 of the Flutter archive and the SHA-1 of the Android command-line tools against the checksums the vendors publish. It never calls Set-ExecutionPolicy, never uses -ExecutionPolicy Bypass, and never installs anything you did not ask for.
  • It has been run on real machines. The Android SDK, the PATH entries and the environment variables described in this README were produced by actual runs, and the CI workflow exercises the file, pipe and dry-run paths on every push — on Windows, Ubuntu and macOS.
  • It is not finished forever. Issues are welcome — see Contributing. A human-maintained fork is a perfectly reasonable thing to want.

What "written by an AI" does and does not mean

It means the code came from a language model rather than from someone's keystrokes. It does not mean nobody checked it: the behaviour described here was verified by running it, the edge cases in Troubleshooting were found by hitting them, and the changelog records what was fixed and why.

If you would rather not use it

That is a completely reasonable position. The components it installs all have their own official installers:

Component Official download
Flutter SDK https://docs.flutter.dev/install/manual
Android SDK command-line tools https://developer.android.com/tools/agents/android-cli/download
Visual Studio 2026 (Windows) https://visualstudio.microsoft.com/downloads/
Linux desktop packages your distribution's package manager
Xcode (macOS) the App Store, or https://developer.apple.com/xcode/

The value this project adds is doing the whole thing in one pass, from the vendors' own manifests, with the PATH and environment variables configured consistently and a report at the end telling you what state you are in. If that is not worth running AI-written code for, install them by hand — the Before you run it section tells you exactly what to set.


Contributing

Pull requests are welcome — see CONTRIBUTING.md for the checks to run before you open one.

Security

Please do not open a public issue for a security problem — see SECURITY.md.

License

MIT © Khyle Angelo Isaias

The code was written by an AI coding agent (OpenCode); see About this project. The MIT licence applies to the result, whoever typed it.

Official documentation

About

One-command Flutter development environment setup for Windows, Linux and macOS: Flutter SDK, Android SDK command-line tools, and the platform toolchain (Visual Studio 2026 / C++ + GTK / Xcode).

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages