flutter-dev 0.1.0__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.
@@ -0,0 +1,26 @@
1
+ # AI API Keys Configuration
2
+ # সব API keys এখানে secure ভাবে রাখুন
3
+ # এই file টি .gitignore এ add করতে হবে
4
+
5
+ # Groq API (Current - Active)
6
+ GROQ_API_KEY=your_groq_api_key_here
7
+ GROQ_API_URL=https://api.groq.com/openai/v1/chat/completions
8
+ GROQ_MODEL=llama-3.3-70b-versatile
9
+
10
+ # Mistral AI API
11
+ MISTRAL_API_KEY=your_mistral_api_key_here
12
+ MISTRAL_API_URL=https://api.mistral.ai/v1/chat/completions
13
+ MISTRAL_MODEL=mistral-medium
14
+
15
+ # SambaNova API
16
+ SAMBANOVA_API_KEY=your_sambanova_api_key_here
17
+ SAMBANOVA_API_URL=https://api.sambanova.ai/v1/chat/completions
18
+ SAMBANOVA_MODEL=Meta-Llama-3.3-70B-Instruct
19
+
20
+ # OpenRouter API
21
+ OPENROUTER_API_KEY=your_openrouter_api_key_here
22
+ OPENROUTER_API_URL=https://openrouter.ai/api/v1/chat/completions
23
+ OPENROUTER_MODEL=openai/gpt-3.5-turbo
24
+
25
+ # Default AI Service (groq, mistral, sambanova, openrouter)
26
+ DEFAULT_AI_SERVICE=groq
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Maxcode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,14 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ include .env.example
5
+ include install_legacy.py
6
+ recursive-include core *.py
7
+ recursive-include managers *.py
8
+ global-exclude __pycache__/*
9
+ global-exclude *.py[cod]
10
+ global-exclude .DS_Store
11
+ exclude .env
12
+ exclude dist/*
13
+ exclude build/*
14
+ exclude *.egg-info/*
@@ -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).