Skip to content

Commit 8bd44bd

Browse files
authored
Refreshed the README. (#30)
1 parent 334f530 commit 8bd44bd

File tree

1 file changed

+69
-80
lines changed

1 file changed

+69
-80
lines changed
Lines changed: 69 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,63 @@
1-
## Clean Architecture Generator
2-
3-
A CLI and Android Studio plugin for generating Clean Architecture boilerplate including whole projects, features, data sources, use cases, ViewModels, and architecture packages.
4-
5-
### Android Studio plugin
1+
# Clean Architecture Generator ✨
2+
3+
A CLI and Android Studio plugin for generating Clean Architecture boilerplate.
4+
5+
## Table of Contents
6+
<hr />
7+
8+
- [Key features](#key-features)
9+
- [Android Studio plugin](#android-studio-plugin)
10+
- [Usage](#usage)
11+
- [CLI](#cli)
12+
- [Installation](#installation)
13+
- [Usage](#usage-1)
14+
- [Common examples](#common-examples)
15+
- [Manual page (optional)](#manual-page-optional)
16+
- [Configuration (.cagrc)](#configuration-cagrc)
17+
- [Contributing](#contributing)
18+
- [Support](#support)
19+
- [Sponsor](#sponsor)
20+
- [License](#license)
21+
22+
## Key features
23+
24+
| | Android Studio Plugin | CLI |
25+
|--------------------------------|:---------------------:|:---:|
26+
| New Clean Architecture project | ✔️ | ✔️ |
27+
| Generate Architecture package | ✔️ | ✔️ |
28+
| Generate a new feature | ✔️ | ✔️ |
29+
| Generate a use case | ✔️ | ✔️ |
30+
| Generate a ViewModel | ✔️ | ✔️ |
31+
| Generate a data source | ✔️ | ✔️ |
32+
| Automatic git staging | ✔️ | ✔️ |
33+
| Configurable | ✔️ | ✔️ |
34+
35+
**Android Studio Plugin** is available on the IDE Plugins Marketplace.
36+
37+
**Terminal command** is available via Homebrew.
38+
39+
## Android Studio plugin
640

741
Adds multiple time-saving code generation shortcuts to Android Studio.
842

9-
For a working project example, visit [Clean Architecture For Android](https://github.com/EranBoudjnah/CleanArchitectureForAndroid).
43+
### Usage
1044

11-
Key features:
45+
#### New Clean Architecture project
46+
Navigate to `File` > `New` > `New Project...` and select the **Clean Architecture** template.
1247

13-
- **Android Studio Plugin**
14-
- Available on the IDE Plugins Marketplace
15-
- New Clean Architecture project template
16-
- New menu items:
17-
- New architecture package
18-
- New feature
19-
- New use case in domain modules
20-
- New ViewModel in presentation modules
21-
- New data source
48+
#### Plugin shortcuts
49+
Right-click on relevant directories and expand the `New` menu item.
2250

51+
#### Settings
52+
Settings are available under `Tools` > `Clean Architecture`.
2353

24-
- **Terminal command**
25-
- Available via Homebrew
26-
- Generate:
27-
- New Clean Architecture project
28-
- New architecture package
29-
- New feature
30-
- New use case in domain modules
31-
- New ViewModel in presentation modules
32-
- New data source
54+
For a working project example, visit [Clean Architecture For Android](https://github.com/EranBoudjnah/CleanArchitectureForAndroid).
3355

34-
### CLI usage
56+
## CLI
3557

36-
Helps generate Android Clean Architecture code from the terminal.
58+
Generates Clean Architecture Android code from your terminal.
59+
60+
### Installation
3761

3862
- **Install via Homebrew:**
3963

@@ -42,13 +66,6 @@ brew tap EranBoudjnah/cag
4266
brew install EranBoudjnah/cag/cag
4367
```
4468

45-
- **Run via Gradle (no install):**
46-
47-
```bash
48-
./gradlew :cli:run --args="--new-feature --name=MyFeature"
49-
./gradlew :cli:run --args="--new-view-model --name=MyViewModel"
50-
```
51-
5269
- **Run via installed script:**
5370

5471
```bash
@@ -57,15 +74,14 @@ brew install EranBoudjnah/cag/cag
5774
"./cli/build/install/cag/bin/cag" --new-view-model --name=MyViewModel
5875
```
5976

60-
- **Run the fat jar:**
77+
- **Run via Gradle (no install):**
6178

6279
```bash
63-
./gradlew :cli:shadowJar
64-
java -jar "cli/build/libs/cag-[version]-all.jar" --new-feature --name=MyFeature
65-
java -jar "cli/build/libs/cag-[version]-all.jar" --new-view-model --name=MyViewModel
80+
./gradlew :cli:run --args="--new-feature --name=MyFeature"
81+
./gradlew :cli:run --args="--new-view-model --name=MyViewModel"
6682
```
6783

68-
#### Usage and help
84+
### Usage
6985

7086
Usage (canonical):
7187

@@ -75,9 +91,9 @@ cag [--new-project --name=ProjectName --package=PackageName [--no-compose] [--kt
7591
7692
- Full reference: `cag --help`
7793
- Topic help: `cag --help --topic=new-feature` or `cag --help -t new-use-case`
78-
- Man page: `man cag` (see below for generating/installing locally)
94+
- Man page: `man cag` (see [Manual page (optional)](#Manual-page-optional) below for generating/installing locally)
7995
80-
Common examples:
96+
### Common examples
8197
8298
```bash
8399
# Generate a new project
@@ -99,7 +115,9 @@ cag --new-use-case --name=FetchUser --path=architecture/domain/src/main/kotlin
99115
cag --new-view-model --name=Profile
100116
```
101117
102-
Manual page (optional):
118+
### Manual page (optional)
119+
120+
If you prefer to use `man` to read your documentation, this section is for you.
103121
104122
```bash
105123
# Generate man page (writes cli/build/man/cag.1)
@@ -112,7 +130,7 @@ Manual page (optional):
112130
man cag
113131
```
114132
115-
### CLI configuration (.cagrc)
133+
### Configuration (.cagrc)
116134
117135
You can configure library and plugin versions used by the CLI via a simple INI-style config file named `.cagrc`.
118136
@@ -153,43 +171,14 @@ okhttp3=4.12.0
153171
154172
With 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.
155173
156-
### CLI configuration (.cagrc)
157-
158-
You can configure library and plugin versions used by the CLI via a simple INI-style config file named `.cagrc`.
159-
160-
- Locations:
161-
- Project root: `./.cagrc`
162-
- User home: `~/.cagrc`
163-
164-
- Precedence:
165-
- Values in the project `.cagrc` override values in `~/.cagrc`.
166-
167-
- Sections:
168-
- `[new.versions]` — applied when generating new projects (e.g., `--new-project`).
169-
- `[existing.versions]` — applied when generating into an existing project (e.g., new architecture, feature, data source, use case, or view model).
170-
171-
- Keys correspond to version keys used by the generator, for example: `kotlin`, `androidGradlePlugin`, `composeBom`, `composeNavigation`, `retrofit`, `ktor`, `okhttp3`, etc.
172-
173-
Example `~/.cagrc`:
174-
175-
```
176-
[new.versions]
177-
kotlin=2.2.10
178-
composeBom=2025.08.01
179-
180-
[existing.versions]
181-
retrofit=2.11.0
182-
ktor=3.0.3
183-
```
174+
## Contributing
175+
Contributions to this project are welcome. Learn about [contributing](https://github.com/ArmynC/ArminC-AutoExec/blob/master/.github/CONTRIBUTING.md).
184176
185-
Example `./.cagrc` (project overrides):
177+
## Support
178+
Reach out to me via my **[profile page](https://github.com/EranBoudjnah)**.
186179
187-
```
188-
[new.versions]
189-
composeBom=2025.09.01
190-
191-
[existing.versions]
192-
okhttp3=4.12.0
193-
```
180+
## Sponsor
181+
[![Donation](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-%5E%5E-green?style=flat&logo=undertale&logoColor=red&color=white)](https://github.com/sponsors/EranBoudjnah)
194182
195-
With 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.
183+
## License
184+
[![License: MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg)](https://www.tldrlegal.com/license/mit-license)

0 commit comments

Comments
 (0)