flutter-dev 0.1.12__tar.gz → 0.1.14__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.12 → flutter_dev-0.1.14}/CHANGELOG.md +32 -0
  2. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/PKG-INFO +78 -6
  3. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/README.md +77 -5
  4. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/fdev.py +22 -0
  5. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/flutter_dev.egg-info/SOURCES.txt +2 -0
  6. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/__init__.py +4 -0
  7. flutter_dev-0.1.14/managers/app_check.py +1596 -0
  8. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/package.py +74 -10
  9. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/pyproject.toml +1 -1
  10. flutter_dev-0.1.14/tests/test_app_check.py +271 -0
  11. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/tests/test_fdev_cli.py +20 -0
  12. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/tests/test_package_commands.py +125 -9
  13. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/.env.example +0 -0
  14. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/LICENSE +0 -0
  15. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/MANIFEST.in +0 -0
  16. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/common_utils.py +0 -0
  17. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/core/__init__.py +0 -0
  18. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/core/ai_config.py +0 -0
  19. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/core/constants.py +0 -0
  20. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/core/state.py +0 -0
  21. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/create_page.py +0 -0
  22. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/gemini_api.py +0 -0
  23. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/git_diff_output_editor.py +0 -0
  24. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/install_legacy.py +0 -0
  25. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/ai.py +0 -0
  26. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/app.py +0 -0
  27. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/brew.py +0 -0
  28. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/build.py +0 -0
  29. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/datetime.py +0 -0
  30. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/device.py +0 -0
  31. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/doctor.py +0 -0
  32. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/git.py +0 -0
  33. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/git_account.py +0 -0
  34. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/localization.py +0 -0
  35. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/merge.py +0 -0
  36. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/mirror.py +0 -0
  37. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/project.py +0 -0
  38. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/managers/web_deploy.py +0 -0
  39. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/requirements.txt +0 -0
  40. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/setup.cfg +0 -0
  41. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/setup.py +0 -0
  42. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/switch_ai.py +0 -0
  43. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/tests/test_ai_config.py +0 -0
  44. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/tests/test_app_commands.py +0 -0
  45. {flutter_dev-0.1.12 → flutter_dev-0.1.14}/tests/test_localization.py +0 -0
@@ -2,6 +2,38 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## 0.1.14 - 2026-09-01
6
+
7
+ ### Added
8
+
9
+ - Added five Firebase App Check commands: `status`, `token`, `register`, `list`, and `revoke`.
10
+ - Added dynamic Android device discovery, device-specific token extraction, multi-device registration with `register --all`, and Firebase CLI/REST backend selection.
11
+ - Added Firebase Android configuration discovery from Gradle, `google-services.json`, `firebase.json`, and `.firebaserc`, with explicit overrides for ambiguous projects and variants.
12
+ - Added Python regression coverage for command routing, device/config discovery, backend version parsing, validation, and secret redaction.
13
+
14
+ ### Changed
15
+
16
+ - Expanded the main command list and README with the App Check command count, all five subcommands, and the `register --device`, `register --all`, and `--backend` forms.
17
+ - Bumped the package version from `0.1.13` to `0.1.14` for the PyPI release.
18
+
19
+ ### Fixed
20
+
21
+ - Added strict UUID4, Firebase app/project ownership, and debug-token resource validation before remote mutations.
22
+ - Kept collected debug-token secrets out of normal registration output, error messages, and project files.
23
+ - Improved emulator/ADB transport detection and made malformed project configuration or unavailable CLI checks fail safely.
24
+ - Ensured `register --all` processes every ready device even when `ANDROID_SERIAL` is set.
25
+
26
+ ## 0.1.13 - 2026-07-22
27
+
28
+ ### Added
29
+
30
+ - Added `fdev -v` and `fdev --version` for showing the installed package version.
31
+
32
+ ### Changed
33
+
34
+ - Changed `fdev upgrade` to check PyPI before invoking pip, skip installation when already current, suppress routine pip dependency output, and report verified before→after versions after a successful upgrade.
35
+ - Kept the terminal-restart reminder after an actual successful version change.
36
+
5
37
  ## 0.1.12 - 2026-07-22
6
38
 
7
39
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flutter-dev
3
- Version: 0.1.12
3
+ Version: 0.1.14
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.12`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
45
+ Current package metadata declares version `0.1.14`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
46
46
 
47
47
  ## Key Features
48
48
 
@@ -50,6 +50,7 @@ Current package metadata declares version `0.1.12`, Python `>=3.8`, MIT license,
50
50
  - Project maintenance helpers for `flutter clean`, dependency refresh, `build_runner`, localization generation, analysis, formatting, cache repair, and CocoaPods.
51
51
  - Localization CSV helpers for exporting ARB files to translator-friendly CSV files and generating ARB files back from CSV.
52
52
  - Android device helpers for APK install, app uninstall, project/foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
53
+ - Dynamic Firebase App Check debug-token discovery, registration, listing, and revocation for connected Android devices.
53
54
  - AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
54
55
  - Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
55
56
  - Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
@@ -110,12 +111,13 @@ Feature-specific external tools:
110
111
 
111
112
  | Tool | Used by |
112
113
  | --- | --- |
113
- | Android SDK Platform Tools / `adb` | `install`, `uninstall`, `clear-data`, `mirror`, `datetime`, `release-run` |
114
+ | Android SDK Platform Tools / `adb` | `install`, `uninstall`, `clear-data`, `mirror`, `datetime`, `release-run`, `app-check token/register` |
114
115
  | Java/JDK | Android builds |
115
116
  | CocoaPods | `pod`, `ipa` |
116
117
  | Xcode / `xcrun` | iOS simulator and IPA workflows on macOS |
117
118
  | `scrcpy` | `mirror` |
118
- | Firebase CLI | `web-deploy` |
119
+ | Firebase CLI | `web-deploy`; App Check management when version `15.25.1` or newer |
120
+ | Google Cloud CLI / `gcloud` | App Check REST fallback when a compatible Firebase CLI is unavailable |
119
121
  | GitHub CLI / `gh` | `fdev git ...` |
120
122
  | VS Code CLI / `code` | Conflict helper in branch sync |
121
123
  | Homebrew | `brew`, macOS `install-scrcpy` flow |
@@ -202,6 +204,11 @@ Android APK/AAB build commands rename output files using the Android app label a
202
204
  | `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
203
205
  | `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
204
206
  | `fdev clear-data` | In a Flutter project root, clears the installed project's Android package data without confirmation; if it is missing or the clear fails, falls back to the foreground app with a default-Yes safety prompt. Outside a project, always detects and confirms the foreground app. iOS prints manual options. |
207
+ | `fdev app-check status [--device SERIAL] [--backend auto\|cli\|rest]` | Shows all ADB device states, dynamically resolved Firebase Android metadata, provider detection, and Firebase management backend readiness. |
208
+ | `fdev app-check token [--device SERIAL]` | Reads one debug build's UUID4 App Check token from its discovered preference store, with official logcat fallback, and explicitly prints the secret. |
209
+ | `fdev app-check register [--device SERIAL \| --all] [--backend auto\|cli\|rest]` | Collects token(s) without printing or persisting them and registers one selected device or every authorized connected device. |
210
+ | `fdev app-check list [--backend auto\|cli\|rest]` | Lists registered debug-token names, resource IDs, and update times; Firebase never returns the secrets. |
211
+ | `fdev app-check revoke <id> [--backend auto\|cli\|rest] [--force]` | Revokes a registered debug token after confirmation. Use `--force` for non-interactive operation. |
205
212
  | `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
206
213
  | `fdev mirror` | Launches `scrcpy` for a selected Android device. |
207
214
  | `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
@@ -211,6 +218,69 @@ Android APK/AAB build commands rename output files using the Android app label a
211
218
 
212
219
  When multiple Android devices are connected, device-aware commands prompt you to choose a device.
213
220
 
221
+ #### Firebase App Check Debug Tokens
222
+
223
+ There are five App Check subcommands: `status`, `token`, `register`, `list`, and
224
+ `revoke`.
225
+
226
+ Run App Check commands from a Flutter project root, or pass `--project-root`.
227
+ The resolver matches the Android `applicationId` with the appropriate client in
228
+ `android/app/google-services.json`. It also reads `firebase.json` and
229
+ `.firebaserc` when needed. Flavor-specific `google-services.json` files are
230
+ discovered under `android/app`; ambiguous configurations require an explicit
231
+ override instead of silently choosing the first client.
232
+
233
+ ```bash
234
+ # Inspect device states, Firebase metadata, providers, and backend readiness
235
+ fdev app-check status --backend auto
236
+
237
+ # Print one device's token (the output is a secret)
238
+ fdev app-check token --device DEVICE_SERIAL
239
+
240
+ # Collect and register without printing the token
241
+ fdev app-check register --device DEVICE_SERIAL --backend cli
242
+
243
+ # Register every authorized connected device
244
+ fdev app-check register --all --backend cli
245
+
246
+ # Inspect and revoke registered token metadata
247
+ fdev app-check list --backend cli
248
+ fdev app-check revoke DEBUG_TOKEN_ID --backend cli
249
+ ```
250
+
251
+ The default `--backend auto` uses Firebase CLI `15.25.1+` when available,
252
+ otherwise it uses the Firebase App Check REST API with the active `gcloud`
253
+ account. Force either route with `--backend cli` or `--backend rest`. Authenticate
254
+ the selected tool before registration:
255
+
256
+ ```bash
257
+ firebase login
258
+ # or
259
+ gcloud auth login
260
+ ```
261
+
262
+ Configuration precedence is command-line option, environment override, then
263
+ project discovery. Supported overrides are:
264
+
265
+ ```text
266
+ --package FDEV_APP_CHECK_PACKAGE / PACKAGE_NAME
267
+ --project FDEV_FIREBASE_PROJECT_ID / FIREBASE_PROJECT_ID
268
+ --project-number FDEV_FIREBASE_PROJECT_NUMBER / FIREBASE_PROJECT_NUMBER
269
+ --app-id FDEV_FIREBASE_APP_ID / FIREBASE_ANDROID_APP_ID
270
+ --quota-project FDEV_GOOGLE_CLOUD_QUOTA_PROJECT / GOOGLE_CLOUD_QUOTA_PROJECT
271
+ --device ANDROID_SERIAL
272
+ ```
273
+
274
+ `register` keeps the debug token in memory and never writes it to a project
275
+ file. The `token` subcommand is the only normal workflow that prints the secret.
276
+ If a stable display name already exists, pass `--force` only when replacing the
277
+ old token is intended.
278
+
279
+ The REST backend charges API quota to `--quota-project`, the configured gcloud
280
+ `billing/quota_project`, or the active gcloud project, in that order. That
281
+ project must have the Firebase App Check API enabled, and the active account
282
+ must be allowed to consume its service quota.
283
+
214
284
  ### Git Commands
215
285
 
216
286
  | Command | Description |
@@ -241,9 +311,10 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
241
311
  | --- | --- |
242
312
  | `fdev` | Shows command help. |
243
313
  | `fdev help` | Shows command help. |
314
+ | `fdev -v` / `fdev --version` | Shows the version installed in the active fdev Python environment. |
244
315
  | `fdev doctor` | Checks platform, Python, Flutter/Dart/Git, Python packages, Android/iOS tools, optional CLIs, `.env`, Flutter project detection, and global `fdev` availability. |
245
316
  | `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. |
317
+ | `fdev upgrade` | Checks the latest PyPI version first. If already current, skips pip and prints one up-to-date notice; otherwise upgrades quietly and reports the previous and installed versions. |
247
318
  | `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. |
248
319
  | `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
249
320
  | `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
@@ -451,11 +522,12 @@ where fdev
451
522
  Use the built-in package management commands from the Python environment where `fdev` is installed:
452
523
 
453
524
  ```bash
525
+ fdev -v
454
526
  fdev upgrade
455
527
  fdev delete
456
528
  ```
457
529
 
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.
530
+ The upgrade and delete commands print the detected OS and exact Python executable. Upgrade checks PyPI first and avoids running pip when the installed version is current. When pip is needed, both commands use the active executable with `-m pip`, not a hardcoded `python`, `python3`, `pip`, or `pip3`. On Windows, `fdev delete` and a required `fdev upgrade` schedule the same `sys.executable -m pip ...` operation in a delayed command process so the currently running console launcher can exit first.
459
531
 
460
532
  ### Flutter Project Not Detected
461
533
 
@@ -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.12`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
11
+ Current package metadata declares version `0.1.14`, Python `>=3.8`, MIT license, and support for macOS, Linux, and Windows.
12
12
 
13
13
  ## Key Features
14
14
 
@@ -16,6 +16,7 @@ Current package metadata declares version `0.1.12`, Python `>=3.8`, MIT license,
16
16
  - Project maintenance helpers for `flutter clean`, dependency refresh, `build_runner`, localization generation, analysis, formatting, cache repair, and CocoaPods.
17
17
  - Localization CSV helpers for exporting ARB files to translator-friendly CSV files and generating ARB files back from CSV.
18
18
  - Android device helpers for APK install, app uninstall, project/foreground app data clearing, screen mirroring with `scrcpy`, wireless ADB setup, and Date & Time settings.
19
+ - Dynamic Firebase App Check debug-token discovery, registration, listing, and revocation for connected Android devices.
19
20
  - AI-assisted Git commits using Groq, Mistral, SambaNova, or OpenRouter-compatible chat completion APIs.
20
21
  - Git workflow helpers for version tags, branch sync, deployment branch merge, discard, and GitHub account management through `gh`.
21
22
  - Feature/page generator that creates a `lib/features/<name>` structure using the project's presenter/base-state pattern.
@@ -76,12 +77,13 @@ Feature-specific external tools:
76
77
 
77
78
  | Tool | Used by |
78
79
  | --- | --- |
79
- | Android SDK Platform Tools / `adb` | `install`, `uninstall`, `clear-data`, `mirror`, `datetime`, `release-run` |
80
+ | Android SDK Platform Tools / `adb` | `install`, `uninstall`, `clear-data`, `mirror`, `datetime`, `release-run`, `app-check token/register` |
80
81
  | Java/JDK | Android builds |
81
82
  | CocoaPods | `pod`, `ipa` |
82
83
  | Xcode / `xcrun` | iOS simulator and IPA workflows on macOS |
83
84
  | `scrcpy` | `mirror` |
84
- | Firebase CLI | `web-deploy` |
85
+ | Firebase CLI | `web-deploy`; App Check management when version `15.25.1` or newer |
86
+ | Google Cloud CLI / `gcloud` | App Check REST fallback when a compatible Firebase CLI is unavailable |
85
87
  | GitHub CLI / `gh` | `fdev git ...` |
86
88
  | VS Code CLI / `code` | Conflict helper in branch sync |
87
89
  | Homebrew | `brew`, macOS `install-scrcpy` flow |
@@ -168,6 +170,11 @@ Android APK/AAB build commands rename output files using the Android app label a
168
170
  | `fdev install` | Installs a built APK from `build/app/outputs/flutter-apk`, prefers `arm64-v8a`, retries after uninstall on failure, then launches the app. |
169
171
  | `fdev uninstall` | In a Flutter project root, uninstalls by package/bundle id. Outside a project, detects the foreground app and asks for confirmation. |
170
172
  | `fdev clear-data` | In a Flutter project root, clears the installed project's Android package data without confirmation; if it is missing or the clear fails, falls back to the foreground app with a default-Yes safety prompt. Outside a project, always detects and confirms the foreground app. iOS prints manual options. |
173
+ | `fdev app-check status [--device SERIAL] [--backend auto\|cli\|rest]` | Shows all ADB device states, dynamically resolved Firebase Android metadata, provider detection, and Firebase management backend readiness. |
174
+ | `fdev app-check token [--device SERIAL]` | Reads one debug build's UUID4 App Check token from its discovered preference store, with official logcat fallback, and explicitly prints the secret. |
175
+ | `fdev app-check register [--device SERIAL \| --all] [--backend auto\|cli\|rest]` | Collects token(s) without printing or persisting them and registers one selected device or every authorized connected device. |
176
+ | `fdev app-check list [--backend auto\|cli\|rest]` | Lists registered debug-token names, resource IDs, and update times; Firebase never returns the secrets. |
177
+ | `fdev app-check revoke <id> [--backend auto\|cli\|rest] [--force]` | Revokes a registered debug token after confirmation. Use `--force` for non-interactive operation. |
171
178
  | `fdev install-scrcpy` | Installs `scrcpy` using the best supported package manager for the current platform. |
172
179
  | `fdev mirror` | Launches `scrcpy` for a selected Android device. |
173
180
  | `fdev mirror --wireless` | Guides wireless ADB setup using a USB-connected Android device. |
@@ -177,6 +184,69 @@ Android APK/AAB build commands rename output files using the Android app label a
177
184
 
178
185
  When multiple Android devices are connected, device-aware commands prompt you to choose a device.
179
186
 
187
+ #### Firebase App Check Debug Tokens
188
+
189
+ There are five App Check subcommands: `status`, `token`, `register`, `list`, and
190
+ `revoke`.
191
+
192
+ Run App Check commands from a Flutter project root, or pass `--project-root`.
193
+ The resolver matches the Android `applicationId` with the appropriate client in
194
+ `android/app/google-services.json`. It also reads `firebase.json` and
195
+ `.firebaserc` when needed. Flavor-specific `google-services.json` files are
196
+ discovered under `android/app`; ambiguous configurations require an explicit
197
+ override instead of silently choosing the first client.
198
+
199
+ ```bash
200
+ # Inspect device states, Firebase metadata, providers, and backend readiness
201
+ fdev app-check status --backend auto
202
+
203
+ # Print one device's token (the output is a secret)
204
+ fdev app-check token --device DEVICE_SERIAL
205
+
206
+ # Collect and register without printing the token
207
+ fdev app-check register --device DEVICE_SERIAL --backend cli
208
+
209
+ # Register every authorized connected device
210
+ fdev app-check register --all --backend cli
211
+
212
+ # Inspect and revoke registered token metadata
213
+ fdev app-check list --backend cli
214
+ fdev app-check revoke DEBUG_TOKEN_ID --backend cli
215
+ ```
216
+
217
+ The default `--backend auto` uses Firebase CLI `15.25.1+` when available,
218
+ otherwise it uses the Firebase App Check REST API with the active `gcloud`
219
+ account. Force either route with `--backend cli` or `--backend rest`. Authenticate
220
+ the selected tool before registration:
221
+
222
+ ```bash
223
+ firebase login
224
+ # or
225
+ gcloud auth login
226
+ ```
227
+
228
+ Configuration precedence is command-line option, environment override, then
229
+ project discovery. Supported overrides are:
230
+
231
+ ```text
232
+ --package FDEV_APP_CHECK_PACKAGE / PACKAGE_NAME
233
+ --project FDEV_FIREBASE_PROJECT_ID / FIREBASE_PROJECT_ID
234
+ --project-number FDEV_FIREBASE_PROJECT_NUMBER / FIREBASE_PROJECT_NUMBER
235
+ --app-id FDEV_FIREBASE_APP_ID / FIREBASE_ANDROID_APP_ID
236
+ --quota-project FDEV_GOOGLE_CLOUD_QUOTA_PROJECT / GOOGLE_CLOUD_QUOTA_PROJECT
237
+ --device ANDROID_SERIAL
238
+ ```
239
+
240
+ `register` keeps the debug token in memory and never writes it to a project
241
+ file. The `token` subcommand is the only normal workflow that prints the secret.
242
+ If a stable display name already exists, pass `--force` only when replacing the
243
+ old token is intended.
244
+
245
+ The REST backend charges API quota to `--quota-project`, the configured gcloud
246
+ `billing/quota_project`, or the active gcloud project, in that order. That
247
+ project must have the Firebase App Check API enabled, and the active account
248
+ must be allowed to consume its service quota.
249
+
180
250
  ### Git Commands
181
251
 
182
252
  | Command | Description |
@@ -207,9 +277,10 @@ Switching GitHub accounts runs `gh auth switch` and `gh auth setup-git`, but it
207
277
  | --- | --- |
208
278
  | `fdev` | Shows command help. |
209
279
  | `fdev help` | Shows command help. |
280
+ | `fdev -v` / `fdev --version` | Shows the version installed in the active fdev Python environment. |
210
281
  | `fdev doctor` | Checks platform, Python, Flutter/Dart/Git, Python packages, Android/iOS tools, optional CLIs, `.env`, Flutter project detection, and global `fdev` availability. |
211
282
  | `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. |
283
+ | `fdev upgrade` | Checks the latest PyPI version first. If already current, skips pip and prints one up-to-date notice; otherwise upgrades quietly and reports the previous and installed versions. |
213
284
  | `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. |
214
285
  | `fdev ai` | Shows the current AI provider and opens an interactive provider switch prompt. |
215
286
  | `fdev ai <provider>` | Switches `DEFAULT_AI_SERVICE` to `groq`, `mistral`, `sambanova`, or `openrouter`. |
@@ -417,11 +488,12 @@ where fdev
417
488
  Use the built-in package management commands from the Python environment where `fdev` is installed:
418
489
 
419
490
  ```bash
491
+ fdev -v
420
492
  fdev upgrade
421
493
  fdev delete
422
494
  ```
423
495
 
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.
496
+ The upgrade and delete commands print the detected OS and exact Python executable. Upgrade checks PyPI first and avoids running pip when the installed version is current. When pip is needed, both commands use the active executable with `-m pip`, not a hardcoded `python`, `python3`, `pip`, or `pip3`. On Windows, `fdev delete` and a required `fdev upgrade` schedule the same `sys.executable -m pip ...` operation in a delayed command process so the currently running console launcher can exit first.
425
497
 
426
498
  ### Flutter Project Not Detected
427
499
 
@@ -73,8 +73,12 @@ from managers.git_account import (
73
73
  )
74
74
  from managers.package import (
75
75
  delete_fdev_command,
76
+ show_fdev_version,
76
77
  upgrade_fdev_command,
77
78
  )
79
+ from managers.app_check import (
80
+ app_check_command,
81
+ )
78
82
 
79
83
 
80
84
  def show_usage(exit_code=1):
@@ -103,6 +107,12 @@ def show_usage(exit_code=1):
103
107
  print(" install Install built APK on connected device")
104
108
  print(" uninstall Uninstall app from connected device")
105
109
  print(" clear-data Clear project app data with confirmed foreground fallback")
110
+ print(" App Check Commands (5):")
111
+ print(" app-check status [--device SERIAL] [--backend auto|cli|rest]")
112
+ print(" app-check token [--device SERIAL]")
113
+ print(" app-check register [--device SERIAL | --all] [--backend auto|cli|rest]")
114
+ print(" app-check list [--backend auto|cli|rest]")
115
+ print(" app-check revoke <id> [--backend auto|cli|rest] [--force]")
106
116
  print(" install-scrcpy Install scrcpy for Android screen mirroring")
107
117
  print(" mirror Launch scrcpy screen mirror (auto-detect device)")
108
118
  print(" --wireless Setup wireless ADB connection")
@@ -124,6 +134,7 @@ def show_usage(exit_code=1):
124
134
  print(" brew Interactive Homebrew package manager")
125
135
  print(" upgrade Upgrade fdev from PyPI")
126
136
  print(" delete Uninstall fdev from this computer")
137
+ print(" -v, --version Show the installed fdev version")
127
138
  print(" help Show this help")
128
139
  print(" merge Merge files from paths.txt into single output file")
129
140
  print(" ai Show current AI service or switch to another")
@@ -139,6 +150,12 @@ def show_usage(exit_code=1):
139
150
  print(f" {GREEN}fdev mirror --turn-screen-off{NC} # Mirror with device display turned off")
140
151
  print(f" {GREEN}fdev datetime{NC} # Open device Date & Time settings")
141
152
  print(f" {GREEN}fdev uninstall{NC} # Uninstall app (auto-selects device)")
153
+ print(f" {GREEN}fdev app-check status{NC} # Inspect App Check device/project readiness")
154
+ print(f" {GREEN}fdev app-check token --device SERIAL{NC} # Print one device token")
155
+ print(f" {GREEN}fdev app-check register --device SERIAL{NC} # Register one device token")
156
+ print(f" {GREEN}fdev app-check register --all --backend cli{NC} # Register all ready devices")
157
+ print(f" {GREEN}fdev app-check list --backend cli{NC} # List registered token metadata")
158
+ print(f" {GREEN}fdev app-check revoke ID --force{NC} # Revoke one registered token")
142
159
  print(f" {GREEN}fdev discard{NC} # Discard all uncommitted changes")
143
160
  print(f" {GREEN}fdev sync dev-farhan dev-sufi{NC} # Sync with multiple branches")
144
161
  print(f" {GREEN}fdev deploy{NC} # Deploy to deployment branch")
@@ -167,6 +184,9 @@ def main():
167
184
 
168
185
  command = sys.argv[1].lower()
169
186
 
187
+ if command in ("-v", "--version"):
188
+ return show_fdev_version()
189
+
170
190
  if command in ("apk", "apk-split", "aab", "ipa", "release-run", "install"):
171
191
  os.makedirs("build/app/outputs/flutter-apk", exist_ok=True)
172
192
  os.makedirs("build/app/outputs/bundle/release", exist_ok=True)
@@ -212,6 +232,8 @@ def main():
212
232
  uninstall_app()
213
233
  elif command == "clear-data":
214
234
  clear_app_data()
235
+ elif command == "app-check":
236
+ sys.exit(app_check_command(sys.argv[2:]))
215
237
  elif command == "install-scrcpy":
216
238
  install_scrcpy()
217
239
 
@@ -20,6 +20,7 @@ core/state.py
20
20
  managers/__init__.py
21
21
  managers/ai.py
22
22
  managers/app.py
23
+ managers/app_check.py
23
24
  managers/brew.py
24
25
  managers/build.py
25
26
  managers/datetime.py
@@ -34,6 +35,7 @@ managers/package.py
34
35
  managers/project.py
35
36
  managers/web_deploy.py
36
37
  tests/test_ai_config.py
38
+ tests/test_app_check.py
37
39
  tests/test_app_commands.py
38
40
  tests/test_fdev_cli.py
39
41
  tests/test_localization.py
@@ -65,6 +65,10 @@ from .doctor import (
65
65
  run_doctor,
66
66
  )
67
67
 
68
+ from .app_check import (
69
+ app_check_command,
70
+ )
71
+
68
72
  from .brew import (
69
73
  brew_manager,
70
74
  )