{"id":20181954,"url":"https://github.com/clean-arch-enablers-project/cae-cli","last_synced_at":"2025-04-10T05:11:12.661Z","repository":{"id":229574661,"uuid":"777056986","full_name":"clean-arch-enablers-project/cae-cli","owner":"clean-arch-enablers-project","description":"Repository for the open source CAE CLI tool.","archived":false,"fork":false,"pushed_at":"2025-03-11T00:48:15.000Z","size":69587,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T06:22:45.801Z","etag":null,"topics":["clean-architecture","cli","command-line-interface","framework","java"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clean-arch-enablers-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-03-25T05:28:12.000Z","updated_at":"2025-03-11T00:48:19.000Z","dependencies_parsed_at":"2024-03-25T07:49:43.797Z","dependency_job_id":"ff842c84-f9a2-47d8-b0c9-4b2e1fd804ff","html_url":"https://github.com/clean-arch-enablers-project/cae-cli","commit_stats":null,"previous_names":["clean-arch-enablers-project/cae-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-arch-enablers-project%2Fcae-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-arch-enablers-project%2Fcae-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-arch-enablers-project%2Fcae-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clean-arch-enablers-project%2Fcae-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clean-arch-enablers-project","download_url":"https://codeload.github.com/clean-arch-enablers-project/cae-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161276,"owners_count":21057555,"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","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":["clean-architecture","cli","command-line-interface","framework","java"],"created_at":"2024-11-14T02:37:15.609Z","updated_at":"2025-04-10T05:11:12.652Z","avatar_url":"https://github.com/clean-arch-enablers-project.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ✔️ cae-cli\n☕ Java \u0026 Kotlin edition\n\n\u003cbr\u003e\n\nWelcome to the open source CAE CLI tool repository! The _cae-cli_ is designed to make the experience of applying the _cae-framework_ effortless. With one simple command you can generate the whole structure of a new use case in your Java or Kotlin project, already including its components throughout the application layers (core, adapters and assemblers).\n\n\u003cbr\u003e\n\nState Symbol Key:\n\n- ``✅`` — _Under release state_\n- ``✔️`` — _Under snapshot state_\n- ``⏳`` — _Under full development state_\n\n\u003cbr\u003e\n\n## 🔧 How to install it\n\n### Windows Platform\n\n1. Clone the project.\n2. Run the ``cae-cli-installer.exe`` file.\n3. Add ``%CAE_CLI_HOME%`` to your system's or user's Path environment variable.\n4. To test the installation, open a command prompt and run ``cae ls``.\n\nExpected result:\n\n![image](https://github.com/user-attachments/assets/6013f1cc-78e2-42f3-8de2-5669fa174b06)\n\n### MacOS Platform\n\n1. Clone the project\n2. Authorize file `cae-cli-macos-install.sh` to run with `chmod +x cae-cli-macos-install.sh`\n3. Run the ``cae-cli-macos-installer.sh`` in sudo mode.\n4. Add theses exports on `.zshrc` or `.bash_profile` file: \n```bash\nexport CAE_CLI_HOME=\"$HOME/cae\"\nexport CAE_META_STRUCTURE_TEMPLATES_PATH=\"$HOME/cae/file-templates\"\n```\n5. Restart terminal with `source ~/.zshrc` or `source ~/.bash_profile`\n6. To test the installation, run ``cae ls``\n\nExpected result:\n\n![image](https://github.com/user-attachments/assets/6013f1cc-78e2-42f3-8de2-5669fa174b06)\n\n\u003cbr\u003e\n\n### Linux Platform\n\n1. Clone the project\n2. Authorize file `cae-cli-linux-installer.sh` to run with `chmod +x cae-cli-linux-installer.sh`\n3. Run the ``cae-cli-linux-installer.sh`` in sudo mode (to avoid mistakes)\n4. Add theses exports on `~/.bashrc` or `~/.profile` file:\n```bash\nexport CAE_CLI_HOME=\"$HOME/cae\"\nexport CAE_META_STRUCTURE_TEMPLATES_PATH=\"$HOME/cae/file-templates\"\n```\n5. Restart terminal with `source ~/.bashrc` or `source ~/.profile`\n6. To test the installation, run ``cae ls``\n\nExpected result:\n\n![image](https://github.com/user-attachments/assets/6013f1cc-78e2-42f3-8de2-5669fa174b06)\n\n\u003cbr\u003e\n\n## ▶️ Using it\nTo run any command (except for ``new-project``), you must be in the root directory of a CAE project. A CAE project is defined as a Java or Kotlin project that contains a ``cae-settings.json`` file in its root directory. The format of this file is as follows:\n\n```json\n{\n    \"organization\": \"br.com.stockio\",\n    \"domain\": \"empresas\",\n    \"monolayer\": true,\n    \"caeVersion\": \"0.11.0\",\n    \"useCasePaths\": [\n        {\n            \"layer\": \"core\",\n            \"location\": \"src/main/java/br/com/stockio/empresas/core/use_cases\"\n        },\n        {\n            \"layer\": \"adapters\",\n            \"location\": \"src/main/java/br/com/stockio/empresas/adapters/use_cases\"\n        },\n        {\n            \"layer\": \"assemblers\",\n            \"location\": \"src/main/java/br/com/stockio/empresas/assemblers/use_cases\"\n        }\n    ]\n}\n````\n- ``organization``: your groupId.\n- ``domain``: your artifactId.\n- ``monolayer``: if the project is structured as a single unit or divided into smaller subprojects.\n- ``caeVersion``: cae-framework version being currently used.\n- ``useCasePaths``: paths the CLI will use to find use cases at the core, adapters and assemblers layers.\n\n\u003cbr\u003e\n\n### ``✅`` ``cae new-fuc``\nRun this command for creating a new ``FunctionUseCase`` declaration in your CAE project.\n\nAccepted parameters:\n- **name**: the name of the use case.\n- **kotlin**: whether or not it should be generated in Kotlin.\n\nExpected effect:\n```bash\n├── core/                                                     # Core layer package\n│   ├── use_cases/                                            # Use cases package \n│   │   ├── some_example/                                     # The new use case package [JUST CREATED]\n│   │   │   ├── SomeExampleUseCase.java/kt                    # Abstract class for the primary port of the new use case [JUST CREATED]\n│   │   │   ├── implementations/                              # Package for the implementation of the new use case [JUST CREATED]\n│   │   │   │   └── SomeExampleUseCaseImplementation.java/kt  # Implementation class of the new use case [JUST CREATED]\n│   │   │   ├── io/                                           # Package for the I/O declaration of the use case [JUST CREATED]\n│   │   │   │   ├── inputs/                                   # Package for input classes [JUST CREATED]\n│   │   │   │   │   └── SomeExampleUseCaseInput.java/kt       # Main input class for the new use case [JUST CREATED]\n│   │   │   │   └── output/                                   # Package for output classes [JUST CREATED]\n│   │   │   │       └── SomeExampleUseCaseOutput.java/kt      # Main output class for the new use case [JUST CREATED]\n\n├── adapters/                                                 # Adapters layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   └── some_example/                                     # Package for the new use case adapters (starts empty) [JUST CREATED]\n\n├── assemblers/                                               # Assemblers layer\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # Package for assembling the new use case [JUST CREATED]\n│   │   │   └── MyUseCaseAssembler.java/kt                    # Assembler class (Factory) for the use case [JUST CREATED]\n\n```\n\n\u003cbr\u003e\n\n### ``✅`` ``cae new-cuc``\nRun this command for creating a new ``ConsumerUseCase`` declaration in your CAE project.\n\nAccepted parameters:\n- **name**: the name of the use case.\n- **kotlin**: whether or not it should be generated in Kotlin.\n\nExpected effect:\n```bash\n├── core/                                                     # Core layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # The new use case package [JUST CREATED]\n│   │   │   ├── SomeExampleUseCase.java/kt                    # Abstract class for the primary port of the new use case [JUST CREATED]\n│   │   │   ├── implementations/                              # Package for the implementation of the new use case [JUST CREATED]\n│   │   │   │   └── SomeExampleUseCaseImplementation.java/kt  # Implementation class of the new use case [JUST CREATED]\n│   │   │   ├── io/                                           # Package for the I/O declaration of the use case [JUST CREATED]\n│   │   │   │   ├── inputs/                                   # Package for input classes [JUST CREATED]\n│   │   │   │   │   └── SomeExampleUseCaseInput.java/kt       # Main input class for the new use case [JUST CREATED]\n\n├── adapters/                                                 # Adapters layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   └── some_example/                                     # Package for the new use case adapters (starts empty) [JUST CREATED]\n\n├── assemblers/                                               # Assemblers layer\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # Package for assembling the new use case [JUST CREATED]\n│   │   │   └── MyUseCaseAssembler.java/kt                    # Assembler class (Factory) for the use case [JUST CREATED]\n\n```\n\u003cbr\u003e\n\n### ``✅`` ``cae new-suc``\nRun this command for creating a new ``SupplierUseCase`` declaration in your CAE project.\n\n\nAccepted parameters:\n- **name**: the name of the use case.\n- **kotlin**: whether or not it should be generated in Kotlin.\n\nExpected effect:\n```bash\n├── core/                                                     # Core layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # The new use case package [JUST CREATED]\n│   │   │   ├── SomeExampleUseCase.java/kt                    # Abstract class for the primary port of the new use case [JUST CREATED]\n│   │   │   ├── implementations/                              # Package for the implementation of the new use case [JUST CREATED]\n│   │   │   │   └── SomeExampleUseCaseImplementation.java/kt  # Implementation class of the new use case [JUST CREATED]\n│   │   │   ├── io/                                           # Package for the I/O declaration of the use case [JUST CREATED]\n│   │   │   │   ├── outputs/                                  # Package for output classes [JUST CREATED]\n│   │   │   │   │   └── SomeExampleUseCaseOutput.java/kt      # Main output class for the new use case [JUST CREATED]\n\n├── adapters/                                                 # Adapters layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   └── some_example/                                     # Package for the new use case adapters (starts empty) [JUST CREATED]\n\n├── assemblers/                                               # Assemblers layer\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # Package for assembling the new use case [JUST CREATED]\n│   │   │   └── MyUseCaseAssembler.java/kt                    # Assembler class (Factory) for the use case [JUST CREATED]\n\n```\n\u003cbr\u003e\n\n### ``✅`` ``cae new-ruc``\nRun this command for creating a new ``RunnableUseCase`` declaration in your CAE project.\n\nAccepted parameters:\n- **name**: the name of the use case.\n- **kotlin**: whether or not it should be generated in Kotlin.\n\nExpected effect:\n```bash\n├── core/                                                     # Core layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # The new use case package [JUST CREATED]\n│   │   │   ├── SomeExampleUseCase.java/kt                    # Abstract class for the primary port of the new use case [JUST CREATED]\n│   │   │   ├── implementations/                              # Package for the implementation of the new use case [JUST CREATED]\n│   │   │   │   └── SomeExampleUseCaseImplementation.java/kt  # Implementation class of the new use case [JUST CREATED]\n\n├── adapters/                                                 # Adapters layer package\n│   ├── use_cases/                                            # Use cases package\n│   │   └── some_example/                                     # Package for the new use case adapters (starts empty) [JUST CREATED]\n\n├── assemblers/                                               # Assemblers layer\n│   ├── use_cases/                                            # Use cases package\n│   │   ├── some_example/                                     # Package for assembling the new use case [JUST CREATED]\n│   │   │   └── MyUseCaseAssembler.java/kt                    # Assembler class (Factory) for the use case [JUST CREATED]\n\n```\n\n\u003cbr\u003e\n\n### ``✅`` ``cae new-project``\nRun this command for creating a new CAE project.\n\nAccepted parameters:\n- **artifactId**: the name of the project.\n- **groupId**: name of the organization which owns the project.\n- **caeVersion**: the desired cae-framework version.\n\nExpected effect:\n\n- A monolayer project with 3 main packages: core, adapters and assemblers. Multilayer project generation is suspended via CLI.\n- A ``cae-settings.json`` file created and properly set.\n- The ``pom.xml`` file created and properly set, including the script for the autodocumentation.\n- The ``LoggerBootstrap.java`` file with default settings for the automatic logging mechanism (feel free to change it).\n- The ``LoggerAdapter.java`` file which implements the ``Logger`` interface from the framework and adapts it for the `Slf4j` format (feel free to change it too).\n- The ``${artifactId}Documentation.java`` file which is invoked by the Maven Install phase due to the ``pom.xml`` settings for the autodocumentation process.\n\n\u003cbr\u003e\n\n## 💡 Tutorials\nTutorials will soon be available on the SDK's YouTube channel: [Clean Arch Enablers SDK](https://www.youtube.com/@CleanArchEnablersSDK).\n\n\u003cbr\u003e\n\n## 🌐 Other components of the SDK:\n\n- ``✔️`` [cae-framework](https://github.com/clean-arch-enablers-project/cae-framework)\n- ``✔️`` [cae-utils-mapped-exceptions](https://github.com/clean-arch-enablers-project/cae-utils-mapped-exceptions)\n- ``✔️`` [cae-utils-http-client](https://github.com/clean-arch-enablers-project/cae-utils-http-client)\n- ``✔️`` [cae-common-primary-adapters](https://github.com/clean-arch-enablers-project/cae-common-primary-adapters)\n- ``✔️`` [cae-utils-env-vars](https://github.com/clean-arch-enablers-project/cae-utils-env-vars)\n- ``✔️`` [cae-utils-trier](https://github.com/clean-arch-enablers-project/cae-utils-trier)\n- ``✔️`` [cae-rdb](https://github.com/clean-arch-enablers-project/cae-rdb)\n- ``⏳`` [cae-service-catalog](https://github.com/clean-arch-enablers-project/cae-service-catalog)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  CAE — Clean Architecture made easy.\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclean-arch-enablers-project%2Fcae-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclean-arch-enablers-project%2Fcae-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclean-arch-enablers-project%2Fcae-cli/lists"}