flutter-dev 0.1.7__tar.gz → 0.1.9__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.
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/CHANGELOG.md +13 -16
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/PKG-INFO +15 -23
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/README.md +14 -22
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/fdev.py +10 -7
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/flutter_dev.egg-info/SOURCES.txt +0 -2
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/install_legacy.py +1 -1
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/app.py +22 -5
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/brew.py +2 -2
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/mirror.py +4 -1
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/package.py +37 -1
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/pyproject.toml +1 -1
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/tests/test_fdev_cli.py +9 -10
- flutter_dev-0.1.7/managers/gui.py +0 -617
- flutter_dev-0.1.7/tests/test_gui.py +0 -247
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/.env.example +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/LICENSE +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/MANIFEST.in +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/common_utils.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/core/__init__.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/core/constants.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/core/state.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/create_page.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/gemini_api.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/git_diff_output_editor.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/__init__.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/ai.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/build.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/datetime.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/device.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/doctor.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/git.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/git_account.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/localization.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/merge.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/project.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/managers/web_deploy.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/requirements.txt +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/setup.cfg +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/setup.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/switch_ai.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/tests/test_localization.py +0 -0
- {flutter_dev-0.1.7 → flutter_dev-0.1.9}/tests/test_package_commands.py +0 -0
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
-
## 0.1.
|
|
5
|
+
## 0.1.9 - 2026-07-14
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added `fdev mirror --turn-screen-off` to keep mirroring while the physical Android display is off.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Running `fdev` without a command now prints command help.
|
|
14
|
+
- `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.
|
|
15
|
+
- `fdev upgrade` now prints the current installed version, Python environment, package location, upgrade source, and verified result version.
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
8
18
|
|
|
9
|
-
-
|
|
10
|
-
- Silenced the macOS system Tk deprecation warning before launching the dashboard.
|
|
19
|
+
- Removed obsolete desktop-only components and their related tests and documentation.
|
|
11
20
|
|
|
12
21
|
## 0.1.6 - 2026-06-25
|
|
13
22
|
|
|
@@ -20,23 +29,11 @@ All notable changes to this project are documented in this file.
|
|
|
20
29
|
|
|
21
30
|
- `fdev upgrade` and `fdev delete` now print the exact Python executable they target before running `sys.executable -m pip`.
|
|
22
31
|
|
|
23
|
-
### Fixed
|
|
24
|
-
|
|
25
|
-
- Reworked the Tkinter dashboard layout to avoid platform-sensitive paned-window sizing that could open a blank `fdev` popup after installing from PyPI.
|
|
26
|
-
|
|
27
32
|
## 0.1.5 - 2026-06-24
|
|
28
33
|
|
|
29
|
-
### Added
|
|
30
|
-
|
|
31
|
-
- Added a Tkinter desktop dashboard that opens by running `fdev` with no command.
|
|
32
|
-
- Added GUI live log output with ANSI terminal color rendering.
|
|
33
|
-
- Added GUI buttons for all documented command groups, including mirror variants, AI provider shortcuts, and GitHub account subcommands.
|
|
34
|
-
- Added Python coverage for GUI command catalog, ANSI color parsing, and no-command CLI dispatch.
|
|
35
|
-
|
|
36
34
|
### Changed
|
|
37
35
|
|
|
38
36
|
- Kept command help available through `fdev help`, `fdev --help`, and `fdev -h`.
|
|
39
|
-
- Documented Tkinter requirements for the desktop dashboard.
|
|
40
37
|
|
|
41
38
|
## 0.1.4 - 2026-06-15
|
|
42
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flutter-dev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
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.
|
|
45
|
+
Current package metadata declares version `0.1.9`, 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.7`, 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 live colored command logs.
|
|
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
|
-
#
|
|
128
|
+
# Show command help
|
|
133
129
|
fdev
|
|
134
130
|
|
|
135
131
|
# Show command help
|
|
@@ -202,11 +198,12 @@ Android APK/AAB build commands rename output files using the Android app label a
|
|
|
202
198
|
| --- | --- |
|
|
203
199
|
| `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
200
|
| `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
|
|
201
|
+
| `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
202
|
| `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
|
|
207
203
|
| `fdev mirror` | Launches `scrcpy` for a selected Android device. |
|
|
208
204
|
| `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
|
|
209
205
|
| `fdev mirror --no-top` | Launches `scrcpy` without the always-on-top flag. |
|
|
206
|
+
| `fdev mirror --turn-screen-off` | Launches `scrcpy` while keeping the Android device display turned off. |
|
|
210
207
|
| `fdev datetime` | Disables Android auto-time and opens Date & Time settings on the selected device. |
|
|
211
208
|
|
|
212
209
|
When multiple Android devices are connected, device-aware commands prompt you to choose a device.
|
|
@@ -239,10 +236,10 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
|
|
|
239
236
|
|
|
240
237
|
| Command | Description |
|
|
241
238
|
| --- | --- |
|
|
242
|
-
| `fdev` |
|
|
243
|
-
| `fdev help` | Shows command help
|
|
239
|
+
| `fdev` | Shows command help. |
|
|
240
|
+
| `fdev help` | Shows command help. |
|
|
244
241
|
| `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` |
|
|
242
|
+
| `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
243
|
| `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
244
|
| `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
|
|
248
245
|
| `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
|
|
@@ -390,11 +387,12 @@ The installed Python layout is top-level modules plus the `core` and `managers`
|
|
|
390
387
|
- `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
|
|
391
388
|
- `fdev discard` removes tracked changes and untracked files after confirmation.
|
|
392
389
|
- `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
|
|
393
|
-
- `fdev clear-data`
|
|
390
|
+
- `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
391
|
- `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
|
|
395
392
|
- `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
|
|
393
|
+
- `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
394
|
- `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
|
|
395
|
+
- `fdev` with no command prints command usage.
|
|
398
396
|
- Most command subcommands create build output directories at startup in the current working directory.
|
|
399
397
|
- 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
398
|
|
|
@@ -433,16 +431,6 @@ fdev delete
|
|
|
433
431
|
|
|
434
432
|
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
433
|
|
|
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
434
|
### Flutter Project Not Detected
|
|
447
435
|
|
|
448
436
|
Run project-specific commands from the directory that contains `pubspec.yaml`.
|
|
@@ -478,8 +466,12 @@ Install or repair `scrcpy`:
|
|
|
478
466
|
```bash
|
|
479
467
|
fdev install-scrcpy
|
|
480
468
|
fdev mirror
|
|
469
|
+
fdev mirror --turn-screen-off
|
|
481
470
|
```
|
|
482
471
|
|
|
472
|
+
`--turn-screen-off` may be combined with `--no-top`. The mirrored window stays
|
|
473
|
+
active, but the physical Android display is turned off on supported devices.
|
|
474
|
+
|
|
483
475
|
For wireless mirroring, connect the device over USB first:
|
|
484
476
|
|
|
485
477
|
```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.
|
|
11
|
+
Current package metadata declares version `0.1.9`, 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.7`, 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 live colored command logs.
|
|
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
|
-
#
|
|
94
|
+
# Show command help
|
|
99
95
|
fdev
|
|
100
96
|
|
|
101
97
|
# Show command help
|
|
@@ -168,11 +164,12 @@ Android APK/AAB build commands rename output files using the Android app label a
|
|
|
168
164
|
| --- | --- |
|
|
169
165
|
| `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
166
|
| `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
|
|
167
|
+
| `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
168
|
| `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
|
|
173
169
|
| `fdev mirror` | Launches `scrcpy` for a selected Android device. |
|
|
174
170
|
| `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
|
|
175
171
|
| `fdev mirror --no-top` | Launches `scrcpy` without the always-on-top flag. |
|
|
172
|
+
| `fdev mirror --turn-screen-off` | Launches `scrcpy` while keeping the Android device display turned off. |
|
|
176
173
|
| `fdev datetime` | Disables Android auto-time and opens Date & Time settings on the selected device. |
|
|
177
174
|
|
|
178
175
|
When multiple Android devices are connected, device-aware commands prompt you to choose a device.
|
|
@@ -205,10 +202,10 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
|
|
|
205
202
|
|
|
206
203
|
| Command | Description |
|
|
207
204
|
| --- | --- |
|
|
208
|
-
| `fdev` |
|
|
209
|
-
| `fdev help` | Shows command help
|
|
205
|
+
| `fdev` | Shows command help. |
|
|
206
|
+
| `fdev help` | Shows command help. |
|
|
210
207
|
| `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` |
|
|
208
|
+
| `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
209
|
| `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
210
|
| `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
|
|
214
211
|
| `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
|
|
@@ -356,11 +353,12 @@ The installed Python layout is top-level modules plus the `core` and `managers`
|
|
|
356
353
|
- `fdev tag` updates `pubspec.yaml`, creates a commit, creates a Git tag, and pushes both.
|
|
357
354
|
- `fdev discard` removes tracked changes and untracked files after confirmation.
|
|
358
355
|
- `fdev cleanup` applies `dart fix`, formats the project, and runs a major-version dependency upgrade.
|
|
359
|
-
- `fdev clear-data`
|
|
356
|
+
- `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
357
|
- `fdev uninstall` may fall back to foreground app detection outside a Flutter project root.
|
|
361
358
|
- `fdev upgrade` and `fdev delete` manage the local `flutter-dev` Python package, not the Flutter app on a device.
|
|
359
|
+
- `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
360
|
- `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
|
|
361
|
+
- `fdev` with no command prints command usage.
|
|
364
362
|
- Most command subcommands create build output directories at startup in the current working directory.
|
|
365
363
|
- 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
364
|
|
|
@@ -399,16 +397,6 @@ fdev delete
|
|
|
399
397
|
|
|
400
398
|
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
399
|
|
|
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
400
|
### Flutter Project Not Detected
|
|
413
401
|
|
|
414
402
|
Run project-specific commands from the directory that contains `pubspec.yaml`.
|
|
@@ -444,8 +432,12 @@ Install or repair `scrcpy`:
|
|
|
444
432
|
```bash
|
|
445
433
|
fdev install-scrcpy
|
|
446
434
|
fdev mirror
|
|
435
|
+
fdev mirror --turn-screen-off
|
|
447
436
|
```
|
|
448
437
|
|
|
438
|
+
`--turn-screen-off` may be combined with `--no-top`. The mirrored window stays
|
|
439
|
+
active, but the physical Android display is turned off on supported devices.
|
|
440
|
+
|
|
449
441
|
For wireless mirroring, connect the device over USB first:
|
|
450
442
|
|
|
451
443
|
```bash
|
|
@@ -70,9 +70,6 @@ from managers.brew import (
|
|
|
70
70
|
from managers.git_account import (
|
|
71
71
|
git_account_manager,
|
|
72
72
|
)
|
|
73
|
-
from managers.gui import (
|
|
74
|
-
launch_gui,
|
|
75
|
-
)
|
|
76
73
|
from managers.package import (
|
|
77
74
|
delete_fdev_command,
|
|
78
75
|
upgrade_fdev_command,
|
|
@@ -82,7 +79,7 @@ from managers.package import (
|
|
|
82
79
|
def show_usage(exit_code=1):
|
|
83
80
|
"""Show usage information"""
|
|
84
81
|
print(f"{YELLOW}Usage: {sys.argv[0]} [command] [options]{NC}")
|
|
85
|
-
print(f"{BLUE}Run {GREEN}fdev{NC}{BLUE} without a command to
|
|
82
|
+
print(f"{BLUE}Run {GREEN}fdev{NC}{BLUE} without a command to show this help.{NC}")
|
|
86
83
|
print(f"\n{BLUE}Build Commands:{NC}")
|
|
87
84
|
print(" apk Build release APK (Full Process)")
|
|
88
85
|
print(" apk-split Build APK with --split-per-abi")
|
|
@@ -109,6 +106,7 @@ def show_usage(exit_code=1):
|
|
|
109
106
|
print(" mirror Launch scrcpy screen mirror (auto-detect device)")
|
|
110
107
|
print(" --wireless Setup wireless ADB connection")
|
|
111
108
|
print(" --no-top Launch mirror without 'always on top' window")
|
|
109
|
+
print(" --turn-screen-off Turn off the device display while mirroring")
|
|
112
110
|
print(" datetime Open device Date & Time settings (auto-time disabled)")
|
|
113
111
|
|
|
114
112
|
print(f"\n{BLUE}Git & iOS Commands:{NC}")
|
|
@@ -136,6 +134,7 @@ def show_usage(exit_code=1):
|
|
|
136
134
|
print(f" {GREEN}fdev install-scrcpy{NC} # Install scrcpy for mirroring")
|
|
137
135
|
print(f" {GREEN}fdev mirror --wireless{NC} # Setup wireless ADB first")
|
|
138
136
|
print(f" {GREEN}fdev mirror --no-top{NC} # Launch mirror without always-on-top")
|
|
137
|
+
print(f" {GREEN}fdev mirror --turn-screen-off{NC} # Mirror with device display turned off")
|
|
139
138
|
print(f" {GREEN}fdev datetime{NC} # Open device Date & Time settings")
|
|
140
139
|
print(f" {GREEN}fdev uninstall{NC} # Uninstall app (auto-selects device)")
|
|
141
140
|
print(f" {GREEN}fdev discard{NC} # Discard all uncommitted changes")
|
|
@@ -150,7 +149,7 @@ def show_usage(exit_code=1):
|
|
|
150
149
|
print(f" {GREEN}fdev csv-to-arb{NC} # Generate lib/l10n ARB files from translations.csv")
|
|
151
150
|
print(f" {GREEN}fdev upgrade{NC} # Upgrade flutter-dev from PyPI")
|
|
152
151
|
print(f" {GREEN}fdev delete{NC} # Remove flutter-dev/fdev from this computer")
|
|
153
|
-
print(f" {GREEN}fdev{NC} #
|
|
152
|
+
print(f" {GREEN}fdev{NC} # Show command help")
|
|
154
153
|
|
|
155
154
|
print(f"\n{BLUE}Note:{NC}")
|
|
156
155
|
print(f" {YELLOW}Multiple devices detected?{NC} Tool will prompt you to select one.")
|
|
@@ -165,7 +164,7 @@ def main():
|
|
|
165
164
|
os.makedirs("build/ios/ipa", exist_ok=True)
|
|
166
165
|
|
|
167
166
|
if len(sys.argv) < 2:
|
|
168
|
-
return
|
|
167
|
+
return show_usage(exit_code=0)
|
|
169
168
|
|
|
170
169
|
command = sys.argv[1].lower()
|
|
171
170
|
|
|
@@ -238,10 +237,14 @@ def main():
|
|
|
238
237
|
# Check for wireless option
|
|
239
238
|
wireless = "--wireless" in sys.argv
|
|
240
239
|
no_top = "--no-top" in sys.argv
|
|
240
|
+
turn_screen_off = "--turn-screen-off" in sys.argv
|
|
241
241
|
if wireless:
|
|
242
242
|
setup_wireless_adb()
|
|
243
243
|
else:
|
|
244
|
-
launch_scrcpy(
|
|
244
|
+
launch_scrcpy(
|
|
245
|
+
always_on_top=not no_top,
|
|
246
|
+
turn_screen_off=turn_screen_off,
|
|
247
|
+
)
|
|
245
248
|
|
|
246
249
|
# DateTime command
|
|
247
250
|
elif command == "datetime":
|
|
@@ -26,7 +26,6 @@ managers/device.py
|
|
|
26
26
|
managers/doctor.py
|
|
27
27
|
managers/git.py
|
|
28
28
|
managers/git_account.py
|
|
29
|
-
managers/gui.py
|
|
30
29
|
managers/localization.py
|
|
31
30
|
managers/merge.py
|
|
32
31
|
managers/mirror.py
|
|
@@ -34,6 +33,5 @@ managers/package.py
|
|
|
34
33
|
managers/project.py
|
|
35
34
|
managers/web_deploy.py
|
|
36
35
|
tests/test_fdev_cli.py
|
|
37
|
-
tests/test_gui.py
|
|
38
36
|
tests/test_localization.py
|
|
39
37
|
tests/test_package_commands.py
|
|
@@ -368,7 +368,7 @@ def auto_configure_path(bin_dir, system_platform, home):
|
|
|
368
368
|
# PowerShell failed, show manual instructions
|
|
369
369
|
print(f"{YELLOW}Could not auto-configure PATH. Please add manually:{NC}")
|
|
370
370
|
print(f"\n{BLUE}Path to add: {GREEN}{bin_dir}{NC}")
|
|
371
|
-
print(f"\n{YELLOW}Option 1 -
|
|
371
|
+
print(f"\n{YELLOW}Option 1 - Windows settings:{NC}")
|
|
372
372
|
print(f" 1. Press {BLUE}Win + R{NC} → type {BLUE}sysdm.cpl{NC} → Enter")
|
|
373
373
|
print(f" 2. {BLUE}Environment Variables{NC} → User variables → {BLUE}Path{NC} → Edit")
|
|
374
374
|
print(f" 3. New → add: {GREEN}{bin_dir}{NC}")
|
|
@@ -207,11 +207,28 @@ def clear_app_data():
|
|
|
207
207
|
print(f"{BLUE}Platform: {platform_type.upper()}{NC}")
|
|
208
208
|
print(f"{BLUE}App: {package_name}{NC}\n")
|
|
209
209
|
|
|
210
|
-
#
|
|
211
|
-
|
|
212
|
-
if
|
|
213
|
-
|
|
214
|
-
|
|
210
|
+
# Skip confirmation only when the foreground app matches the current
|
|
211
|
+
# Flutter project's Android package. Otherwise, keep the safety prompt.
|
|
212
|
+
project_package = get_package_name() if is_flutter_project_root() else None
|
|
213
|
+
is_current_project_app = (
|
|
214
|
+
platform_type == "android"
|
|
215
|
+
and project_package is not None
|
|
216
|
+
and project_package == package_name
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
if is_current_project_app:
|
|
220
|
+
print(f"{GREEN}✓ Foreground app matches the current Flutter project{NC}\n")
|
|
221
|
+
else:
|
|
222
|
+
if project_package and platform_type == "android":
|
|
223
|
+
print(f"{YELLOW}⚠️ Foreground app does not match the current Flutter project{NC}")
|
|
224
|
+
print(f"{BLUE}Project package: {project_package}{NC}\n")
|
|
225
|
+
|
|
226
|
+
user_input = input(
|
|
227
|
+
f"Clear data for {GREEN}{package_name}{NC}? [Y/n]: "
|
|
228
|
+
).strip().lower()
|
|
229
|
+
if user_input in ("n", "no"):
|
|
230
|
+
print(f"{YELLOW}Operation cancelled{NC}")
|
|
231
|
+
return False
|
|
215
232
|
|
|
216
233
|
# Clear data based on platform
|
|
217
234
|
if platform_type == "android":
|
|
@@ -54,7 +54,7 @@ def _get_casks():
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
def _is_cask(package):
|
|
57
|
-
"""Check if a package is a cask (
|
|
57
|
+
"""Check if a package is a cask (desktop app) or formula."""
|
|
58
58
|
result = _run_brew(["info", "--cask", package])
|
|
59
59
|
return bool(result and "Not installed" not in result)
|
|
60
60
|
|
|
@@ -330,7 +330,7 @@ def brew_manager():
|
|
|
330
330
|
print(f"\n {YELLOW}View:{NC}")
|
|
331
331
|
print(f" {BLUE}1.{NC} Top-level packages (brew leaves)")
|
|
332
332
|
print(f" {BLUE}2.{NC} All installed formulae")
|
|
333
|
-
print(f" {BLUE}3.{NC} All installed casks (
|
|
333
|
+
print(f" {BLUE}3.{NC} All installed casks (desktop apps)")
|
|
334
334
|
print(f" {BLUE}4.{NC} Global cleanup (autoremove + cache)")
|
|
335
335
|
print(f" {BLUE}0.{NC} Exit")
|
|
336
336
|
|
|
@@ -321,12 +321,13 @@ def setup_wireless_adb():
|
|
|
321
321
|
return False
|
|
322
322
|
|
|
323
323
|
|
|
324
|
-
def launch_scrcpy(always_on_top=True):
|
|
324
|
+
def launch_scrcpy(always_on_top=True, turn_screen_off=False):
|
|
325
325
|
"""
|
|
326
326
|
Launch scrcpy with optimized settings
|
|
327
327
|
|
|
328
328
|
Args:
|
|
329
329
|
always_on_top: If True, keep the scrcpy window always on top
|
|
330
|
+
turn_screen_off: If True, turn off the device display while mirroring
|
|
330
331
|
"""
|
|
331
332
|
print(f"{YELLOW}Launching scrcpy...{NC}\n")
|
|
332
333
|
|
|
@@ -347,6 +348,8 @@ def launch_scrcpy(always_on_top=True):
|
|
|
347
348
|
cmd = ["scrcpy", "-s", selected_device, "--no-mouse-hover", "-m", "1080", "-b", "5M"]
|
|
348
349
|
if always_on_top:
|
|
349
350
|
cmd.insert(4, "--always-on-top")
|
|
351
|
+
if turn_screen_off:
|
|
352
|
+
cmd.append("--turn-screen-off")
|
|
350
353
|
|
|
351
354
|
print(f"\n{BLUE}Launching scrcpy...{NC}")
|
|
352
355
|
print(f"{YELLOW}Command: {' '.join(cmd)}{NC}\n")
|
|
@@ -4,6 +4,7 @@ Package Manager - self-management commands for the installed fdev package.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import argparse
|
|
7
|
+
from importlib import metadata
|
|
7
8
|
import platform
|
|
8
9
|
import subprocess
|
|
9
10
|
import sys
|
|
@@ -38,6 +39,26 @@ def _print_python_environment():
|
|
|
38
39
|
print(f"{BLUE}Python environment: {GREEN}{sys.executable}{NC}")
|
|
39
40
|
|
|
40
41
|
|
|
42
|
+
def _get_installed_package_info():
|
|
43
|
+
"""Return the installed package version and location for this Python environment."""
|
|
44
|
+
try:
|
|
45
|
+
distribution = metadata.distribution(PACKAGE_NAME)
|
|
46
|
+
except metadata.PackageNotFoundError:
|
|
47
|
+
return "not installed", "not found in the current Python environment"
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
package_location = str(distribution.locate_file("").resolve())
|
|
51
|
+
except (AttributeError, OSError):
|
|
52
|
+
package_location = str(distribution.locate_file(""))
|
|
53
|
+
|
|
54
|
+
return distribution.version, package_location
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _print_installed_package_info(version, package_location):
|
|
58
|
+
print(f"{BLUE}Current version: {GREEN}{version}{NC}")
|
|
59
|
+
print(f"{BLUE}Package location: {GREEN}{package_location}{NC}")
|
|
60
|
+
|
|
61
|
+
|
|
41
62
|
def _build_pip_command(pip_args):
|
|
42
63
|
return [sys.executable, "-m", "pip", *pip_args]
|
|
43
64
|
|
|
@@ -132,8 +153,11 @@ def upgrade_fdev_command(argv=None):
|
|
|
132
153
|
os_key, os_name = get_os_info()
|
|
133
154
|
_print_os_info(os_name)
|
|
134
155
|
_print_python_environment()
|
|
156
|
+
current_version, package_location = _get_installed_package_info()
|
|
157
|
+
_print_installed_package_info(current_version, package_location)
|
|
135
158
|
|
|
136
159
|
pip_args = ["install", "--upgrade", PACKAGE_NAME]
|
|
160
|
+
print(f"{BLUE}Upgrade source: {GREEN}PyPI{NC}")
|
|
137
161
|
print(f"{YELLOW}Upgrading {PACKAGE_NAME} from PyPI...{NC}")
|
|
138
162
|
|
|
139
163
|
if os_key == "windows":
|
|
@@ -141,7 +165,19 @@ def upgrade_fdev_command(argv=None):
|
|
|
141
165
|
|
|
142
166
|
result = _run_pip_direct(pip_args)
|
|
143
167
|
if result == 0:
|
|
144
|
-
|
|
168
|
+
installed_version, installed_location = _get_installed_package_info()
|
|
169
|
+
if current_version != installed_version:
|
|
170
|
+
print(
|
|
171
|
+
f"{GREEN}✓ {PACKAGE_NAME} upgraded successfully: "
|
|
172
|
+
f"{current_version} → {installed_version}.{NC}"
|
|
173
|
+
)
|
|
174
|
+
else:
|
|
175
|
+
print(
|
|
176
|
+
f"{GREEN}✓ {PACKAGE_NAME} upgrade completed. "
|
|
177
|
+
f"Installed version: {installed_version}.{NC}"
|
|
178
|
+
)
|
|
179
|
+
if installed_location != package_location:
|
|
180
|
+
print(f"{BLUE}Installed at: {GREEN}{installed_location}{NC}")
|
|
145
181
|
print(f"{BLUE}Restart your terminal if the fdev command still uses the old version.{NC}")
|
|
146
182
|
else:
|
|
147
183
|
print(f"{RED}✗ Failed to upgrade {PACKAGE_NAME}.{NC}")
|
|
@@ -6,29 +6,29 @@ import fdev
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class FdevCliTests(unittest.TestCase):
|
|
9
|
-
def
|
|
10
|
-
with
|
|
9
|
+
def test_no_command_prints_usage(self):
|
|
10
|
+
with (
|
|
11
|
+
patch.object(sys, "argv", ["fdev"]),
|
|
12
|
+
patch.object(fdev, "show_usage", return_value=0) as show_usage,
|
|
13
|
+
):
|
|
11
14
|
result = fdev.main()
|
|
12
15
|
|
|
13
16
|
self.assertEqual(result, 0)
|
|
14
|
-
|
|
17
|
+
show_usage.assert_called_once_with(exit_code=0)
|
|
15
18
|
|
|
16
|
-
def
|
|
19
|
+
def test_help_command_prints_usage(self):
|
|
17
20
|
with (
|
|
18
21
|
patch.object(sys, "argv", ["fdev", "help"]),
|
|
19
|
-
patch.object(fdev, "launch_gui", return_value=0) as launch_gui,
|
|
20
22
|
patch.object(fdev, "show_usage", return_value=0) as show_usage,
|
|
21
23
|
):
|
|
22
24
|
result = fdev.main()
|
|
23
25
|
|
|
24
26
|
self.assertEqual(result, 0)
|
|
25
27
|
show_usage.assert_called_once_with(exit_code=0)
|
|
26
|
-
launch_gui.assert_not_called()
|
|
27
28
|
|
|
28
|
-
def
|
|
29
|
+
def test_unknown_command_prints_usage_and_exits_with_error(self):
|
|
29
30
|
with (
|
|
30
|
-
patch.object(sys, "argv", ["fdev", "
|
|
31
|
-
patch.object(fdev, "launch_gui", return_value=0) as launch_gui,
|
|
31
|
+
patch.object(sys, "argv", ["fdev", "unknown"]),
|
|
32
32
|
patch.object(fdev, "show_usage", return_value=1) as show_usage,
|
|
33
33
|
):
|
|
34
34
|
with self.assertRaises(SystemExit) as raised:
|
|
@@ -36,7 +36,6 @@ class FdevCliTests(unittest.TestCase):
|
|
|
36
36
|
|
|
37
37
|
self.assertEqual(raised.exception.code, 1)
|
|
38
38
|
show_usage.assert_called_once_with()
|
|
39
|
-
launch_gui.assert_not_called()
|
|
40
39
|
|
|
41
40
|
def test_delete_command_routes_to_package_delete(self):
|
|
42
41
|
with (
|