https://github.com/ContextMapper/context-mapper-cli
Context Mapper Command Line Interface (CLI)
https://github.com/ContextMapper/context-mapper-cli
cli context-mapper context-mapping ddd dsl
Last synced: 2 days ago
JSON representation
Context Mapper Command Line Interface (CLI)
- Host: GitHub
- URL: https://github.com/ContextMapper/context-mapper-cli
- Owner: ContextMapper
- License: apache-2.0
- Created: 2020-10-06T11:45:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T16:14:30.000Z (about 1 year ago)
- Last Synced: 2024-08-03T15:06:49.476Z (9 months ago)
- Topics: cli, context-mapper, context-mapping, ddd, dsl
- Language: Java
- Homepage: https://contextmapper.org/
- Size: 109 KB
- Stars: 15
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - ContextMapper/context-mapper-cli - Context Mapper Command Line Interface (CLI) (cli)
README

# Context Mapper CLI
[](https://github.com/ContextMapper/context-mapper-cli/actions) [](https://codecov.io/gh/ContextMapper/context-mapper-cli) [](https://opensource.org/licenses/Apache-2.0) [](https://search.maven.org/search?q=g:%22org.contextmapper%22%20AND%20a:%22context-mapper-cli%22)This repository contains the Context Mapper CLI - a command line interface to validate CML files and call generators
(currently PlantUML, Context Map, and generic text files via Freemarker template).## Download
The CLI can be downloaded under the following links:
* [TAR](https://repo1.maven.org/maven2/org/contextmapper/context-mapper-cli/6.12.0/context-mapper-cli-6.12.0.tar) (Linux, Mac)
* [ZIP](https://repo1.maven.org/maven2/org/contextmapper/context-mapper-cli/6.12.0/context-mapper-cli-6.12.0.zip) (Windows)In case you want to include Context Mapper in your Maven or Gradle build, you can use the CLI to call generators (for example with Maven exec plugin).
**Gradle:**
```gradle
implementation 'org.contextmapper:context-mapper-cli:6.12.0'
```**Maven:**
```xmlorg.contextmapper
context-mapper-cli
6.12.0```
## Validate Command Usage
```shell
$ ./cm validate -h
Context Mapper CLI
usage: cm validate
-h,--help Prints this message.
-i,--input Path to the CML file which you want to validate.
```## Generate Command Usage
```shell
$ ./cm generate -h
Context Mapper CLI
usage: cm generate
-f,--outputFile The name of the file that shall be generated
(only used by Freemarker generator, as we cannot
know the file extension).
-g,--generator The generator you want to call. Use one of the
following values: context-map (Graphical DDD
Context Map), plantuml (PlantUML class-,
component-, and state diagrams.), generic
(Generate generic text with Freemarker template)
-h,--help Prints this message.
-i,--input Path to the CML file for which you want to
generate output.
-o,--outputDir Path to the directory into which you want to
generate.
-t,--template Path to the Freemarker template you want to use.
This parameter is only used if you pass 'generic'
to the 'generator' (-g) parameter.
```## Usage examples
The following examples illustrate the CLI usage.### Validate *.cml File
```shell
./cm validate -i DDD-Sample.cml
```### Generate PlantUML
```shell
./cm generate -i DDD-Sample.cml -g plantuml -o ./output-directory
```### Generate Context Map
```shell
./cm generate -i DDD-Sample.cml -g context-map -o ./output-directory
```### Generate Arbitrary Text File with Freemarker Template
```shell
./cm generate -i DDD-Sample.cml -g generic -o ./output-directory -t template.md.ftl -f glossary.md
```## Development / Build
If you want to contribute to this project you can create a fork and a pull request. The project is built with Gradle, so you can import it as Gradle project within Eclipse or IntelliJ IDEA (or any other IDE supporting Gradle).## Contributing
Contribution is always welcome! Here are some ways how you can contribute:
* Create GitHub issues if you find bugs or just want to give suggestions for improvements.
* This is an open source project: if you want to code, [create pull requests](https://help.github.com/articles/creating-a-pull-request/) from [forks of this repository](https://help.github.com/articles/fork-a-repo/). Please refer to a Github issue if you contribute this way.
* If you want to contribute to our documentation and user guides on our website [https://contextmapper.org/](https://contextmapper.org/), create pull requests from forks of the corresponding page repo [https://github.com/ContextMapper/contextmapper.github.io](https://github.com/ContextMapper/contextmapper.github.io) or create issues [there](https://github.com/ContextMapper/contextmapper.github.io/issues).## Licence
ContextMapper is released under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).