Skip to content
CAI
Software that uses CAICheck a score

leoafarias/fvm

60.5

Adequate · 17 November 2026

11k

lines of production code

Dart

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Enforce code quality checks via Husky hooks

The project now uses Husky to automatically run linting and analysis before commits and pushes. The pre-commit hook executes \lint\_staged\ for formatting and runs \dart analyze\ on the entire project, while the pre-push hook ensures \dart analyze\ passes again and optionally runs DCM analysis if available, helping prevent merge conflicts and maintain code standards.

.husky · high confidence

Introduce standalone fvm\_mcp server package

The new \fvm\_mcp\ package provides a standalone Model Context Protocol (MCP) server that exposes FVM capabilities as tools. It supports read-only JSON API queries (such as listing cached SDKs and releases) and, on FVM 3.2.0+, non-interactive mutating commands (install, remove, use, global). The server automatically detects the installed FVM version to gate features and can be run from source or installed as a prebuilt binary for Linux, macOS, and Windows.

_fvm\mcp · high confidence

Introduces new utility library for string manipulation, versioning, and environment context

This change adds a comprehensive set of utility files to the \lib/src/utils\ directory, introducing new capabilities for the product. It includes \change\_case.dart\ for converting strings to camelCase, snake\_case, and other formats; \compare\_semver.dart\ and \helpers.dart\ for semantic version comparison and parsing of Flutter/Dart version outputs; \context.dart\ and \constants.dart\ for managing application state, configuration paths, and environment variables (including CI detection); \console\_utils.dart\ for formatted table output; and \git\_utils.dart\ along with \git\_clone\_progress\_tracker.dart\ for improved Git operations and progress display. These utilities support core features like SDK management, configuration handling, and user-facing command output.

lib/src/utils · high confidence

New 'fvm api' command for programmatic JSON access

A new \fvm api\ command has been added to provide structured JSON output for FVM data, enabling easier integration with external tools and scripts. This command includes subcommands for listing installed SDK versions (\api list\), viewing available releases (\api releases\), checking environment context (\api context\), retrieving project configuration (\api project\), and identifying cleanup candidates (\api cleanup\). The output can be compressed using the \--compress\ flag for compact JSON.

lib/src/commands · high confidence

New JSON API response models for cache, cleanup, releases, projects, and context

The application now includes a new set of typed response models in \lib/src/api/models/json\_response.dart\ to support structured JSON API interactions. These models define the data structures for \GetCacheVersionsResponse\ (including version lists, project roots, and unreferenced SDKs), \GetCleanupResponse\ (detailing patch upgrades, unused SDKs, and removable items), \GetReleasesResponse\ (channels and release versions), \GetProjectResponse\ (project details), and \GetContextResponse\ (FVM context). Each model is equipped with serialization/deserialization mappers via \dart\_mappable\, enabling consistent parsing of API payloads for these specific endpoints.

lib/src/api/models · high confidence

New JSON API service for FVM data access

A new \ApiService\ has been introduced in \lib/src/api\ to provide structured JSON responses for FVM integrations. This service exposes endpoints to retrieve the current FVM context, project information, cached SDK versions (including size and unreferenced status), cleanup plans for unused SDKs and patch upgrades, and filtered lists of available Flutter releases.

lib/src/api · high confidence

New bin/compile.dart script for native executable installation

A new script, bin/compile.dart, has been added to the project. This script automates the process of compiling the FVM Dart package into a native executable and installing it to /usr/local/bin on macOS and Linux systems. It handles the compilation via \dart compile exe\, moves the resulting binary to the destination, cleans up temporary files, and deactivates the previously globally activated version of FVM. The existing bin/main.dart entry point remains unchanged, continuing to serve as the standard CLI runner.

bin · high confidence

New local testing and migration validation scripts for FVM

Added a suite of utility scripts in the \scripts/\ directory to support local development and validation workflows. This includes \test-install.sh\ and \test-install-arch.sh\ to verify installation logic, root-safety warnings, and macOS Rosetta-aware architecture detection without requiring network downloads. A new \manual-migration-test.sh\ validates the migration of legacy git caches to the hardened bare mirror architecture. Additionally, \test-workflows.sh\ enables local execution of GitHub Actions workflows using \act\, and \install.ps1\ provides a PowerShell installation path for Windows.

scripts · high confidence

New releases client with caching and fallback logic

A new \FlutterReleaseClient\ service has been introduced to manage Flutter SDK release data. This client implements an instance-level cache for fetched release information to improve performance. It features a robust fallback mechanism that attempts to fetch release data from a GitHub-hosted cache first, and if that fails, falls back to the official Google Storage endpoint. The service also provides methods to retrieve releases by channel, validate specific versions, and fetch the latest release for a given channel.

_lib/src/services/releases\service · high confidence

New tooling scripts for Homebrew formula generation and test fixture recording

The tool directory now includes a Homebrew formula template (fvm.template.rb) for packaging FVM, a grinder script (grind.dart) to automate compilation and test execution, and a utility (record\_test\_fixtures.dart) to generate JSON fixtures for Flutter version and release data.

tool · high confidence

Removals

Removal of placeholder CLI commands and root configuration

The \cmd\ package has removed several stub commands (\beta\, \dev\, \master\, \prune\, \remove\, \stable\) and the root command definition (\root.go\). These files contained only placeholder Cobra command structures with no functional implementation (e.g., \stable\ had an empty \runStableCmd\). Consequently, these commands are no longer available in the CLI interface, and the root configuration logic (config file loading via Viper) has been removed from this package.

cmd · high confidence

Behavioural changes

FVM version 4.3.1 release with updated CLI runner and update checks

This release updates the FVM CLI to version 4.3.1. The core command runner has been restructured to use the \CompletionCommandRunner\ from the \cli\_completion\ package, enabling shell completion support. It now includes explicit registration for commands such as \flavor\, \integration\_test\, and \exec\. The runner also implements automatic update checks via \pub\_updater\, displaying a prompt if a newer version is available, and warns users about deprecated or legacy environment variables like \FVM\_GIT\_CACHE\ and \FVM\_HOME\.

lib/src · high confidence

Migration from Go to Dart for core library implementation

The core library implementation has been migrated from Go to Dart. The previous Go-based setup logic (lib/setup.go), which handled cloning Flutter channels, renaming version directories, and running doctor checks, has been removed. It is replaced by a new Dart entry point (lib/fvm.dart) that exports a comprehensive set of models (cache, config, versions), services (cache, project, releases), and utilities (git, context, exceptions) to support the Flutter Version Management tool's functionality.

lib · high confidence

New data models for cached versions, cleanup actions, and configuration

The application now uses a new set of immutable, serializable models in \lib/src/models\ to manage SDK state and settings. \CacheFlutterVersion\ replaces ad-hoc version detection with a structured model that loads metadata (Flutter/Dart SDK versions, setup status) from disk, supporting both the modern \flutter.version.json\ (Flutter 3.13+) and legacy \version\ files. \CleanupAction\ and \PatchUpgrade\ models define the data structure for the new SDK cleanup and patch-upgrade capabilities. \FlutterRootVersionFile\ provides a dedicated parser for the Flutter SDK's internal version JSON. Configuration is now handled by \EnvConfig\, \AppConfig\, and \LocalAppConfig\ classes, which expose settings like \cachePath\, \useGitCache\, and \flutterUrl\ via both environment variables and command-line arguments. All models use \dart\_mappable\ for JSON serialization and include copy-with builders for immutability.

lib/src/models · high confidence

New service layer for configuration, caching, and project management

The \lib/src/services\ directory has been refactored into a structured service layer. \AppConfigService\ now handles configuration merging from global, environment, and project sources, including legacy \FVM\_HOME\ support. \CacheService\ manages the local SDK cache, including version matching and fork directory cleanup. \CleanupService\ introduces a new plan-based approach to identify unused SDKs and patch upgrades. \ProjectRegistryService\ tracks known project roots to improve the accuracy of the \fvm list\ unused SDK detection. \GitService\ and \FlutterService\ manage the git cache and SDK cloning, with improved error handling for cache corruption. \ProcessService\ now scrubs git-specific environment variables to prevent repository context leakage. \LoggerService\ provides a unified interface for logging and interactive prompts.

lib/src/services · high confidence

Refactored core workflows into dedicated, modular classes

The monolithic logic in the workflows directory has been split into distinct, single-responsibility classes to improve maintainability and clarity. Key changes include: \UseVersionWorkflow\ now orchestrates the SDK switching process by calling specific handlers for setup, dependency resolution, and IDE configuration; \EnsureCacheWorkflow\ handles SDK caching with improved integrity checks, automatic corruption recovery, and version mismatch resolution; \UpdateProjectReferencesWorkflow\ manages the \.fvm\ directory structure and symlinks; and new dedicated workflows (\UpdateVsCodeSettingsWorkflow\, \UpdateMelosSettingsWorkflow\, \SetupGitIgnoreWorkflow\) automatically configure IDE and monorepo settings. Additionally, \CheckProjectConstraintsWorkflow\ enforces SDK version compatibility with project constraints, and \ValidateFlutterVersionWorkflow\ provides stricter validation for forked versions.

lib/src/workflows · high confidence

Release tooling migrated to a dedicated package structure

The release automation scripts have been reorganized into a standalone \tool/release\_tool\ package, separating them from the main project root. This change introduces a new \grind.dart\ entry point that configures \cli\_pkg\ for publishing the FVM tool to GitHub and Homebrew, including a specific fix to use the canonical repository owner to prevent deployment failures during account redirects. The new structure includes dedicated analysis options and unit tests for the release logic, such as fetching GitHub releases and handling HTTP requests, ensuring the tooling is more modular and testable.

_tool/release\tool · high confidence

Replaced manual JSON parsing with generated mappable models for release data

The releases service models have been refactored to use the \dart\_mappable\ library for serialization and deserialization. New \FlutterReleasesResponse\ and \FlutterSdkRelease\ classes now handle parsing the release API payload, including mapping JSON fields like \release\_date\ and \dart\_sdk\_arch\ to their respective Dart properties. This change introduces generated mapper files to handle object instantiation and copying, replacing previous manual parsing logic and ensuring consistent, type-safe handling of release channel data (stable, beta, dev) and SDK metadata.

_lib/src/services/releases\service/models · high confidence

Updated Flutter release metadata and version bump

The tool's local release manifests (releases\_macos.json, releases\_windows.json, releases\_linux.json) have been updated with the latest available Flutter SDK versions from the official Google Storage channel, ensuring the CLI can discover and install the most recent stable, beta, and dev builds. This change is accompanied by a version bump to the tool itself, reflecting the latest release cycle.

(repo-wide) · high confidence

Test coverage

Added comprehensive test suite for FVM commands and version handling; Added integration test for FVM v3 to current cache migration; Added service-layer test coverage for configuration, caching, and Git operations; Added test helpers for fast, deterministic Flutter SDK and service mocking; Added test support assets for PTY-based SIGINT cleanup verification; Added tests for API, cleanup, destroy, list, and remove commands; Added tests for FVM service layer logic; Added tests for path conversion, file lock detection, and git clone progress tracking; Added unit tests for FlutterVersion model; Added unit tests for cache, root version, and project registry models; Added unit tests for utility functions; Expanded test coverage for FVM command-line operations; Expanded test coverage for FVM workflow behaviors.

Dependencies

New documentation site and MCP server dependencies added

The project now includes a new Nextra-based documentation site under the docs folder, introducing dependencies such as Next.js, React, Tailwind CSS, and Algolia DocSearch. Additionally, a new FVM MCP server package (fvm\_mcp) has been added, bringing in the dart\_mcp library to expose FVM as tools, alongside standard Dart utilities like process and pub\_semver. The main FVM CLI and its release tooling have also updated their dependency sets, with the release tool specifically adopting cli\_pkg 2.14.0 for automation.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 58.1 → 60.5 (+2.4)
  • Rubric changed (rubric-2026.11.2 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 87.1 → 86.7 (-0.4)
  • Architecture 95.5 → 96.0 (+0.5)
  • Maturity 64.3 → 66.3 (+2.0)
  • Readiness 51.6 → 56.6 (+5.0)
  • Security 58.5 → 58.5 (0.0)
  • Performance 60.0 → 60.0 (0.0)

Resolved (4)

  • Hotspot: lib/src/commands/list_command.dart (lib/src/commands/list_command.dart)
  • No ADRs found
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion

New (11)

  • Edited copy of a member (10 corresponding lines) (lib/src/commands/dart_command.dart)
  • Edited copy of a member (11 corresponding lines) (lib/src/services/git_service.dart)
  • Edited copy of a member (13 corresponding lines) (fvm_mcp/lib/src/process_runner.dart)
  • Edited copy of a member (13 corresponding lines) (lib/src/services/git_service.dart)
  • Edited copy of a member (13 corresponding lines) (lib/src/services/logger_service.dart)
  • Edited copy of a member (16 corresponding lines) (lib/src/commands/global_command.dart)
  • Hotspot: lib/src/workflows/ensure_cache.workflow.dart (lib/src/workflows/ensure_cache.workflow.dart)
  • No ADRs found (pubspec.yaml)
  • Off-boarding risk: anonymized user #1
  • Projects may be oversized for their cohesion (pubspec.yaml)
  • Repeated repair: lib/src/services/cache_service.dart (lib/src/services/cache_service.dart)

Changes since last survey

  • 6 commits — 5 feature/other, 1 fixes

By area

  • (root) — 4 commits
  • .github/workflows — 1 commit
  • lib/src — 1 commit

Notable commits

  • fix: fix: stop warning on every command for custom local SDKs (#1088)
  • change: chore: refresh Flutter release feeds
  • change: chore: refresh Flutter release feeds
  • change: chore: refresh Flutter release feeds
  • change: ci: skip every job on draft pull requests (#1086)
  • change: docs: refresh README badge links (#1087)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

leoafarias/fvm was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 17 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d3cdc1f8588047aac262aecdfea1182a3fe44cca — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.85+preprod-eba6548ac50f.