ssl_cli is your opinionated command-line companion for building production-ready Flutter apps in record time. It bakes in Clean Architecture, modular scaling, design-system best practices, security-first secret management, AI-powered coding rules, and DevOps automation so your team can stay focused on shipping featuresβnot wiring boilerplate.
- Architecture-first: generate full Clean Architecture projects and modules with domain, data, and presentation layers ready to go.
- State management flexibility: pick Riverpod (default) or Bloc during scaffoldingβssl_cli generates the right folder structure and stubs for you.
- Design system included: preconfigured global widgets (text, buttons, dropdowns, images, SVGs, app bars) and asset/color enums keep UI consistent.
- Automation everywhere: build flavors with obfuscation, auto-share APKs to Telegram, sync assets, kick off build_runner, and generate documentation from a single CLI.
- Why ssl_cli
- Core Capabilities
- Clean Architecture Blueprint
- Quick Start
- Command Reference
- Generated Project Structure
- Security & Secret Management
- AI Integration (.claude)
- UI & Design System Guidelines
- Automation & DevOps Helpers
- Contributing
- License
- Support
- Changelog
Flutter teams fight repetitive setup: folder conventions, state management wiring, asset registries, flavor configs, documentation, and build distribution. ssl_cli turns those decisions into confident defaults:
- Consistency: every project and module follows the same Clean Architecture and naming conventions.
- Scalability: generate new modules on demand with the entire domain β data β presentation pipeline.
- Velocity: opinionated templates reduce the cognitive load for new developers joining mid-project.
- Quality: prebuilt service locator, ScreenUtil setup, networking hooks, and error handling nudge you towards best practices.
- Automation: everyday chores (assets, build_runner, flavor builds) become one-liners.
| Area | What ssl_cli Automates |
|---|---|
| Project scaffolding | Create a Clean Architecture Flutter app from scratch with prewired core modules. |
| Module generation | Spin up feature modules with domain/data/presentation layers and optional Bloc or Riverpod states. |
| Design system | Global widgets, responsive typography via flutter_screenutil, centralized colors/assets enums. |
| Secure storage | flutter_secure_storage with in-memory cache β encrypted key-value storage out of the box. |
| Secret management | envied-based obfuscated secrets, .env workflow, auto-generated key.properties & Secret.xcconfig. |
| AI integration | .claude/ folder with coding rules, security docs, setup scripts, and Claude Code permissions. |
| Assets & L10n | Auto-generate k_assets.dart, create assets folders, and seed localization structure. |
| Documentation | Generate AI-assisted markdown docs for any folder or file. |
| Build & Release | Configure flavors, obfuscate builds, rename APKs by flavor, and deliver them to Telegram groups. |
| Developer tooling | Kick off build_runner or watch tasks with zero setup. |
ssl_cli follows a layered Clean Architecture implementation.
ββββββββββββββββββββββββββββ
β Presentation Layer β βΆοΈ Riverpod or Bloc wiring, pages, widgets
ββββββββββββββββββββββββββββ€
β Domain Layer β βΆοΈ Use cases, entities, repository contracts
ββββββββββββββββββββββββββββ€
β Data Layer β βΆοΈ Models, repositories, remote & local data sources
ββββββββββββββββββββββββββββ
- Domain before details: Entity and use case templates keep business rules pure and testable.
- Data isolation: Remote/local data sources and repository implementations ship with error-handling scaffolds, network checks, and caching placeholders.
- Presentation clarity: Choose
Riverpod(default) for provider/notifier setups or opt intoBlocto generate events, states, and blocs automatically. - State Management Prompt: When you scaffold a Clean Architecture project or module, ssl_cli asks for your preferred pattern and scaffolds the correct directory tree and stubs.
π§ The project root also includes
core/utilitiesβservice locator, API helpers, global widgets, theming, navigation, and moreβso modules can focus on feature logic.
-
Create a Flutter project (if you haven't already).
flutter create <project_name>
-
Activate ssl_cli globally.
dart pub global activate ssl_cli
-
Add the Dart pub cache to your PATH (first-time setup only):
- Windows: update System Environment Variables.
- macOS: add
export PATH="$PATH":"$HOME/.pub-cache/bin"to~/.zshrc. - Linux: add the same export to
~/.bashrc.
-
Navigate to your Flutter project root and run:
ssl_cli create <project_name>
- Pick pattern
4for the Clean Architecture template when prompted. - Choose your state management flavor (Riverpod or Bloc) when asked.
- Pick pattern
-
Bootstrap modules anytime.
ssl_cli module <module_name>
Select the Clean Architecture module pattern, then choose Riverpod or Bloc for that module.
β Always run commands from the Flutter project root so assets, localization, and configuration files generate in the right place.
ssl_cli create <project_name> # Generate a full Flutter project (choose Clean Architecture pattern "4")
ssl_cli module <module_name> # Add a new feature module (select Clean Architecture pattern "3")ssl_cli generate k_assets.dart # Build the assets enum (rerun after adding new assets)
ssl_cli generate k_assets.dart --t # Build theme-based assets enum with dark/light folder support
ssl_cli generate <path> # Create AI-assisted documentation for a file or folderTheme-based Assets (--t flag):
When your assets are organized with dark/ and light/ subfolders (e.g., assets/images/dark/, assets/images/light/), use the --t flag. This generates:
- Automatic theme switching between dark and light variants
- Fallback to common assets (files outside dark/light folders)
- Helper methods
_themedSvg()and_themedPng()that checkThemeManager().isDarkMode
Folder structure example:
assets/
ββ images/
β ββ dark/
β β ββ bg.png
β ββ light/
β β ββ bg.png
β ββ common_image.png
ββ svg/
ββ dark/
β ββ icon.svg
ββ light/
β ββ icon.svg
ββ common_icon.svg
ssl_cli generate build_runner # Run build_runner once
ssl_cli generate build_runner_watch# Run build_runner in watch modessl_cli setup --flavor # Configure flavor-based builds (works on existing projects too)
ssl_cli build apk --flavorType # Build APK per flavor (--DEV/--LIVE/--LOCAL/--STAGE)
ssl_cli build apk --flavorType --t # Build and auto-share APK to Telegram (requires config.json)βΉοΈ When using the Telegram flag (
--t), providebotTokenandchatIdin the generatedconfig.jsonfile. Obtain them via BotFather and thegetUpdatesAPI.
Below is a trimmed example of what a Clean Architecture project scaffolding looks like (Riverpod option shown):
project-root/
ββ CLAUDE.md # AI entry point β project context & pipeline
ββ .env.example # Template for secrets (committed)
ββ .env # Actual secrets (gitignored)
β
ββ .claude/ # AI rules, docs, and scripts
β ββ AI_CODING_RULES.md # Strict coding rules & patterns
β ββ settings.local.json # Claude Code tool permissions
β ββ docs/
β β ββ SECURITY.md # Secret management guide
β ββ scripts/
β ββ setup_secrets.sh # .env β key.properties + Secret.xcconfig
β
ββ lib/
β ββ core/
β β ββ config/
β β β ββ env.dart # envied class (Env.*)
β β β ββ env.g.dart # Generated obfuscated secrets (gitignored)
β β ββ constants/
β β ββ di/
β β ββ error/
β β ββ network/
β β ββ presentation/
β β β ββ widgets/
β β β β ββ global_appbar.dart
β β β β ββ global_button.dart
β β β β ββ global_dropdown.dart
β β β β ββ global_image_loader.dart
β β β β ββ global_svg_loader.dart
β β β β ββ global_text.dart
β β β ββ ...
β β ββ utils/
β β ββ preferences_helper.dart # FlutterSecureStorage with cache
β ββ features/
β β ββ homes/
β β ββ data/
β β β ββ datasources/
β β β ββ models/
β β β ββ repositories/
β β ββ domain/
β β β ββ entities/
β β β ββ repositories/
β β β ββ usecases/
β β ββ presentation/
β β ββ pages/
β β ββ providers/
β β β ββ state/
β β ββ widgets/
β ββ l10n/
Selecting Bloc replaces the providers/ folder with a bloc/ directory containing event/, state/, and bloc classes.
ssl_cli generates a complete secret management workflow based on envied and a single .env file:
.env (developer fills once, gitignored)
β
ββ sh .claude/scripts/setup_secrets.sh
β ββββ android/key.properties (Gradle signing + Maps key)
β ββββ ios/Flutter/Secret.xcconfig (Xcode Maps key)
β ββββ android/app/release.jks (decoded from base64)
β ββββ android/app/google-services.json (decoded from base64)
β ββββ ios/Runner/GoogleService-Info.plist (decoded from base64)
β
ββ dart run build_runner build
ββββ lib/core/config/env.g.dart (XOR-obfuscated Dart secrets)
- Single source of truth: All secrets live in
.envβ only.env.exampleis committed. - Obfuscated at compile time:
enviedwithobfuscate: trueXOR-encodes secrets intoenv.g.dart. - Access via
Env.*: All Dart code reads secrets through the generatedEnvclass (e.g.,Env.baseUrlLive,Env.googleMapsApiKey). - Setup script:
.claude/scripts/setup_secrets.shgenerates native config files and decodes base64-encoded binary files (JKS, Firebase configs). - CI/CD ready: GitHub Actions writes
.envfrom secrets, runs the script, then builds.
The generated PrefHelper class uses flutter_secure_storage (replacing shared_preferences) for encrypted key-value storage:
- Data encrypted at rest using iOS Keychain and Android EncryptedSharedPreferences.
- In-memory cache layer ensures synchronous reads while writes persist to secure storage.
- Same public API β drop-in replacement with no migration needed for consuming code.
// Initialize in main()
await PrefHelper.init();
// Usage
PrefHelper.instance.setString('token', 'abc123');
String? token = PrefHelper.instance.getString('token');ssl_cli generates a .claude/ folder structure that provides AI coding assistants (Claude Code, Copilot, etc.) with project-specific context and security guardrails:
| File | Purpose |
|---|---|
CLAUDE.md (root) |
AI entry point β project context, architecture, development pipeline |
.claude/AI_CODING_RULES.md |
Strict coding rules, naming conventions, templates for every layer |
.claude/docs/SECURITY.md |
Hard security limits β files AI must never read or expose |
.claude/scripts/setup_secrets.sh |
Reads .env, generates native configs, decodes base64 files |
.claude/settings.local.json |
Pre-configured Claude Code permissions for ssl_cli, autosafe, Flutter |
The CLAUDE.md defines a 4-stage pipeline for AI-assisted development:
- Client BRD β Extract user stories, screens, API requirements
- Figma Design β Map design tokens to global widgets
- Coding β Follow Clean Architecture strictly with ssl_cli scaffolding
- Testing β Unit test use cases, widget test components (80% coverage target)
π Security: AI agents are instructed to never read, display, or expose
.env,key.properties,*.keystore,google-services.json, or any credential file.
ssl_cli ships with a unified design language to keep your UI consistent:
- Typography: Use
GlobalText; it wrapsScreenUtilto ensure responsive font sizes. - Fields & Inputs: Prefer
GlobalTextFormFieldfor form elements andGlobalDropdownfor selects. - Buttons & App Bars: Use
GlobalButtonandGlobalAppBarcomponents for consistent theming. - Images: Route PNG/JPEG assets through
GlobalImageLoaderand SVGs throughGlobalSvgLoader. - Assets: Register all new assets in the enum within
k_assets.dart, referencing them via the generated enum names (e.g.,ImageNamePng.myIllustration). - Colors: Extend the enum in
k_colors.dartand reference colors through their enum identifiers (e.g.,ColorName.primaryBackground). - Fonts: Avoid directly applying
.spβGlobalTextalready handles responsive scaling.
Asset placement: store raster images under
assets/images/and SVGs underassets/svg/. Re-runssl_cli generate k_assets.dartwhenever the folders change.
- Flavor-aware builds: Configure once, then ship flavor-specific APKs with automatic renaming (
appName_flavor_versionName_versionCode.apk). - Code obfuscation: Combine
ssl_cli build apk --flavorTypewith Flutterβs obfuscation flags in your build config for extra protection. - Telegram delivery: Append
--tto send finished builds straight to your team chat (after configuringconfig.json). - Documentation generation: Point ssl_cli at any folder or file to bootstrap human-friendly docs for handoff or onboarding.
Contributions are welcome! Please check existing issues, open new discussions, or submit a pull request to improve ssl_cli.
This project is licensed under the MIT License β see the LICENSE file for details.
If ssl_cli streamlines your workflow, please give it a β on GitHub and share it with your Flutter community.
See CHANGELOG.md for a history of updates and new features.
See AI_CODING_RULES.md for strict coding rules and patterns enforced during project generation.
See CLAUDE.md for the AI agent entry point β project context, architecture overview, and development pipeline.
Made with β€οΈ by Abu Sayed Chowdhury