{"id":31806790,"url":"https://github.com/eranboudjnah/cleanarchitecturegenerator","last_synced_at":"2025-10-11T03:50:20.509Z","repository":{"id":316212803,"uuid":"1059993070","full_name":"EranBoudjnah/CleanArchitectureGenerator","owner":"EranBoudjnah","description":"A CLI and an Intellij plugin for generating Clean Architecture boilerplate for Android projects.","archived":false,"fork":false,"pushed_at":"2025-10-08T12:55:20.000Z","size":820,"stargazers_count":60,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-08T14:43:10.556Z","etag":null,"topics":["android","android-development","android-studio","android-studio-plugin","androidstudio","androidstudio-plugin","clean-architecture","developer-tools","intellij-plugin","kotlin-android","mobile-development"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EranBoudjnah.png","metadata":{"files":{"readme":".github/README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T08:31:34.000Z","updated_at":"2025-10-08T12:59:14.000Z","dependencies_parsed_at":"2025-10-08T14:31:21.327Z","dependency_job_id":"9a8729e4-f1b7-4c1c-9992-ae51b1ddaa1e","html_url":"https://github.com/EranBoudjnah/CleanArchitectureGenerator","commit_stats":null,"previous_names":["eranboudjnah/cleanarchitecturegenerator"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/EranBoudjnah/CleanArchitectureGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FCleanArchitectureGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FCleanArchitectureGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FCleanArchitectureGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FCleanArchitectureGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EranBoudjnah","download_url":"https://codeload.github.com/EranBoudjnah/CleanArchitectureGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EranBoudjnah%2FCleanArchitectureGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006108,"owners_count":26084026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-development","android-studio","android-studio-plugin","androidstudio","androidstudio-plugin","clean-architecture","developer-tools","intellij-plugin","kotlin-android","mobile-development"],"created_at":"2025-10-11T03:50:19.535Z","updated_at":"2025-10-11T03:50:20.504Z","avatar_url":"https://github.com/EranBoudjnah.png","language":"Kotlin","funding_links":["https://github.com/sponsors/EranBoudjnah"],"categories":[],"sub_categories":[],"readme":"# Clean Architecture Generator ✨\n\nA CLI and Android Studio plugin for generating Clean Architecture boilerplate.\n\n## Table of Contents\n\u003chr /\u003e\n\n- [Key features](#key-features)\n- [Android Studio plugin](#android-studio-plugin)\n    - [Usage](#usage)\n- [CLI](#cli)\n  - [Installation](#installation)\n  - [Usage](#usage-1)\n  - [Common examples](#common-examples)\n  - [Manual page (optional)](#manual-page-optional)\n  - [Configuration (.cagrc)](#configuration-cagrc)\n- [Contributing](#contributing)\n- [Support](#support)\n- [Sponsor](#sponsor)\n- [License](#license)\n\n## Key features\n\n|                                | Android Studio Plugin | CLI |\n|--------------------------------|:---------------------:|:---:|\n| New Clean Architecture project |          ✔️           | ✔️  |\n| Generate Architecture package  |          ✔️           | ✔️  |\n| Generate a new feature         |          ✔️           | ✔️  |\n| Generate a use case            |          ✔️           | ✔️  |\n| Generate a ViewModel           |          ✔️           | ✔️  |\n| Generate a data source         |          ✔️           | ✔️  |\n| Automatic git staging          |          ✔️           | ✔️  |\n| Configurable                   |          ✔️           | ✔️  |\n| Inline inspections             |          ✔️           | ❌️  |\n\n**Android Studio Plugin** is available on the IDE Plugins Marketplace.\n\n**Terminal command** is available via Homebrew.\n\n## Android Studio plugin\n\nAdds multiple time-saving code generation shortcuts to Android Studio.\n\n### Usage\n\n#### New Clean Architecture project\nNavigate to `File` \u003e `New` \u003e `New Project...` and select the **Clean Architecture** template.\n\n#### Plugin shortcuts\nRight-click on relevant directories and expand the `New` menu item.\n\n#### Settings\nSettings are available under `Tools` \u003e `Clean Architecture`.\n\nFor a working project example, visit [Clean Architecture For Android](https://github.com/EranBoudjnah/CleanArchitectureForAndroid).\n\n#### Inspections\nWork out of the box. You can disable any or all inspections via Android Studio's settings.\n\n## CLI\n\nGenerates Clean Architecture Android code from your terminal.\n\n### Installation\n\n- **Install via Homebrew:**\n\n```bash\nbrew tap EranBoudjnah/cag\nbrew install EranBoudjnah/cag/cag\n```\n\n- **Run via installed script:**\n\n```bash\n./gradlew :cli:installDist\n\"./cli/build/install/cag/bin/cag\" --new-feature --name=MyFeature\n\"./cli/build/install/cag/bin/cag\" --new-view-model --name=MyViewModel\n```\n\n- **Run via Gradle (no install):**\n\n```bash\n./gradlew :cli:run --args=\"--new-feature --name=MyFeature\"\n./gradlew :cli:run --args=\"--new-view-model --name=MyViewModel\"\n```\n\n### Usage\n\nUsage (canonical):\n\n```bash\ncag [--new-project --name=ProjectName --package=PackageName [--no-compose] [--ktlint] [--detekt] [--ktor] [--retrofit]]... [--new-architecture [--no-compose] [--ktlint] [--detekt]]... [--new-feature --name=FeatureName [--package=PackageName]]... [--new-datasource --name=DataSourceName [--with=ktor|retrofit|ktor,retrofit]]... [--new-use-case --name=UseCaseName [--path=TargetPath]]... [--new-view-model --name=ViewModelName [--path=TargetPath]]...\n```\n\n- Full reference: `cag --help`\n- Topic help: `cag --help --topic=new-feature` or `cag --help -t new-use-case`\n- Man page: `man cag` (see [Manual page (optional)](#Manual-page-optional) below for generating/installing locally)\n\n### Common examples\n\n```bash\n# Generate a new project\ncag --new-project --name=MyApp --package=com.example.myapp\n\n# Add architecture to an existing project/module\ncag --new-architecture --ktlint --detekt\n\n# Add a new feature\ncag --new-feature --name=Profile --package=com.example.feature.profile\n\n# Add a data source with Retrofit\ncag --new-datasource --name=User --with=retrofit\n\n# Add a use case\ncag --new-use-case --name=FetchUser --path=architecture/domain/src/main/kotlin\n\n# Add a ViewModel\ncag --new-view-model --name=Profile\n```\n\n### Manual page (optional)\n\nIf you prefer to use `man` to read your documentation, this section is for you.\n\n```bash\n# Generate man page (writes cli/build/man/cag.1)\n./gradlew :cli:generateManPage\n\n# Install to a man1 directory (may require sudo for system directories)\n./gradlew :cli:installManPage\n\n# Preview after install\nman cag\n```\n\n### Configuration (.cagrc)\n\nYou can configure library and plugin versions used by the CLI via a simple INI-style config file named `.cagrc`.\n\n- Locations:\n  - Project root: `./.cagrc`\n  - User home: `~/.cagrc`\n\n- Precedence:\n  - Values in the project `.cagrc` override values in `~/.cagrc`.\n\n- Sections:\n  - `[new.versions]` — applied when generating new projects (e.g., `--new-project`).\n  - `[existing.versions]` — applied when generating into an existing project (e.g., new architecture, feature, data source, use case, or view model).\n\n- Keys correspond to version keys used by the generator, for example: `kotlin`, `androidGradlePlugin`, `composeBom`, `composeNavigation`, `retrofit`, `ktor`, `okhttp3`, etc.\n\nExample `~/.cagrc`:\n\n```\n[new.versions]\nkotlin=2.2.10\ncomposeBom=2025.08.01\n\n[existing.versions]\nretrofit=2.11.0\nktor=3.0.3\n```\n\nExample `./.cagrc` (project overrides):\n\n```\n[new.versions]\ncomposeBom=2025.09.01\n\n[existing.versions]\nokhttp3=4.12.0\n```\n\nWith the above, new projects will use `composeBom=2025.09.01` (from project), `kotlin=2.2.10` (from home). For operations on existing projects, `retrofit=2.11.0` (home) and `okhttp3=4.12.0` (project) will be applied.\n\n## Contributing\nContributions to this project are welcome. Learn about [contributing](https://github.com/ArmynC/ArminC-AutoExec/blob/master/.github/CONTRIBUTING.md).\n\n## Support\nReach out to me via my **[profile page](https://github.com/EranBoudjnah)**.\n\n## Sponsor\n[![Donation](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%5E%5E-green?style=flat\u0026logo=undertale\u0026logoColor=red\u0026color=white)](https://github.com/sponsors/EranBoudjnah)\n\n## License\n[![License: MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg)](https://www.tldrlegal.com/license/mit-license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranboudjnah%2Fcleanarchitecturegenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feranboudjnah%2Fcleanarchitecturegenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feranboudjnah%2Fcleanarchitecturegenerator/lists"}