flutter-dev 0.1.8__tar.gz → 0.1.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/.env.example +8 -9
  2. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/CHANGELOG.md +31 -18
  3. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/PKG-INFO +51 -35
  4. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/README.md +50 -34
  5. flutter_dev-0.1.10/core/ai_config.py +297 -0
  6. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/fdev.py +26 -14
  7. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/flutter_dev.egg-info/SOURCES.txt +2 -2
  8. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/gemini_api.py +19 -74
  9. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/install_legacy.py +1 -1
  10. flutter_dev-0.1.10/managers/ai.py +232 -0
  11. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/app.py +22 -5
  12. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/brew.py +2 -2
  13. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/doctor.py +44 -31
  14. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/mirror.py +4 -1
  15. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/package.py +37 -1
  16. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/pyproject.toml +1 -1
  17. flutter_dev-0.1.10/tests/test_ai_config.py +187 -0
  18. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/tests/test_fdev_cli.py +9 -10
  19. flutter_dev-0.1.8/managers/ai.py +0 -113
  20. flutter_dev-0.1.8/managers/gui.py +0 -643
  21. flutter_dev-0.1.8/tests/test_gui.py +0 -268
  22. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/LICENSE +0 -0
  23. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/MANIFEST.in +0 -0
  24. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/common_utils.py +0 -0
  25. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/core/__init__.py +0 -0
  26. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/core/constants.py +0 -0
  27. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/core/state.py +0 -0
  28. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/create_page.py +0 -0
  29. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/git_diff_output_editor.py +0 -0
  30. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/__init__.py +0 -0
  31. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/build.py +0 -0
  32. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/datetime.py +0 -0
  33. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/device.py +0 -0
  34. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/git.py +0 -0
  35. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/git_account.py +0 -0
  36. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/localization.py +0 -0
  37. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/merge.py +0 -0
  38. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/project.py +0 -0
  39. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/managers/web_deploy.py +0 -0
  40. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/requirements.txt +0 -0
  41. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/setup.cfg +0 -0
  42. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/setup.py +0 -0
  43. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/switch_ai.py +0 -0
  44. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/tests/test_localization.py +0 -0
  45. {flutter_dev-0.1.8 → flutter_dev-0.1.10}/tests/test_package_commands.py +0 -0
@@ -1,26 +1,25 @@
1
1
  # AI API Keys Configuration
2
- # সব API keys এখানে secure ভাবে রাখুন
3
- # এই file টি .gitignore এ add করতে হবে
2
+ # API keys secure রাখুন এবং কারও সঙ্গে share করবেন না
4
3
 
5
- # Groq API (Current - Active)
6
- GROQ_API_KEY=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
4
+ # Groq API
5
+ GROQ_API_KEY=
7
6
  GROQ_API_URL=https://api.groq.com/openai/v1/chat/completions
8
7
  GROQ_MODEL=llama-3.3-70b-versatile
9
8
 
10
9
  # Mistral AI API
11
- MISTRAL_API_KEY=irrmymmw43lvCcARy08R1TZhHuqMgXwa
10
+ MISTRAL_API_KEY=
12
11
  MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
13
- MISTRAL_MODEL=mistral-medium
12
+ MISTRAL_MODEL=mistral-medium-latest
14
13
 
15
14
  # SambaNova API
16
- SAMBANOVA_API_KEY=c5c3f0dc-75db-4621-9d0c-7372efb4a04f
15
+ SAMBANOVA_API_KEY=
17
16
  SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
18
17
  SAMBANOVA_MODEL=Meta-Llama-3.3-70B-Instruct
19
18
 
20
19
  # OpenRouter API
21
- OPENROUTER_API_KEY=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
20
+ OPENROUTER_API_KEY=
22
21
  OPENROUTER_API_URL=https://openrouter.ai/api/v1/chat/completions
23
22
  OPENROUTER_MODEL=openai/gpt-3.5-turbo
24
23
 
25
24
  # Default AI Service (groq, mistral, sambanova, openrouter)
26
- DEFAULT_AI_SERVICE=groq
25
+ DEFAULT_AI_SERVICE=groq
@@ -2,47 +2,60 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
- ## 0.1.8 - 2026-06-25
5
+ ## 0.1.10 - 2026-07-16
6
6
 
7
- ### Fixed
7
+ ### Added
8
8
 
9
- - Made the dashboard command output panel visibly framed with a ready message so the terminal/log area does not appear missing before commands produce output.
9
+ - Added `fdev init` to create or repair persistent AI configuration with safe provider defaults and empty API-key fields.
10
+ - Added interactive hidden API-key entry and default/custom model selection when AI configuration is incomplete.
11
+ - Added `fdev ai <provider> <model>` for changing a provider's model without replacing its API key.
12
+ - Added Python coverage for configuration precedence, dotenv parsing, atomic updates, cancellation, permissions, platform paths, and doctor status.
10
13
 
11
- ## 0.1.7 - 2026-06-25
14
+ ### Changed
15
+
16
+ - Unified `fdev ai`, `fdev doctor`, `gemini-api`, and `fdev commit` around the same persistent AI configuration resolver.
17
+ - Updated the default Mistral model to `mistral-medium-latest`.
18
+ - Limited build-output directory creation to commands that use those directories.
12
19
 
13
20
  ### Fixed
14
21
 
15
- - Reworked the Tkinter dashboard to use classic Tk widgets with explicit colors so `fdev` stays visible on macOS Xcode/system Python runtimes that can render `ttk` widgets as a blank popup.
16
- - Silenced the macOS system Tk deprecation warning before launching the dashboard.
22
+ - Removed credentials from `.env.example` and replaced them with empty API-key values.
23
+ - Made AI configuration writes atomic and restricted the generated file to the current user on Unix-like systems.
24
+ - Cancelled AI setup without saving a partial key or sending a request when interrupted during key/model entry.
25
+ - Prevented exported provider/model overrides from being reported as successfully replaced by file-only changes.
17
26
 
18
- ## 0.1.6 - 2026-06-25
27
+ ## 0.1.9 - 2026-07-14
19
28
 
20
29
  ### Added
21
30
 
22
- - Added `fdev upgrade` to update the local `flutter-dev` package from PyPI after detecting the current OS.
23
- - Added `fdev delete` to uninstall the local `flutter-dev` package after detecting the current OS and confirming the destructive action.
31
+ - Added `fdev mirror --turn-screen-off` to keep mirroring while the physical Android display is off.
24
32
 
25
33
  ### Changed
26
34
 
27
- - `fdev upgrade` and `fdev delete` now print the exact Python executable they target before running `sys.executable -m pip`.
35
+ - Running `fdev` without a command now prints command help.
36
+ - `fdev clear-data` now skips confirmation when the foreground Android app matches the current Flutter project and uses a default-Yes prompt when it does not.
37
+ - `fdev upgrade` now prints the current installed version, Python environment, package location, upgrade source, and verified result version.
28
38
 
29
- ### Fixed
39
+ ### Removed
30
40
 
31
- - Reworked the Tkinter dashboard layout to avoid platform-sensitive paned-window sizing that could open a blank `fdev` popup after installing from PyPI.
41
+ - Removed obsolete desktop-only components and their related tests and documentation.
32
42
 
33
- ## 0.1.5 - 2026-06-24
43
+ ## 0.1.6 - 2026-06-25
34
44
 
35
45
  ### Added
36
46
 
37
- - Added a Tkinter desktop dashboard that opens by running `fdev` with no command.
38
- - Added GUI live log output with ANSI terminal color rendering.
39
- - Added GUI buttons for all documented command groups, including mirror variants, AI provider shortcuts, and GitHub account subcommands.
40
- - Added Python coverage for GUI command catalog, ANSI color parsing, and no-command CLI dispatch.
47
+ - Added `fdev upgrade` to update the local `flutter-dev` package from PyPI after detecting the current OS.
48
+ - Added `fdev delete` to uninstall the local `flutter-dev` package after detecting the current OS and confirming the destructive action.
49
+
50
+ ### Changed
51
+
52
+ - `fdev upgrade` and `fdev delete` now print the exact Python executable they target before running `sys.executable -m pip`.
53
+
54
+ ## 0.1.5 - 2026-06-24
41
55
 
42
56
  ### Changed
43
57
 
44
58
  - Kept command help available through `fdev help`, `fdev --help`, and `fdev -h`.
45
- - Documented Tkinter requirements for the desktop dashboard.
46
59
 
47
60
  ## 0.1.4 - 2026-06-15
48
61
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flutter-dev
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: A cross-platform CLI toolkit for Flutter development workflows.
5
5
  Author: Royal Court BD
6
6
  License-Expression: MIT
@@ -42,7 +42,7 @@ The package is published on PyPI as `flutter-dev` and installs console commands
42
42
  python -m pip install flutter-dev
43
43
  ```
44
44
 
45
- Current package metadata declares version `0.1.8`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
45
+ Current package metadata declares version `0.1.10`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
46
46
 
47
47
  ## Key Features
48
48
 
@@ -53,7 +53,6 @@ Current package metadata declares version `0.1.8`, Python `>=3.8`, MIT license,
53
53
  - AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
54
54
  - Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
55
55
  - Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
56
- - Small Tkinter desktop dashboard opened by running `fdev` with no command, with a framed live command output panel.
57
56
  - Environment diagnostics through `fdev doctor`.
58
57
  - Small utilities for Homebrew cleanup, file merging from `paths.txt`, AI provider switching, PyPI self-upgrade/delete, and git diff prompt export.
59
58
 
@@ -73,8 +72,6 @@ fdev doctor
73
72
 
74
73
  `python -m pip install flutter-dev` installs the Python package, Python dependencies, and console scripts into the Python environment selected by `python`. It does not install Flutter, Dart, Git, Android SDK tools, CocoaPods, Firebase CLI, GitHub CLI, `scrcpy`, Java/JDK, or VS Code CLI.
75
74
 
76
- The desktop dashboard uses Python Tkinter. Some Python distributions install this separately; for Homebrew Python, install the matching package such as `brew install python-tk@3.14`.
77
-
78
75
  ### Install From Source
79
76
 
80
77
  ```bash
@@ -122,14 +119,13 @@ Feature-specific external tools:
122
119
  | GitHub CLI / `gh` | `fdev git ...` |
123
120
  | VS Code CLI / `code` | Conflict helper in branch sync |
124
121
  | Homebrew | `brew`, macOS `install-scrcpy` flow |
125
- | Python Tkinter | Desktop dashboard opened by `fdev` |
126
122
 
127
123
  ## Quick Start
128
124
 
129
125
  Run commands from the root of a Flutter project when they need `pubspec.yaml`, Android Gradle files, iOS files, or build outputs.
130
126
 
131
127
  ```bash
132
- # Open the desktop dashboard
128
+ # Show command help
133
129
  fdev
134
130
 
135
131
  # Show command help
@@ -141,6 +137,9 @@ fdev upgrade
141
137
  # Check environment and optional tools
142
138
  fdev doctor
143
139
 
140
+ # Initialize persistent AI configuration
141
+ fdev init
142
+
144
143
  # Generate localization files
145
144
  fdev lang
146
145
 
@@ -202,11 +201,12 @@ Android APK/AAB build commands rename output files using the Android app label a
202
201
  | --- | --- |
203
202
  | `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
204
203
  | `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
205
- | `fdev clear-data` | Detects the foreground app, asks for confirmation, and runs `adb shell pm clear <package>` on Android. iOS prints manual options. |
204
+ | `fdev clear-data` | Detects the foreground app and runs `adb shell pm clear <package>` on Android. Confirmation is skipped when it matches the current Flutter project; otherwise the default-Yes safety prompt is shown. iOS prints manual options. |
206
205
  | `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
207
206
  | `fdev mirror` | Launches `scrcpy` for a selected Android device. |
208
207
  | `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
209
208
  | `fdev mirror --no-top` | Launches `scrcpy` without the always-on-top flag. |
209
+ | `fdev mirror --turn-screen-off` | Launches `scrcpy` while keeping the Android device display turned off. |
210
210
  | `fdev datetime` | Disables Android auto-time and opens Date & Time settings on the selected device. |
211
211
 
212
212
  When multiple Android devices are connected, device-aware commands prompt you to choose a device.
@@ -239,13 +239,15 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
239
239
 
240
240
  | Command | Description |
241
241
  | --- | --- |
242
- | `fdev` | Opens a small Tkinter desktop dashboard for running `fdev` commands with live colored logs and command input. The terminal process stays running while the window is open. |
243
- | `fdev help` | Shows command help without opening the dashboard. |
242
+ | `fdev` | Shows command help. |
243
+ | `fdev help` | Shows command help. |
244
244
  | `fdev doctor` | Checks platform, Python, Flutter/Dart/Git, Python packages, Android/iOS tools, optional CLIs, `.env`, Flutter project detection, and global `fdev` availability. |
245
- | `fdev upgrade` | Detects the OS, then upgrades the active Python environment's `flutter-dev` package from PyPI with `python -m pip install --upgrade flutter-dev`. |
245
+ | `fdev init` | Creates or repairs the persistent AI `.env` with safe provider defaults and empty API keys. |
246
+ | `fdev upgrade` | Shows the current version, Python environment, package location, and PyPI source, then upgrades with `python -m pip install --upgrade flutter-dev` and reports the resulting version. |
246
247
  | `fdev delete` | Detects the OS, asks for confirmation, then uninstalls the active Python environment's `flutter-dev` package. Use `fdev delete --yes` to skip confirmation. |
247
248
  | `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
248
249
  | `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
250
+ | `fdev ai <provider> <model>` | Switches provider when needed and saves a custom model ID for that provider. |
249
251
  | `fdev brew` | Interactive Homebrew package manager for viewing packages, uninstalling with cleanup, clearing cache, and global cleanup. |
250
252
  | `fdev merge` | Reads paths from `paths.txt`, merges file contents into `path_merge_files.txt`, and opens the result when there are no failures. |
251
253
  | `gemini-api` | Tests the currently selected AI provider configuration. |
@@ -269,7 +271,7 @@ GROQ_MODEL=llama-3.3-70b-versatile
269
271
 
270
272
  MISTRAL_API_KEY=your_mistral_api_key_here
271
273
  MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
272
- MISTRAL_MODEL=mistral-medium
274
+ MISTRAL_MODEL=mistral-medium-latest
273
275
 
274
276
  SAMBANOVA_API_KEY=your_sambanova_api_key_here
275
277
  SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
@@ -286,26 +288,47 @@ The AI runtime searches for configuration in this order:
286
288
 
287
289
  1. `FLUTTER_DEV_ENV`
288
290
  2. `$XDG_CONFIG_HOME/flutter-dev/.env`
289
- 3. `~/.config/flutter-dev/.env`
290
- 4. `~/scripts/flutter-tools/.env`
291
- 5. `.env` beside the installed module/source
292
- 6. `.env` in the current working directory
291
+ 3. `%APPDATA%/flutter-dev/.env` on Windows, otherwise `~/.config/flutter-dev/.env`
292
+ 4. The legacy `~/.config/flutter-dev/.env` path on Windows
293
+ 5. `~/scripts/flutter-tools/.env`
293
294
 
294
295
  Recommended setup:
295
296
 
296
297
  ```bash
297
- mkdir -p ~/.config/flutter-dev
298
- nano ~/.config/flutter-dev/.env
298
+ fdev init
299
299
  ```
300
300
 
301
- Then test:
301
+ `fdev init` never writes real credentials. It creates all provider URL/model
302
+ defaults with empty API-key fields, preserves existing values, and restricts the
303
+ file to the current user on Unix-like systems. On macOS and Linux the default
304
+ path is `~/.config/flutter-dev/.env`.
305
+
306
+ Then select a provider and test:
302
307
 
303
308
  ```bash
304
- fdev ai
309
+ fdev ai mistral
305
310
  gemini-api
306
311
  ```
307
312
 
308
- Note: the current `fdev doctor` `.env` check is more limited than the AI runtime lookup. If `doctor` reports a missing `.env` but `gemini-api` succeeds, the AI configuration is still usable.
313
+ If the selected provider's key is missing, `fdev commit` or `gemini-api` asks
314
+ for it using hidden terminal input and saves it to the active configuration.
315
+ After a new key is entered, press Enter to use the displayed default model or
316
+ enter another model ID for the same provider. Exported environment variables
317
+ continue to take precedence over values stored in `.env`.
318
+
319
+ Pressing `Ctrl+C` during key/model setup cancels the operation without saving a
320
+ partial key or sending an AI request. If an exported variable conflicts with a
321
+ provider/model change, `fdev` reports the override and asks you to unset it
322
+ instead of claiming that the file change became active.
323
+
324
+ Change the model later without replacing the API key:
325
+
326
+ ```bash
327
+ fdev ai groq llama-3.1-8b-instant
328
+ ```
329
+
330
+ `fdev doctor`, `fdev ai`, `gemini-api`, and `fdev commit` use the same persistent
331
+ configuration lookup.
309
332
 
310
333
  ## Feature/Page Generation
311
334
 
@@ -390,11 +413,12 @@ The installed Python layout is top-level modules plus the `core` and `managers`
390
413
  - `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
391
414
  - `fdev discard` removes tracked changes and untracked files after confirmation.
392
415
  - `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
393
- - `fdev clear-data` clears app data on Android after confirmation.
416
+ - `fdev clear-data` skips confirmation only when the foreground Android app matches the current Flutter project's package ID; otherwise it uses a default-Yes `[Y/n]` confirmation.
394
417
  - `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
395
418
  - `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
419
+ - `fdev upgrade` reports the installed version and location before upgrading, then shows the before→after version when the active process can verify it immediately.
396
420
  - `fdev delete` removes the `fdev` command from the current Python environment after confirmation; reinstall with `python -m pip install flutter-dev`.
397
- - `fdev` with no command opens the desktop dashboard. Use `fdev help` to print command usage.
421
+ - `fdev` with no command prints command usage.
398
422
  - Most command subcommands create build output directories at startup in the current working directory.
399
423
  - Some subcommands return failure internally without always mapping that failure to a non-zero process exit code, so automation should inspect command output carefully.
400
424
 
@@ -433,18 +457,6 @@ fdev delete
433
457
 
434
458
  Both commands print the detected OS and exact Python executable before running. They use that executable with `-m pip`, not a hardcoded `python`, `python3`, `pip`, or `pip3`, so the active venv/global Python that launched `fdev` is the environment that gets upgraded or deleted. On Windows, `fdev delete` and `fdev upgrade` schedule the same `sys.executable -m pip ...` operation in a delayed command process so the currently running console launcher can exit first.
435
459
 
436
- ### Blank Dashboard On macOS
437
-
438
- If `fdev` prints an Xcode/system Tk warning or opens a blank dashboard, upgrade to `flutter-dev` 0.1.7 or newer:
439
-
440
- ```bash
441
- fdev upgrade
442
- ```
443
-
444
- `fdev` prints the Python executable it is using. If that path is `/Applications/Xcode.app/Contents/Developer/usr/bin/python3`, the CLI is running on Xcode's bundled Python and system Tk; 0.1.7 uses a more conservative Tk UI path for that runtime.
445
-
446
- If the dashboard opens but the command output area looks missing or empty, upgrade to `flutter-dev` 0.1.8 or newer.
447
-
448
460
  ### Flutter Project Not Detected
449
461
 
450
462
  Run project-specific commands from the directory that contains `pubspec.yaml`.
@@ -480,8 +492,12 @@ Install or repair `scrcpy`:
480
492
  ```bash
481
493
  fdev install-scrcpy
482
494
  fdev mirror
495
+ fdev mirror --turn-screen-off
483
496
  ```
484
497
 
498
+ `--turn-screen-off` may be combined with `--no-top`. The mirrored window stays
499
+ active, but the physical Android display is turned off on supported devices.
500
+
485
501
  For wireless mirroring, connect the device over USB first:
486
502
 
487
503
  ```bash
@@ -8,7 +8,7 @@ The package is published on PyPI as `flutter-dev` and installs console commands
8
8
  python -m pip install flutter-dev
9
9
  ```
10
10
 
11
- Current package metadata declares version `0.1.8`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
11
+ Current package metadata declares version `0.1.10`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
12
12
 
13
13
  ## Key Features
14
14
 
@@ -19,7 +19,6 @@ Current package metadata declares version `0.1.8`, Python `>=3.8`, MIT license,
19
19
  - AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
20
20
  - Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
21
21
  - Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
22
- - Small Tkinter desktop dashboard opened by running `fdev` with no command, with a framed live command output panel.
23
22
  - Environment diagnostics through `fdev doctor`.
24
23
  - Small utilities for Homebrew cleanup, file merging from `paths.txt`, AI provider switching, PyPI self-upgrade/delete, and git diff prompt export.
25
24
 
@@ -39,8 +38,6 @@ fdev doctor
39
38
 
40
39
  `python -m pip install flutter-dev` installs the Python package, Python dependencies, and console scripts into the Python environment selected by `python`. It does not install Flutter, Dart, Git, Android SDK tools, CocoaPods, Firebase CLI, GitHub CLI, `scrcpy`, Java/JDK, or VS Code CLI.
41
40
 
42
- The desktop dashboard uses Python Tkinter. Some Python distributions install this separately; for Homebrew Python, install the matching package such as `brew install python-tk@3.14`.
43
-
44
41
  ### Install From Source
45
42
 
46
43
  ```bash
@@ -88,14 +85,13 @@ Feature-specific external tools:
88
85
  | GitHub CLI / `gh` | `fdev git ...` |
89
86
  | VS Code CLI / `code` | Conflict helper in branch sync |
90
87
  | Homebrew | `brew`, macOS `install-scrcpy` flow |
91
- | Python Tkinter | Desktop dashboard opened by `fdev` |
92
88
 
93
89
  ## Quick Start
94
90
 
95
91
  Run commands from the root of a Flutter project when they need `pubspec.yaml`, Android Gradle files, iOS files, or build outputs.
96
92
 
97
93
  ```bash
98
- # Open the desktop dashboard
94
+ # Show command help
99
95
  fdev
100
96
 
101
97
  # Show command help
@@ -107,6 +103,9 @@ fdev upgrade
107
103
  # Check environment and optional tools
108
104
  fdev doctor
109
105
 
106
+ # Initialize persistent AI configuration
107
+ fdev init
108
+
110
109
  # Generate localization files
111
110
  fdev lang
112
111
 
@@ -168,11 +167,12 @@ Android APK/AAB build commands rename output files using the Android app label a
168
167
  | --- | --- |
169
168
  | `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
170
169
  | `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
171
- | `fdev clear-data` | Detects the foreground app, asks for confirmation, and runs `adb shell pm clear <package>` on Android. iOS prints manual options. |
170
+ | `fdev clear-data` | Detects the foreground app and runs `adb shell pm clear <package>` on Android. Confirmation is skipped when it matches the current Flutter project; otherwise the default-Yes safety prompt is shown. iOS prints manual options. |
172
171
  | `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
173
172
  | `fdev mirror` | Launches `scrcpy` for a selected Android device. |
174
173
  | `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
175
174
  | `fdev mirror --no-top` | Launches `scrcpy` without the always-on-top flag. |
175
+ | `fdev mirror --turn-screen-off` | Launches `scrcpy` while keeping the Android device display turned off. |
176
176
  | `fdev datetime` | Disables Android auto-time and opens Date & Time settings on the selected device. |
177
177
 
178
178
  When multiple Android devices are connected, device-aware commands prompt you to choose a device.
@@ -205,13 +205,15 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
205
205
 
206
206
  | Command | Description |
207
207
  | --- | --- |
208
- | `fdev` | Opens a small Tkinter desktop dashboard for running `fdev` commands with live colored logs and command input. The terminal process stays running while the window is open. |
209
- | `fdev help` | Shows command help without opening the dashboard. |
208
+ | `fdev` | Shows command help. |
209
+ | `fdev help` | Shows command help. |
210
210
  | `fdev doctor` | Checks platform, Python, Flutter/Dart/Git, Python packages, Android/iOS tools, optional CLIs, `.env`, Flutter project detection, and global `fdev` availability. |
211
- | `fdev upgrade` | Detects the OS, then upgrades the active Python environment's `flutter-dev` package from PyPI with `python -m pip install --upgrade flutter-dev`. |
211
+ | `fdev init` | Creates or repairs the persistent AI `.env` with safe provider defaults and empty API keys. |
212
+ | `fdev upgrade` | Shows the current version, Python environment, package location, and PyPI source, then upgrades with `python -m pip install --upgrade flutter-dev` and reports the resulting version. |
212
213
  | `fdev delete` | Detects the OS, asks for confirmation, then uninstalls the active Python environment's `flutter-dev` package. Use `fdev delete --yes` to skip confirmation. |
213
214
  | `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
214
215
  | `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
216
+ | `fdev ai <provider> <model>` | Switches provider when needed and saves a custom model ID for that provider. |
215
217
  | `fdev brew` | Interactive Homebrew package manager for viewing packages, uninstalling with cleanup, clearing cache, and global cleanup. |
216
218
  | `fdev merge` | Reads paths from `paths.txt`, merges file contents into `path_merge_files.txt`, and opens the result when there are no failures. |
217
219
  | `gemini-api` | Tests the currently selected AI provider configuration. |
@@ -235,7 +237,7 @@ GROQ_MODEL=llama-3.3-70b-versatile
235
237
 
236
238
  MISTRAL_API_KEY=your_mistral_api_key_here
237
239
  MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
238
- MISTRAL_MODEL=mistral-medium
240
+ MISTRAL_MODEL=mistral-medium-latest
239
241
 
240
242
  SAMBANOVA_API_KEY=your_sambanova_api_key_here
241
243
  SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
@@ -252,26 +254,47 @@ The AI runtime searches for configuration in this order:
252
254
 
253
255
  1. `FLUTTER_DEV_ENV`
254
256
  2. `$XDG_CONFIG_HOME/flutter-dev/.env`
255
- 3. `~/.config/flutter-dev/.env`
256
- 4. `~/scripts/flutter-tools/.env`
257
- 5. `.env` beside the installed module/source
258
- 6. `.env` in the current working directory
257
+ 3. `%APPDATA%/flutter-dev/.env` on Windows, otherwise `~/.config/flutter-dev/.env`
258
+ 4. The legacy `~/.config/flutter-dev/.env` path on Windows
259
+ 5. `~/scripts/flutter-tools/.env`
259
260
 
260
261
  Recommended setup:
261
262
 
262
263
  ```bash
263
- mkdir -p ~/.config/flutter-dev
264
- nano ~/.config/flutter-dev/.env
264
+ fdev init
265
265
  ```
266
266
 
267
- Then test:
267
+ `fdev init` never writes real credentials. It creates all provider URL/model
268
+ defaults with empty API-key fields, preserves existing values, and restricts the
269
+ file to the current user on Unix-like systems. On macOS and Linux the default
270
+ path is `~/.config/flutter-dev/.env`.
271
+
272
+ Then select a provider and test:
268
273
 
269
274
  ```bash
270
- fdev ai
275
+ fdev ai mistral
271
276
  gemini-api
272
277
  ```
273
278
 
274
- Note: the current `fdev doctor` `.env` check is more limited than the AI runtime lookup. If `doctor` reports a missing `.env` but `gemini-api` succeeds, the AI configuration is still usable.
279
+ If the selected provider's key is missing, `fdev commit` or `gemini-api` asks
280
+ for it using hidden terminal input and saves it to the active configuration.
281
+ After a new key is entered, press Enter to use the displayed default model or
282
+ enter another model ID for the same provider. Exported environment variables
283
+ continue to take precedence over values stored in `.env`.
284
+
285
+ Pressing `Ctrl+C` during key/model setup cancels the operation without saving a
286
+ partial key or sending an AI request. If an exported variable conflicts with a
287
+ provider/model change, `fdev` reports the override and asks you to unset it
288
+ instead of claiming that the file change became active.
289
+
290
+ Change the model later without replacing the API key:
291
+
292
+ ```bash
293
+ fdev ai groq llama-3.1-8b-instant
294
+ ```
295
+
296
+ `fdev doctor`, `fdev ai`, `gemini-api`, and `fdev commit` use the same persistent
297
+ configuration lookup.
275
298
 
276
299
  ## Feature/Page Generation
277
300
 
@@ -356,11 +379,12 @@ The installed Python layout is top-level modules plus the `core` and `managers`
356
379
  - `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
357
380
  - `fdev discard` removes tracked changes and untracked files after confirmation.
358
381
  - `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
359
- - `fdev clear-data` clears app data on Android after confirmation.
382
+ - `fdev clear-data` skips confirmation only when the foreground Android app matches the current Flutter project's package ID; otherwise it uses a default-Yes `[Y/n]` confirmation.
360
383
  - `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
361
384
  - `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
385
+ - `fdev upgrade` reports the installed version and location before upgrading, then shows the before→after version when the active process can verify it immediately.
362
386
  - `fdev delete` removes the `fdev` command from the current Python environment after confirmation; reinstall with `python -m pip install flutter-dev`.
363
- - `fdev` with no command opens the desktop dashboard. Use `fdev help` to print command usage.
387
+ - `fdev` with no command prints command usage.
364
388
  - Most command subcommands create build output directories at startup in the current working directory.
365
389
  - Some subcommands return failure internally without always mapping that failure to a non-zero process exit code, so automation should inspect command output carefully.
366
390
 
@@ -399,18 +423,6 @@ fdev delete
399
423
 
400
424
  Both commands print the detected OS and exact Python executable before running. They use that executable with `-m pip`, not a hardcoded `python`, `python3`, `pip`, or `pip3`, so the active venv/global Python that launched `fdev` is the environment that gets upgraded or deleted. On Windows, `fdev delete` and `fdev upgrade` schedule the same `sys.executable -m pip ...` operation in a delayed command process so the currently running console launcher can exit first.
401
425
 
402
- ### Blank Dashboard On macOS
403
-
404
- If `fdev` prints an Xcode/system Tk warning or opens a blank dashboard, upgrade to `flutter-dev` 0.1.7 or newer:
405
-
406
- ```bash
407
- fdev upgrade
408
- ```
409
-
410
- `fdev` prints the Python executable it is using. If that path is `/Applications/Xcode.app/Contents/Developer/usr/bin/python3`, the CLI is running on Xcode's bundled Python and system Tk; 0.1.7 uses a more conservative Tk UI path for that runtime.
411
-
412
- If the dashboard opens but the command output area looks missing or empty, upgrade to `flutter-dev` 0.1.8 or newer.
413
-
414
426
  ### Flutter Project Not Detected
415
427
 
416
428
  Run project-specific commands from the directory that contains `pubspec.yaml`.
@@ -446,8 +458,12 @@ Install or repair `scrcpy`:
446
458
  ```bash
447
459
  fdev install-scrcpy
448
460
  fdev mirror
461
+ fdev mirror --turn-screen-off
449
462
  ```
450
463
 
464
+ `--turn-screen-off` may be combined with `--no-top`. The mirrored window stays
465
+ active, but the physical Android display is turned off on supported devices.
466
+
451
467
  For wireless mirroring, connect the device over USB first:
452
468
 
453
469
  ```bash