Skip to content

Support for Flutter & Dart commands (flutter pub, flutter analyze, dart analyze) #1098

Open

Description

@azulmouad

Feature Request: Flutter & Dart Support

Context

I'm using RTK extensively and ran rtk discover, which showed significant missed savings from Flutter and Dart commands.

Unhandled Commands

  • flutter pub (30x)
  • flutter analyze (30x)
  • dart analyze (5x)

Example usage:

  • flutter pub get 2>&1
  • flutter analyze --no-pub 2>&1
  • dart analyze lib/... 2>&1

Problem

These commands generate large outputs, especially:

  • flutter analyze → very verbose lint + diagnostics
  • dart analyze → similar static analysis output

Currently RTK does not optimize or filter these outputs, leading to unnecessary token usage.

Suggested Solution

Add support similar to existing commands like rtk grep / rtk read, for example:

  • rtk flutter analyze

    • Summarize issues (errors, warnings, info)
    • Group by file
    • Collapse repeated diagnostics
    • Show counts + top issues
  • rtk flutter pub

    • Filter install logs
    • Highlight only:
      • errors
      • dependency conflicts
      • version changes
  • rtk dart analyze

    • Same approach as flutter analyze

Expected Benefit

From rtk discover:
~65 executions → significant token savings (flutter analyze alone is very heavy)

Additional Notes

Flutter/Dart workflows are common, so this could benefit a large number of developers using RTK.

Happy to help test or provide sample outputs if needed.

Activity

  1. added
    effort-medium
    enhancement
    on Apr 10, 2026
  2. pszymkowiak commented on Apr 10, 2026

    @pszymkowiak
    Collaborator

    wshm · Automated triage by AI

    🔍 Automated Triage

    ✨ Category feature
    🟡 Priority medium
    🎯 Confidence 91%

    Summary

    Feature request to add RTK support for flutter pub, flutter analyze, and dart analyze commands; already being addressed by PR #1128 which includes flutter/dart support.


    Triaged automatically by wshm · This is an automated analysis, not a human review.

  3. XtheWiz commented on Apr 19, 2026

    @XtheWiz

    Production data from a Flutter + Bun monorepo (30-day rtk discover)

    Adding real numbers to bump priority — our project has significantly higher usage than the original report.

    Command Monthly runs Example
    flutter test 551 flutter test 2>&1
    flutter run 261 flutter run --dart-define=ENV=prod -d 04CACC81-746D-4001-A0FE-E54636235370
    flutter analyze 200 flutter analyze 2>&1
    flutter build 99 flutter build ios --release 2>&1
    flutter pub 35 flutter pub get

    Total: ~1,146 flutter calls/month unoptimized → estimated ~150K+ tokens/month in avoidable output.

    What we'd want from each

    rtk flutter test (highest priority — 551 runs)

    • Show only failing tests (errors + stack traces), suppress passing output
    • Summary line: N tests, M failures, K skipped (mirror rtk jest behavior)
    • Preserve error file:line for clickable IDE links

    rtk flutter run (261 runs)

    • Suppress repetitive hot-reload boilerplate (Reloaded N of M libraries, Flutter run key commands)
    • Keep: build errors, runtime exceptions, print() output
    • This is often piped through CI or called once per session — mostly noise

    rtk flutter analyze (200 runs)

    • Failures-only mode: errors + warnings, suppress No issues found! noise
    • Group by file, show count summary at top

    rtk flutter build (99 runs)

    • Warnings-only: suppress verbose compile steps, keep errors + final artifact path

    Stack context

    Flutter 3.41 / Dart 3.11 monorepo (iOS + Android), Bun + Elysia.js API. We run flutter test and flutter analyze in every QA cycle — they're the two biggest output spammers in our workflow.

    Happy to provide raw sample outputs from each command if useful for implementing the Rust module.

  4. rajat-ventura commented on Apr 30, 2026

    @rajat-ventura

    hey @azulmouad could you please share samples? i'd like to pick this up

  5. carlosfiori commented on May 26, 2026

    @carlosfiori

    Hey! I put together a Flutter example project with real command outputs to help implement this feature.

    Repo: https://github.com/carlosfiori/rtk_flutter

    Pre-captured samples are in samples/ — no Flutter install needed to reference them.


    flutter pub get → samples/flutter_pub_get.txt
    58 packages resolved. Includes individual package lines, the Changed N dependencies! summary, and the outdated packages notice.

    flutter analyze → samples/flutter_analyze.txt
    20 issues (18 info, 2 warning) across 3 files. Covers avoid_print, unused_element, unused_local_variable, always_declare_return_types, and more.

    flutter test → samples/flutter_test.txt / expanded reporter
    11 passed, 3 failed. Includes unit test failures, widget test failures with the Flutter exception format, and the Failing tests: summary block.

    dart run build_runner build → 3 scenarios:


    Happy to add more scenarios if useful (e.g. dart analyze, specific failure types, etc.).

  6. carlosfiori commented on May 26, 2026

    @carlosfiori

    Adding one more scenario for flutter analyze:

    flutter analyze lib/models/cart.dart → samples/flutter_analyze_no_issues.txt
    Clean file, no issues — shows the exact No issues found! (ran in 0.1s) format that RTK can use as a short-circuit match.

  7. carlosfiori commented on May 26, 2026

    @carlosfiori

    @rajat-ventura I've added some examples, see if they help.

  8. vivekkartha commented on Jun 15, 2026

    @vivekkartha

    I've raised a PR to support flutter #2456

  9. Olyno commented on Jul 11, 2026

    @Olyno

    Hi there!

    For Dart/Flutter, I think the right split is to rewrite semantic output and filter pure noise. dart test/flutter test and analyze produce structured information the LLM actually needs, like pass/fail status, failure blocks with file/line, warnings. So stripping lines blindly risks dropping useful signal. Summarizing that output instead would keep the meaningful parts while cutting the progress dots, stack frames, and redundant context.

    For pub get, build, and build_runner, I think a declarative TOML filter is the better fit because the output is almost entirely progress noise. There's no semantic state to preserve, so a filter that caps lines and strips known spam patterns is simpler and just as effective.

    On the test/analyzer side, using the JSON or machine reporter when available would make the rewrite much more reliable than parsing free-form ANSI output. A green run could collapse to a single summary line, and failures could stay bounded to a handful of blocks. That feels like the best balance between token efficiency and keeping the signal intact.

    What do you think?

  10. elana-voss commented on Oct 5, 2026

    @elana-voss

    Would be very nice to have. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clieffort-mediumenhancementhelp wantedpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions