flutter-dev 0.1.0__py3-none-any.whl
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.
- common_utils.py +261 -0
- core/__init__.py +7 -0
- core/constants.py +57 -0
- core/state.py +25 -0
- create_page.py +288 -0
- fdev.py +258 -0
- flutter_dev-0.1.0.dist-info/METADATA +411 -0
- flutter_dev-0.1.0.dist-info/RECORD +30 -0
- flutter_dev-0.1.0.dist-info/WHEEL +5 -0
- flutter_dev-0.1.0.dist-info/entry_points.txt +5 -0
- flutter_dev-0.1.0.dist-info/licenses/LICENSE +21 -0
- flutter_dev-0.1.0.dist-info/top_level.txt +9 -0
- gemini_api.py +395 -0
- git_diff_output_editor.py +34 -0
- install_legacy.py +467 -0
- managers/__init__.py +69 -0
- managers/ai.py +113 -0
- managers/app.py +541 -0
- managers/brew.py +477 -0
- managers/build.py +436 -0
- managers/datetime.py +49 -0
- managers/device.py +207 -0
- managers/doctor.py +286 -0
- managers/git.py +981 -0
- managers/git_account.py +542 -0
- managers/merge.py +165 -0
- managers/mirror.py +205 -0
- managers/project.py +138 -0
- managers/web_deploy.py +43 -0
- switch_ai.py +181 -0
fdev.py
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
fdev - Flutter Development CLI Tool
|
|
4
|
+
Main entry point and command dispatcher
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import signal
|
|
10
|
+
|
|
11
|
+
from common_utils import RED, GREEN, YELLOW, BLUE, NC
|
|
12
|
+
|
|
13
|
+
# Import managers
|
|
14
|
+
from managers.build import (
|
|
15
|
+
build_apk,
|
|
16
|
+
build_apk_split_per_abi,
|
|
17
|
+
build_aab,
|
|
18
|
+
build_ipa,
|
|
19
|
+
release_run,
|
|
20
|
+
)
|
|
21
|
+
from managers.git import (
|
|
22
|
+
create_and_push_tag,
|
|
23
|
+
smart_commit,
|
|
24
|
+
discard_changes,
|
|
25
|
+
sync_branches,
|
|
26
|
+
deploy_to_deployment,
|
|
27
|
+
)
|
|
28
|
+
from managers.app import (
|
|
29
|
+
install_apk,
|
|
30
|
+
uninstall_app,
|
|
31
|
+
clear_app_data,
|
|
32
|
+
)
|
|
33
|
+
from managers.project import (
|
|
34
|
+
full_setup,
|
|
35
|
+
cleanup_project,
|
|
36
|
+
generate_lang,
|
|
37
|
+
run_build_runner,
|
|
38
|
+
repair_cache,
|
|
39
|
+
update_pods,
|
|
40
|
+
create_page,
|
|
41
|
+
)
|
|
42
|
+
from managers.mirror import (
|
|
43
|
+
setup_wireless_adb,
|
|
44
|
+
launch_scrcpy,
|
|
45
|
+
)
|
|
46
|
+
from managers.merge import (
|
|
47
|
+
merge_files,
|
|
48
|
+
)
|
|
49
|
+
from managers.ai import (
|
|
50
|
+
show_ai_status,
|
|
51
|
+
switch_ai_service,
|
|
52
|
+
)
|
|
53
|
+
from managers.datetime import (
|
|
54
|
+
open_datetime_settings,
|
|
55
|
+
)
|
|
56
|
+
from managers.web_deploy import (
|
|
57
|
+
web_deploy,
|
|
58
|
+
)
|
|
59
|
+
from managers.doctor import (
|
|
60
|
+
run_doctor,
|
|
61
|
+
)
|
|
62
|
+
from managers.brew import (
|
|
63
|
+
brew_manager,
|
|
64
|
+
)
|
|
65
|
+
from managers.git_account import (
|
|
66
|
+
git_account_manager,
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def show_usage():
|
|
71
|
+
"""Show usage information"""
|
|
72
|
+
print(f"{YELLOW}Usage: {sys.argv[0]} [command] [options]{NC}")
|
|
73
|
+
print(f"\n{BLUE}Build Commands:{NC}")
|
|
74
|
+
print(" apk Build release APK (Full Process)")
|
|
75
|
+
print(" apk-split Build APK with --split-per-abi")
|
|
76
|
+
print(" aab Build release AAB")
|
|
77
|
+
print(" ipa Build IPA for App Store (macOS only)")
|
|
78
|
+
print(" release-run Build & install release APK on connected device")
|
|
79
|
+
print(" web-deploy Build Flutter web (release) + Firebase deploy (functions & hosting)")
|
|
80
|
+
|
|
81
|
+
print(f"\n{BLUE}Development Commands:{NC}")
|
|
82
|
+
print(" lang Generate localization files")
|
|
83
|
+
print(" db Run build_runner")
|
|
84
|
+
print(" setup Perform full project setup")
|
|
85
|
+
print(" cleanup Clean project and get dependencies")
|
|
86
|
+
print(" cache-repair Repair pub cache")
|
|
87
|
+
print(" page Create page structure (usage: fdev page <page_name>)")
|
|
88
|
+
|
|
89
|
+
print(f"\n{BLUE}Device Commands:{NC}")
|
|
90
|
+
print(" install Install built APK on connected device")
|
|
91
|
+
print(" uninstall Uninstall app from connected device")
|
|
92
|
+
print(" clear-data Clear data of currently running foreground app")
|
|
93
|
+
print(" mirror Launch scrcpy screen mirror (auto-detect device)")
|
|
94
|
+
print(" --wireless Setup wireless ADB connection")
|
|
95
|
+
print(" --no-top Launch mirror without 'always on top' window")
|
|
96
|
+
print(" datetime Open device Date & Time settings (auto-time disabled)")
|
|
97
|
+
|
|
98
|
+
print(f"\n{BLUE}Git & iOS Commands:{NC}")
|
|
99
|
+
print(" pod Update iOS pods (macOS/Linux only)")
|
|
100
|
+
print(" tag Create and push git tag (auto-increment)")
|
|
101
|
+
print(" commit Smart git commit with AI-generated message")
|
|
102
|
+
print(" discard Discard all uncommitted changes (tracked + untracked)")
|
|
103
|
+
print(" sync Sync current branch with other branches bidirectionally")
|
|
104
|
+
print(" deploy Deploy current branch to 'deployment' branch")
|
|
105
|
+
|
|
106
|
+
print(f"\n{BLUE}Utility Commands:{NC}")
|
|
107
|
+
print(" doctor Check environment health (tools, deps, config)")
|
|
108
|
+
print(" brew Interactive Homebrew package manager")
|
|
109
|
+
print(" merge Merge files from paths.txt into single output file")
|
|
110
|
+
print(" ai Show current AI service or switch to another")
|
|
111
|
+
print(" Usage: fdev ai [groq|mistral|sambanova|openrouter]")
|
|
112
|
+
print(" git Manage multiple GitHub accounts (gh CLI wrapper)")
|
|
113
|
+
print(" Subcommands: status, list, switch, add, remove, config")
|
|
114
|
+
|
|
115
|
+
print(f"\n{BLUE}Examples:{NC}")
|
|
116
|
+
print(f" {GREEN}fdev mirror{NC} # Launch screen mirror")
|
|
117
|
+
print(f" {GREEN}fdev mirror --wireless{NC} # Setup wireless ADB first")
|
|
118
|
+
print(f" {GREEN}fdev mirror --no-top{NC} # Launch mirror without always-on-top")
|
|
119
|
+
print(f" {GREEN}fdev datetime{NC} # Open device Date & Time settings")
|
|
120
|
+
print(f" {GREEN}fdev uninstall{NC} # Uninstall app (auto-selects device)")
|
|
121
|
+
print(f" {GREEN}fdev discard{NC} # Discard all uncommitted changes")
|
|
122
|
+
print(f" {GREEN}fdev sync dev-farhan dev-sufi{NC} # Sync with multiple branches")
|
|
123
|
+
print(f" {GREEN}fdev deploy{NC} # Deploy to deployment branch")
|
|
124
|
+
print(f" {GREEN}fdev ai{NC} # Show current AI service")
|
|
125
|
+
print(f" {GREEN}fdev ai groq{NC} # Switch to Groq AI")
|
|
126
|
+
print(f" {GREEN}fdev git{NC} # Interactive GitHub account manager")
|
|
127
|
+
print(f" {GREEN}fdev git switch royalcourtbd{NC} # Switch to a specific GH account")
|
|
128
|
+
print(f" {GREEN}fdev git config{NC} # Update git user.name / user.email")
|
|
129
|
+
|
|
130
|
+
print(f"\n{BLUE}Note:{NC}")
|
|
131
|
+
print(f" {YELLOW}Multiple devices detected?{NC} Tool will prompt you to select one.")
|
|
132
|
+
sys.exit(1)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def main():
|
|
136
|
+
"""Main function - Command dispatcher"""
|
|
137
|
+
# Create required directories if they don't exist
|
|
138
|
+
os.makedirs("build/app/outputs/flutter-apk", exist_ok=True)
|
|
139
|
+
os.makedirs("build/app/outputs/bundle/release", exist_ok=True)
|
|
140
|
+
os.makedirs("build/ios/ipa", exist_ok=True)
|
|
141
|
+
|
|
142
|
+
if len(sys.argv) < 2:
|
|
143
|
+
show_usage()
|
|
144
|
+
|
|
145
|
+
command = sys.argv[1].lower()
|
|
146
|
+
|
|
147
|
+
# Build commands
|
|
148
|
+
if command == "apk":
|
|
149
|
+
build_apk()
|
|
150
|
+
elif command == "apk-split":
|
|
151
|
+
build_apk_split_per_abi()
|
|
152
|
+
elif command == "aab":
|
|
153
|
+
build_aab()
|
|
154
|
+
elif command == "ipa":
|
|
155
|
+
build_ipa()
|
|
156
|
+
elif command == "release-run":
|
|
157
|
+
release_run()
|
|
158
|
+
elif command == "web-deploy":
|
|
159
|
+
web_deploy()
|
|
160
|
+
|
|
161
|
+
# Development commands
|
|
162
|
+
elif command == "lang":
|
|
163
|
+
generate_lang()
|
|
164
|
+
elif command == "db":
|
|
165
|
+
run_build_runner()
|
|
166
|
+
elif command == "setup":
|
|
167
|
+
full_setup()
|
|
168
|
+
elif command == "cache-repair":
|
|
169
|
+
repair_cache()
|
|
170
|
+
elif command == "cleanup":
|
|
171
|
+
cleanup_project()
|
|
172
|
+
|
|
173
|
+
# Device commands
|
|
174
|
+
elif command == "install":
|
|
175
|
+
install_apk()
|
|
176
|
+
elif command == "uninstall":
|
|
177
|
+
uninstall_app()
|
|
178
|
+
elif command == "clear-data":
|
|
179
|
+
clear_app_data()
|
|
180
|
+
|
|
181
|
+
# Git & iOS commands
|
|
182
|
+
elif command == "pod":
|
|
183
|
+
update_pods()
|
|
184
|
+
elif command == "tag":
|
|
185
|
+
create_and_push_tag()
|
|
186
|
+
elif command == "commit":
|
|
187
|
+
smart_commit()
|
|
188
|
+
elif command == "discard":
|
|
189
|
+
discard_changes(discard_all=True)
|
|
190
|
+
elif command == "sync":
|
|
191
|
+
if len(sys.argv) < 3:
|
|
192
|
+
print(f"{RED}Error: At least one branch name is required.{NC}")
|
|
193
|
+
print(f"{BLUE}Usage: fdev sync <branch1> [branch2] [branch3] ...{NC}")
|
|
194
|
+
print(f"\n{BLUE}Example:{NC}")
|
|
195
|
+
print(f" {GREEN}fdev sync dev-farhan dev-sufi{NC}")
|
|
196
|
+
sys.exit(1)
|
|
197
|
+
branch_names = sys.argv[2:]
|
|
198
|
+
sync_branches(branch_names)
|
|
199
|
+
elif command == "deploy":
|
|
200
|
+
deploy_to_deployment()
|
|
201
|
+
|
|
202
|
+
# Mirror command
|
|
203
|
+
elif command == "mirror":
|
|
204
|
+
# Check for wireless option
|
|
205
|
+
wireless = "--wireless" in sys.argv
|
|
206
|
+
no_top = "--no-top" in sys.argv
|
|
207
|
+
if wireless:
|
|
208
|
+
setup_wireless_adb()
|
|
209
|
+
else:
|
|
210
|
+
launch_scrcpy(always_on_top=not no_top)
|
|
211
|
+
|
|
212
|
+
# DateTime command
|
|
213
|
+
elif command == "datetime":
|
|
214
|
+
open_datetime_settings()
|
|
215
|
+
|
|
216
|
+
# Page generation
|
|
217
|
+
elif command == "page":
|
|
218
|
+
if len(sys.argv) < 3:
|
|
219
|
+
print(f"{RED}Error: Page name is required.{NC}")
|
|
220
|
+
print(f"{BLUE}Usage: {sys.argv[0]} page <page_name>{NC}")
|
|
221
|
+
sys.exit(1)
|
|
222
|
+
create_page(sys.argv[2])
|
|
223
|
+
|
|
224
|
+
# Utility commands
|
|
225
|
+
elif command == "merge":
|
|
226
|
+
merge_files()
|
|
227
|
+
|
|
228
|
+
# Doctor command
|
|
229
|
+
elif command == "doctor":
|
|
230
|
+
run_doctor()
|
|
231
|
+
|
|
232
|
+
# Brew command
|
|
233
|
+
elif command == "brew":
|
|
234
|
+
brew_manager()
|
|
235
|
+
|
|
236
|
+
# AI command
|
|
237
|
+
elif command == "ai":
|
|
238
|
+
if len(sys.argv) < 3:
|
|
239
|
+
show_ai_status()
|
|
240
|
+
else:
|
|
241
|
+
switch_ai_service(sys.argv[2])
|
|
242
|
+
|
|
243
|
+
# GitHub account manager
|
|
244
|
+
elif command == "git":
|
|
245
|
+
git_account_manager(sys.argv[2:])
|
|
246
|
+
|
|
247
|
+
else:
|
|
248
|
+
show_usage()
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
if __name__ == "__main__":
|
|
252
|
+
# Handle Ctrl+C gracefully
|
|
253
|
+
def signal_handler(sig, frame):
|
|
254
|
+
print(f"\n{YELLOW}Process interrupted. Exiting...{NC}")
|
|
255
|
+
sys.exit(0)
|
|
256
|
+
|
|
257
|
+
signal.signal(signal.SIGINT, signal_handler)
|
|
258
|
+
main()
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flutter-dev
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A cross-platform CLI toolkit for Flutter development workflows.
|
|
5
|
+
Author: Maxcode
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/royalcourtbd/flutter-development-tools
|
|
8
|
+
Project-URL: Repository, https://github.com/royalcourtbd/flutter-development-tools
|
|
9
|
+
Project-URL: Issues, https://github.com/royalcourtbd/flutter-development-tools/issues
|
|
10
|
+
Keywords: flutter,cli,developer-tools,automation
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: MacOS
|
|
15
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
25
|
+
Classifier: Topic :: Utilities
|
|
26
|
+
Requires-Python: >=3.8
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
License-File: LICENSE
|
|
29
|
+
Requires-Dist: python-dotenv>=0.19.0
|
|
30
|
+
Requires-Dist: requests>=2.25.0
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# Flutter Development Tools ๐
|
|
34
|
+
|
|
35
|
+
Advanced Flutter development utilities with **AI-powered commit messages** that work on **macOS**, **Linux**, and **Windows**.
|
|
36
|
+
|
|
37
|
+
## ๐ซ Prerequisites
|
|
38
|
+
|
|
39
|
+
- **Python 3.8+** installed and available in PATH
|
|
40
|
+
- **Flutter SDK** installed and configured
|
|
41
|
+
- **Git** installed and configured
|
|
42
|
+
- **Internet connection** (for AI features)
|
|
43
|
+
- **AI provider API access** (Groq, Mistral, SambaNova, or OpenRouter for AI commit messages)
|
|
44
|
+
|
|
45
|
+
## ๐ Quick Setup
|
|
46
|
+
|
|
47
|
+
### Install from PyPI
|
|
48
|
+
|
|
49
|
+
> Public PyPI packaging is the target distribution path. Until a release is published, use the local repository setup below.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m pip install flutter-dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
After installation, verify the command is available:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
fdev doctor
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Install from source
|
|
62
|
+
|
|
63
|
+
### 1. Download/Clone this repository
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git clone <repository-url>
|
|
67
|
+
cd flutter-tools
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 2. Install locally
|
|
71
|
+
|
|
72
|
+
For package-style local installation:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
python -m pip install .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For the legacy global script installer:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
python3 install_legacy.py # macOS/Linux
|
|
82
|
+
python install_legacy.py # Windows
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 3. Follow the instructions
|
|
86
|
+
|
|
87
|
+
The legacy setup script will:
|
|
88
|
+
|
|
89
|
+
- Create necessary directories
|
|
90
|
+
- Install scripts globally
|
|
91
|
+
- Set up PATH (with instructions)
|
|
92
|
+
|
|
93
|
+
## ๐ฆ Packaging for PyPI
|
|
94
|
+
|
|
95
|
+
This project is being migrated toward a public PyPI package. Packaging metadata should stay declarative and safe for public distribution:
|
|
96
|
+
|
|
97
|
+
- Keep package metadata, README content, and license files free of API keys, tokens, passwords, `.env` contents, private repository URLs, and machine-specific paths.
|
|
98
|
+
- Use `.env.example` only for placeholder values such as `your_api_key_here`.
|
|
99
|
+
- Prefer PyPI Trusted Publishing for release automation. If a token is required locally, pass it through an environment variable and never write the token into docs, config files, commit messages, or terminal transcripts.
|
|
100
|
+
- Build release artifacts from a clean checkout and inspect the generated source distribution before upload.
|
|
101
|
+
|
|
102
|
+
Recommended local release checks:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
python -m pip install --upgrade build twine
|
|
106
|
+
python -m build
|
|
107
|
+
python -m twine check dist/*
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
When the package metadata is ready and the release has been reviewed, publish with one of these approaches:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Recommended for CI configured with PyPI Trusted Publishing:
|
|
114
|
+
python -m twine upload dist/*
|
|
115
|
+
|
|
116
|
+
# Local token-based publish, only if needed:
|
|
117
|
+
TWINE_USERNAME=__token__ TWINE_PASSWORD="$PYPI_API_TOKEN" python -m twine upload dist/*
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Do not paste the value of `PYPI_API_TOKEN` or any AI provider API key into documentation or issue/PR text.
|
|
121
|
+
|
|
122
|
+
## ๐ก Quick Usage Examples
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# AI-powered commit
|
|
126
|
+
fdev commit # Generate smart commit message with AI
|
|
127
|
+
|
|
128
|
+
# Build and deploy
|
|
129
|
+
fdev apk # Build release APK
|
|
130
|
+
fdev release-run # Build and install on device
|
|
131
|
+
|
|
132
|
+
# Project maintenance
|
|
133
|
+
fdev setup # Full project setup
|
|
134
|
+
fdev cleanup # Clean and refresh dependencies
|
|
135
|
+
|
|
136
|
+
# Page generation
|
|
137
|
+
fdev page login # Create login page structure
|
|
138
|
+
|
|
139
|
+
# Version management
|
|
140
|
+
fdev tag # Create git tag from pubspec version
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## ๐ฑ Available Commands
|
|
144
|
+
|
|
145
|
+
### Build Commands
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
fdev apk # Build release APK (Full Process)
|
|
149
|
+
fdev apk-split # Build APK with --split-per-abi
|
|
150
|
+
fdev aab # Build release AAB
|
|
151
|
+
fdev release-run # Build & install APK on device
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Development Commands
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
fdev setup # Full project setup
|
|
158
|
+
fdev cleanup # Clean project and get dependencies
|
|
159
|
+
fdev db # Run build_runner
|
|
160
|
+
fdev lang # Generate localization files
|
|
161
|
+
fdev cache-repair # Repair pub cache
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### iOS Commands
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
fdev pod # Update iOS pods (macOS only)
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Git Commands ๐ค
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
fdev tag # Create and push git tag from pubspec version
|
|
174
|
+
fdev commit # Smart git commit with AI-generated message
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Project Generation
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
fdev page user_profile # Via fdev command
|
|
181
|
+
create-page page user_profile # Direct command
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Device Commands
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
fdev uninstall # Uninstall app from connected device
|
|
188
|
+
fdev clear-data # Clear data of currently running foreground app (Android/iOS)
|
|
189
|
+
fdev mirror # Launch scrcpy screen mirror
|
|
190
|
+
fdev mirror --wireless # Setup wireless ADB connection first
|
|
191
|
+
fdev mirror --no-top # Launch mirror without always-on-top window
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### ๐ Clear App Data Feature
|
|
195
|
+
|
|
196
|
+
Automatically clears data of the currently running foreground app without manual package name input!
|
|
197
|
+
|
|
198
|
+
**Features:**
|
|
199
|
+
|
|
200
|
+
- โ
Automatic package name detection (no manual input needed)
|
|
201
|
+
- โ
Android full support (works on all OS: macOS, Linux, Windows)
|
|
202
|
+
- โ
iOS partial support (manual options provided)
|
|
203
|
+
- โ
Safety confirmation before clearing
|
|
204
|
+
- โ
Clears all app data: cache, database, settings, files
|
|
205
|
+
|
|
206
|
+
**Quick Usage:**
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# 1. Open the app you want to clear data for on your device
|
|
210
|
+
# 2. Run the command
|
|
211
|
+
fdev clear-data
|
|
212
|
+
|
|
213
|
+
# It will detect the app and ask for confirmation
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Platform Support:**
|
|
217
|
+
|
|
218
|
+
- **Android**: Full automatic support - detects foreground app and clears data with `pm clear`
|
|
219
|
+
- **iOS**: Provides manual instructions (iOS doesn't support direct data clearing)
|
|
220
|
+
|
|
221
|
+
๐ **Detailed Documentation:**
|
|
222
|
+
|
|
223
|
+
- English: See `CLEAR_DATA_FEATURE.md`
|
|
224
|
+
- เฆฌเฆพเฆเฆฒเฆพ: See `CLEAR_DATA_BANGLA.md`
|
|
225
|
+
|
|
226
|
+
### ๐ฑ Screen Mirroring (scrcpy)
|
|
227
|
+
|
|
228
|
+
`fdev mirror` command เฆฆเฆฟเฆฏเฆผเง เฆเฆชเฆจเฆพเฆฐ Android device screen mirror เฆเฆฐเฆคเง เฆชเฆพเฆฐเฆฌเงเฆจเฅค
|
|
229
|
+
|
|
230
|
+
**Installation:**
|
|
231
|
+
|
|
232
|
+
scrcpy install เฆเฆฐเฆพเฆฐ เฆฆเงเฆเฆเฆฟ เฆเฆชเฆพเฆฏเฆผ:
|
|
233
|
+
|
|
234
|
+
**Option 1: Homebrew เฆฆเฆฟเฆฏเฆผเง (Recommended)**
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
brew install scrcpy
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Option 2: Manual Download เฆฅเงเฆเง PATH เฆ add เฆเฆฐเงเฆจ**
|
|
241
|
+
|
|
242
|
+
เฆฏเฆฆเฆฟ scrcpy already download เฆเฆฐเฆพ เฆฅเฆพเฆเง (เฆฏเงเฆฎเฆจ `/Users/sayed/Documents/scrcpy-macos-x86_64-v3.3`), เฆคเฆพเฆนเฆฒเง เฆเฆเฆพ PATH เฆ add เฆเฆฐเงเฆจ:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# .zshrc file เฆ scrcpy path add เฆเฆฐเงเฆจ
|
|
246
|
+
echo 'export PATH="/Users/sayed/Documents/scrcpy-macos-x86_64-v3.3:$PATH"' >> ~/.zshrc
|
|
247
|
+
|
|
248
|
+
# เฆคเฆพเฆฐเฆชเฆฐ reload เฆเฆฐเงเฆจ
|
|
249
|
+
source ~/.zshrc
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Usage:**
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Wired connection เฆฆเฆฟเฆฏเฆผเง mirror เฆเฆฐเงเฆจ
|
|
256
|
+
fdev mirror
|
|
257
|
+
|
|
258
|
+
# Wireless ADB setup เฆเฆฐเง เฆคเฆพเฆฐเฆชเฆฐ mirror เฆเฆฐเงเฆจ
|
|
259
|
+
fdev mirror --wireless
|
|
260
|
+
|
|
261
|
+
# Always-on-top เฆเฆพเฆกเฆผเฆพ mirror เฆเฆฐเงเฆจ (normal window)
|
|
262
|
+
fdev mirror --no-top
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
**Features:**
|
|
266
|
+
|
|
267
|
+
- โ
Automatic device detection
|
|
268
|
+
- โ
Optimized settings for performance
|
|
269
|
+
- โ
Wireless ADB support
|
|
270
|
+
- โ
Multiple device selection
|
|
271
|
+
|
|
272
|
+
## ๐ค AI Features
|
|
273
|
+
|
|
274
|
+
### Smart Commit Messages
|
|
275
|
+
|
|
276
|
+
The `fdev commit` command uses **Google Gemini AI** to generate professional commit messages:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
fdev commit
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Features:**
|
|
283
|
+
|
|
284
|
+
- ๐ฏ **Conventional Commits**: Follows Angular format (`feat:`, `fix:`, `docs:`, etc.)
|
|
285
|
+
- ๐ **Automatic Analysis**: Analyzes your git diff to understand changes
|
|
286
|
+
- ๐จ **Smart Formatting**: Adds bullet points to description lines
|
|
287
|
+
- โ
**Review & Confirm**: Shows generated message before committing
|
|
288
|
+
- ๐ **Auto-staging**: Stages unstaged changes if needed
|
|
289
|
+
|
|
290
|
+
**Example Output:**
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
Generated commit message:
|
|
294
|
+
feat(auth): implement user login with validation ๐
|
|
295
|
+
|
|
296
|
+
- Added email and password input fields with real-time validation
|
|
297
|
+
- Integrated Firebase Authentication for secure user login
|
|
298
|
+
- Added loading states and error handling for better UX
|
|
299
|
+
- Implemented remember me functionality with secure storage
|
|
300
|
+
|
|
301
|
+
Proceed with this commit? (y/N):
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
## ๐ง Platform-Specific Notes
|
|
305
|
+
|
|
306
|
+
### Windows
|
|
307
|
+
|
|
308
|
+
- Commands available as: `fdev.bat`, `create-page.bat`
|
|
309
|
+
- Uses batch wrappers for cross-platform compatibility
|
|
310
|
+
- Add `%USERPROFILE%\bin` to your PATH
|
|
311
|
+
|
|
312
|
+
### macOS/Linux
|
|
313
|
+
|
|
314
|
+
- Commands available as: `fdev`, `create-page`
|
|
315
|
+
- Uses symlinks for better performance
|
|
316
|
+
- Add `$HOME/bin` to your PATH
|
|
317
|
+
|
|
318
|
+
## ๐ File Structure
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
~/scripts/flutter-tools/
|
|
322
|
+
โโโ fdev.py # Main utility script with AI features
|
|
323
|
+
โโโ create_page.py # Page generator script
|
|
324
|
+
โโโ gemini_api.py # Google Gemini AI integration
|
|
325
|
+
โโโ git_diff_output_editor.py # Git diff processing utilities
|
|
326
|
+
โโโ setup.py # Cross-platform setup
|
|
327
|
+
โโโ README.md # This file
|
|
328
|
+
|
|
329
|
+
~/bin/ # Global commands
|
|
330
|
+
โโโ fdev[.bat] # Main command
|
|
331
|
+
โโโ create-page[.bat] # Page generator
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## ๐ Updates
|
|
335
|
+
|
|
336
|
+
To update the tools:
|
|
337
|
+
|
|
338
|
+
1. **Edit the master files:**
|
|
339
|
+
- `~/scripts/flutter-tools/fdev.py`
|
|
340
|
+
- `~/scripts/flutter-tools/create_page.py`
|
|
341
|
+
- `~/scripts/flutter-tools/gemini_api.py`
|
|
342
|
+
|
|
343
|
+
2. **Changes are automatically available globally!**
|
|
344
|
+
|
|
345
|
+
### AI Configuration
|
|
346
|
+
|
|
347
|
+
The AI features use provider API keys loaded from environment configuration. Keep real keys in your local `.env` or shell environment only, and keep committed examples limited to placeholders.
|
|
348
|
+
|
|
349
|
+
## ๐ Troubleshooting
|
|
350
|
+
|
|
351
|
+
### Command not found
|
|
352
|
+
|
|
353
|
+
- **Windows**: Make sure `%USERPROFILE%\bin` is in your PATH
|
|
354
|
+
- **macOS/Linux**: Make sure `$HOME/bin` is in your PATH
|
|
355
|
+
- Restart your terminal after PATH changes
|
|
356
|
+
|
|
357
|
+
### Permission denied (macOS/Linux)
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
chmod +x ~/scripts/flutter-tools/*.py
|
|
361
|
+
chmod +x ~/bin/fdev ~/bin/create-page
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Python not found
|
|
365
|
+
|
|
366
|
+
Make sure Python 3 is installed and available in your PATH.
|
|
367
|
+
|
|
368
|
+
### Flutter project not detected
|
|
369
|
+
|
|
370
|
+
Make sure you're running commands from the root of a Flutter project (where `pubspec.yaml` exists).
|
|
371
|
+
|
|
372
|
+
### AI commit message generation fails
|
|
373
|
+
|
|
374
|
+
- Check your internet connection
|
|
375
|
+
- Verify the selected AI provider API key in your local `.env` or shell environment
|
|
376
|
+
- Make sure you have git changes to analyze
|
|
377
|
+
- Try running `python3 gemini_api.py` to test the API connection
|
|
378
|
+
|
|
379
|
+
## ๐ฏ Features
|
|
380
|
+
|
|
381
|
+
### Core Features
|
|
382
|
+
|
|
383
|
+
- โ
**Cross-platform** - Works on macOS, Linux, Windows
|
|
384
|
+
- โ
**Global access** - Use from any Flutter project directory
|
|
385
|
+
- โ
**Auto-updates** - Edit once, use everywhere
|
|
386
|
+
- โ
**Clean architecture** - Separate concerns, maintainable
|
|
387
|
+
- โ
**Flutter project detection** - Prevents running in wrong directories
|
|
388
|
+
- โ
**Time tracking** - Shows how long operations take
|
|
389
|
+
- โ
**Color output** - Easy to read terminal output
|
|
390
|
+
- โ
**Error handling** - Graceful error messages and recovery
|
|
391
|
+
|
|
392
|
+
### AI-Powered Features ๐ค
|
|
393
|
+
|
|
394
|
+
- ๐ฏ **Smart Commits** - AI-generated commit messages using Google Gemini
|
|
395
|
+
- ๐ **Conventional Format** - Follows industry-standard commit conventions
|
|
396
|
+
- ๐ **Code Analysis** - Automatically analyzes git diffs to understand changes
|
|
397
|
+
- โจ **Professional Output** - Clean, formatted commit messages with bullet points
|
|
398
|
+
- ๐ **Interactive Workflow** - Review and confirm before committing
|
|
399
|
+
|
|
400
|
+
### Development Utilities
|
|
401
|
+
|
|
402
|
+
- ๐ฆ **Build Management** - APK, AAB, split builds
|
|
403
|
+
- ๐ฑ **Device Management** - Install, uninstall, release builds
|
|
404
|
+
- ๐ **Localization** - Generate language files
|
|
405
|
+
- ๐บ **Page Generation** - Create Flutter page structures
|
|
406
|
+
- ๐งน **Project Maintenance** - Cleanup, cache repair, dependency management
|
|
407
|
+
- ๐ท **Version Control** - Git tagging from pubspec version
|
|
408
|
+
|
|
409
|
+
## ๐ License
|
|
410
|
+
|
|
411
|
+
MIT License. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
common_utils.py,sha256=IPHg-I3M1b0GjMD0oej_EuB6bDwpHvNrem8ShJKBMHc,8447
|
|
2
|
+
create_page.py,sha256=2_-luEWNnVB7pAhmkWqZV6KI6seQBcgOm4a-94YhJYg,10907
|
|
3
|
+
fdev.py,sha256=PPTlO5cV2KF973ygNUHqFCOXvarI89i5VebZhOD9RK8,8440
|
|
4
|
+
gemini_api.py,sha256=9cVbXpXIZt3heivhAyXpkAU5RXTIORBDjTjNjAdYQBo,13604
|
|
5
|
+
git_diff_output_editor.py,sha256=JlBsi59DPorF36w8HqIMjrlYa1EJnC1Afwx9-evMYXc,1102
|
|
6
|
+
install_legacy.py,sha256=n7uidX_VzRKa07r5zeo-QtAAy1ocYwpueQb2s9UwLNg,18457
|
|
7
|
+
switch_ai.py,sha256=xZ857DGOvWtdGzmB0loQtOR-lKaPbRLc2UnlcAuTRls,5368
|
|
8
|
+
core/__init__.py,sha256=-RKOY4PJeJhN_gPqopsh4Z-m5l4qzhsnknSaBXirh58,211
|
|
9
|
+
core/constants.py,sha256=DXbTezdwXii1K9--OyXVuXAwZnhTJQAwV7z2QqUsswo,2161
|
|
10
|
+
core/state.py,sha256=hyse7b5zbWHJHKeh8vLfFLTQP27AqKw6Fc3NoxTwzsE,532
|
|
11
|
+
flutter_dev-0.1.0.dist-info/licenses/LICENSE,sha256=9SjWAhX5oey8kvwljiqKaYHJJnFIOQlKB4lydDKSYak,1064
|
|
12
|
+
managers/__init__.py,sha256=iP5KxupYJJ0V2qpCgPMFuV58YjAW_PQthuvpYzlCOf4,1017
|
|
13
|
+
managers/ai.py,sha256=S_xS9fY503RcaJIEHci-UbFyz9St-ttz9wpOANBjWh8,3325
|
|
14
|
+
managers/app.py,sha256=JFitOh9wDIIRn8gjankpTO8bOvNBuc8-Q4s7ngR8GnA,20591
|
|
15
|
+
managers/brew.py,sha256=425fjmJ3ddNSQ2oI8gZE1v61WWvHpT__tP1rQoh0O1c,15631
|
|
16
|
+
managers/build.py,sha256=mXxZ2iX7x4tt82QI70q6OQdBQREdJIyrLSnTx9MR6UM,15266
|
|
17
|
+
managers/datetime.py,sha256=PNBAxLP4YF5ZrfCoNRsAC1jfO16FxJqy9_ooHRP4OJA,1545
|
|
18
|
+
managers/device.py,sha256=89fvIS4d5lx2HH2kRqNn9DFAi1u16SoXMy0H9_vz66U,6603
|
|
19
|
+
managers/doctor.py,sha256=g8GNZq7q6H48c2Mp7g-Gi_fev6DxujGcDtvUFC4UYGE,11123
|
|
20
|
+
managers/git.py,sha256=T9gwZliFxe8nl-bivxA-O6n2P-_awR2vM1sxhpzl754,37470
|
|
21
|
+
managers/git_account.py,sha256=yqkUDTWdA9l5TUajNvHiqjA1zTvsV0HPBvYgvvuHpJY,18621
|
|
22
|
+
managers/merge.py,sha256=MvPDyVGD7jKHUZZdy49uXjZ0cudP_5LPo-LLkvvIOSk,6149
|
|
23
|
+
managers/mirror.py,sha256=ED2sBtec6nRaU2MfeZdsNSUHgRHstwDnXBNMD9OwEcE,6737
|
|
24
|
+
managers/project.py,sha256=9x3WsxPpFJZdCpBH4C26vsLg1iujSNh_hBWtf8_yJLU,5609
|
|
25
|
+
managers/web_deploy.py,sha256=UNl2Dk-xIQXd8oVJZ1ZtjVOwoklMCFFFqa_k2F3LvMo,1310
|
|
26
|
+
flutter_dev-0.1.0.dist-info/METADATA,sha256=5e8Lah42outgpC8a0lC8mEY_CUypj1gVqbeBcYL8tlA,12599
|
|
27
|
+
flutter_dev-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
28
|
+
flutter_dev-0.1.0.dist-info/entry_points.txt,sha256=CQSqeDe_wpXY9_m37d5Z7DrTPzczsnvRNeR2dskR0yc,141
|
|
29
|
+
flutter_dev-0.1.0.dist-info/top_level.txt,sha256=4B9mAM6ACarOmWd8jh8eOIEbarwEM3wbTs2GyWBrBOQ,103
|
|
30
|
+
flutter_dev-0.1.0.dist-info/RECORD,,
|