diff --git a/modelina-cli/README.md b/modelina-cli/README.md
index 2eedb79982..384742a4c2 100644
--- a/modelina-cli/README.md
+++ b/modelina-cli/README.md
@@ -16,9 +16,28 @@
> NOTICE: If you are only working exclusively with AsyncAPI documents, using the [AsyncAPI CLI is the preferred way to interact with Modelina](https://github.com/asyncapi/cli#installation) as it has the exact same features.
-Here are all the ways you can install and run the Modelina CLI. For a full list of commands, [checkout the usage documentation](./docs/usage.md).
+# Table of contents
+
+
+* [Table of contents](#table-of-contents)
+* [Installation](#installation)
+* [Download latest release](#download-latest-release)
+* [Install it](#install-it)
+* [Download latest release](#download-latest-release-1)
+* [Install it](#install-it-1)
+* [Download](#download)
+* [Install](#install)
+* [Download](#download-1)
+* [Install](#install-1)
+* [Usage](#usage)
+* [Commands](#commands)
+
+
+# Installation
+Here are all the ways you can install and run the Modelina CLI.
+
+## MacOS
-
MacOS
@@ -60,7 +79,8 @@ sudo installer -pkg modelina.pkg -target /
-Windows
+## Windows
+
@@ -89,7 +109,7 @@ Manually download and run the executable [`modelina.x86.exe`](https://github.com
-Linux
+## Linux
@@ -121,7 +141,7 @@ Remember to symlink the binaries `ln -s /bin/modelina /user/local
-Other ways
+## Others
@@ -135,3 +155,258 @@ npm install -g @asyncapi/modelina-cli
+
+# Usage
+
+```sh-session
+$ npm install -g @asyncapi/modelina-cli
+$ modelina COMMAND
+running command...
+$ modelina (--version)
+@asyncapi/modelina-cli/4.0.0-next.27 darwin-x64 node-v18.19.0
+$ modelina --help [COMMAND]
+USAGE
+ $ modelina COMMAND
+...
+```
+
+
+# Commands
+
+
+* [`modelina config`](#modelina-config)
+* [`modelina config context`](#modelina-config-context)
+* [`modelina config context add CONTEXT-NAME SPEC-FILE-PATH`](#modelina-config-context-add-context-name-spec-file-path)
+* [`modelina config context current`](#modelina-config-context-current)
+* [`modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`](#modelina-config-context-edit-context-name-new-spec-file-path)
+* [`modelina config context init [CONTEXT-FILE-PATH]`](#modelina-config-context-init-context-file-path)
+* [`modelina config context list`](#modelina-config-context-list)
+* [`modelina config context remove CONTEXT-NAME`](#modelina-config-context-remove-context-name)
+* [`modelina config context use CONTEXT-NAME`](#modelina-config-context-use-context-name)
+* [`modelina generate LANGUAGE FILE`](#modelina-generate-language-file)
+
+## `modelina config`
+
+CLI config settings
+
+```
+USAGE
+ $ modelina config
+
+DESCRIPTION
+ CLI config settings
+```
+
+_See code: [src/commands/config/index.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/index.ts)_
+
+## `modelina config context`
+
+Manage short aliases for full paths to inputs
+
+```
+USAGE
+ $ modelina config context
+
+DESCRIPTION
+ Manage short aliases for full paths to inputs
+```
+
+_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/index.ts)_
+
+## `modelina config context add CONTEXT-NAME SPEC-FILE-PATH`
+
+Add a context to the store
+
+```
+USAGE
+ $ modelina config context add CONTEXT-NAME SPEC-FILE-PATH [-h] [-s]
+
+ARGUMENTS
+ CONTEXT-NAME context name
+ SPEC-FILE-PATH file path of the input document
+
+FLAGS
+ -h, --help Show CLI help.
+ -s, --set-current Set context being added as the current context
+
+DESCRIPTION
+ Add a context to the store
+```
+
+_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/add.ts)_
+
+## `modelina config context current`
+
+Shows the current context that is being used
+
+```
+USAGE
+ $ modelina config context current [-h]
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ Shows the current context that is being used
+```
+
+_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/current.ts)_
+
+## `modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`
+
+Edit a context in the store
+
+```
+USAGE
+ $ modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH [-h]
+
+ARGUMENTS
+ CONTEXT-NAME context name
+ NEW-SPEC-FILE-PATH new file path of the input
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ Edit a context in the store
+```
+
+_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/edit.ts)_
+
+## `modelina config context init [CONTEXT-FILE-PATH]`
+
+Initialize context
+
+```
+USAGE
+ $ modelina config context init [CONTEXT-FILE-PATH] [-h]
+
+ARGUMENTS
+ CONTEXT-FILE-PATH Specify directory in which context file should be created:
+ - current directory : modelina config context init . (default)
+ - root of current repository : modelina config context init ./
+ - user's home directory : modelina config context init ~
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ Initialize context
+```
+
+_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/init.ts)_
+
+## `modelina config context list`
+
+List all the stored contexts in the store
+
+```
+USAGE
+ $ modelina config context list [-h]
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ List all the stored contexts in the store
+```
+
+_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/list.ts)_
+
+## `modelina config context remove CONTEXT-NAME`
+
+Delete a context from the store
+
+```
+USAGE
+ $ modelina config context remove CONTEXT-NAME [-h]
+
+ARGUMENTS
+ CONTEXT-NAME Name of the context to delete
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ Delete a context from the store
+```
+
+_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/remove.ts)_
+
+## `modelina config context use CONTEXT-NAME`
+
+Set a context as current
+
+```
+USAGE
+ $ modelina config context use CONTEXT-NAME [-h]
+
+ARGUMENTS
+ CONTEXT-NAME name of the saved context
+
+FLAGS
+ -h, --help Show CLI help.
+
+DESCRIPTION
+ Set a context as current
+```
+
+_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/config/context/use.ts)_
+
+## `modelina generate LANGUAGE FILE`
+
+Generates typed models
+
+```
+USAGE
+ $ modelina generate LANGUAGE FILE [-h] [-o ] [--tsModelType class|interface] [--tsEnumType
+ enum|union] [--tsModuleSystem ESM|CJS] [--tsIncludeComments] [--tsExportType default|named] [--tsJsonBinPack]
+ [--tsMarshalling] [--tsExampleInstance] [--packageName ] [--javaIncludeComments] [--javaJackson]
+ [--javaConstraints] [--namespace ] [--csharpAutoImplement] [--csharpNewtonsoft] [--csharpArrayType
+ Array|List] [--csharpHashcode] [--csharpEqual] [--csharpSystemJson]
+
+ARGUMENTS
+ LANGUAGE (typescript|csharp|golang|java|javascript|dart|python|rust|kotlin|php|cplusplus|scala) The language you want
+ the typed models generated for.
+ FILE Path or URL to the AsyncAPI document, or context-name
+
+FLAGS
+ -h, --help Show CLI help.
+ -o, --output= The output directory where the models should be written to. Omitting this flag will
+ write the models to `stdout`.
+ --csharpArrayType= [default: Array] C# specific, define which type of array needs to be generated.
+
+ --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.
+ --csharpEqual C# specific, generate the models with the Equal method overwritten
+ --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten
+ --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support
+ --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support
+ --javaConstraints Java specific, generate the models with constraints
+ --javaIncludeComments Java specific, if enabled add comments while generating models.
+ --javaJackson Java specific, generate the models with Jackson serialization support
+ --namespace= C#, C++ and PHP specific, define the namespace to use for the generated models. This
+ is required when language is `csharp`,`c++` or `php`.
+ --packageName= Go, Java and Kotlin specific, define the package to use for the generated models. This
+ is required when language is `go`, `java` or `kotlin`.
+ --tsEnumType= [default: enum] TypeScript specific, define which type of enums needs to be generated.
+
+ --tsExampleInstance Typescript specific, generate example of the model.
+ --tsExportType= [default: default] TypeScript specific, define which type of export needs to be
+ generated.
+
+ --tsIncludeComments TypeScript specific, if enabled add comments while generating models.
+ --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with
+ jsonbinpack.
+ --tsMarshalling TypeScript specific, generate the models with marshalling functions.
+ --tsModelType= [default: class] TypeScript specific, define which type of model needs to be
+ generated.
+
+ --tsModuleSystem= [default: ESM] TypeScript specific, define the module system to be used.
+
+
+DESCRIPTION
+ Generates typed models
+```
+
+_See code: [src/commands/generate.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.27/modelina-cli/src/commands/generate.ts)_
+
diff --git a/modelina-cli/docs/usage.md b/modelina-cli/docs/usage.md
deleted file mode 100644
index 46fab65458..0000000000
--- a/modelina-cli/docs/usage.md
+++ /dev/null
@@ -1,260 +0,0 @@
-The Modelina CLI makes it easier to generate AsyncAPI Models.
-
-# Table of contents
-
-* [Table of contents](#table-of-contents)
-* [Usage](#usage)
-* [Commands](#commands)
-
-# Usage
-
-```sh-session
-$ npm install -g @asyncapi/modelina-cli
-$ modelina COMMAND
-running command...
-$ modelina (--version)
-@asyncapi/modelina-cli/4.0.0-next.26 linux-x64 node-v18.20.1
-$ modelina --help [COMMAND]
-USAGE
- $ modelina COMMAND
-...
-```
-
-# Commands
-
-* [`modelina config`](#modelina-config)
-* [`modelina config context`](#modelina-config-context)
-* [`modelina config context add CONTEXT-NAME SPEC-FILE-PATH`](#modelina-config-context-add-context-name-spec-file-path)
-* [`modelina config context current`](#modelina-config-context-current)
-* [`modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`](#modelina-config-context-edit-context-name-new-spec-file-path)
-* [`modelina config context init [CONTEXT-FILE-PATH]`](#modelina-config-context-init-context-file-path)
-* [`modelina config context list`](#modelina-config-context-list)
-* [`modelina config context remove CONTEXT-NAME`](#modelina-config-context-remove-context-name)
-* [`modelina config context use CONTEXT-NAME`](#modelina-config-context-use-context-name)
-* [`modelina generate LANGUAGE FILE`](#modelina-generate-language-file)
-
-## `modelina config`
-
-CLI config settings
-
-```
-USAGE
- $ modelina config
-
-DESCRIPTION
- CLI config settings
-```
-
-_See code: [src/commands/config/index.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/index.ts)_
-
-## `modelina config context`
-
-Manage short aliases for full paths to inputs
-
-```
-USAGE
- $ modelina config context
-
-DESCRIPTION
- Manage short aliases for full paths to inputs
-```
-
-_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/index.ts)_
-
-## `modelina config context add CONTEXT-NAME SPEC-FILE-PATH`
-
-Add a context to the store
-
-```
-USAGE
- $ modelina config context add CONTEXT-NAME SPEC-FILE-PATH [-h] [-s]
-
-ARGUMENTS
- CONTEXT-NAME context name
- SPEC-FILE-PATH file path of the spec file
-
-FLAGS
- -h, --help Show CLI help.
- -s, --set-current Set context being added as the current context
-
-DESCRIPTION
- Add a context to the store
-```
-
-_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/add.ts)_
-
-## `modelina config context current`
-
-Shows the current context that is being used
-
-```
-USAGE
- $ modelina config context current [-h]
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- Shows the current context that is being used
-```
-
-_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/current.ts)_
-
-## `modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH`
-
-Edit a context in the store
-
-```
-USAGE
- $ modelina config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH [-h]
-
-ARGUMENTS
- CONTEXT-NAME context name
- NEW-SPEC-FILE-PATH file path of the spec file
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- Edit a context in the store
-```
-
-_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/edit.ts)_
-
-## `modelina config context init [CONTEXT-FILE-PATH]`
-
-Initialize context
-
-```
-USAGE
- $ modelina config context init [CONTEXT-FILE-PATH] [-h]
-
-ARGUMENTS
- CONTEXT-FILE-PATH Specify directory in which context file should be created:
- - current directory : modelina config context init . (default)
- - root of current repository : modelina config context init ./
- - user's home directory : modelina config context init ~
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- Initialize context
-```
-
-_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/init.ts)_
-
-## `modelina config context list`
-
-List all the stored contexts in the store
-
-```
-USAGE
- $ modelina config context list [-h]
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- List all the stored contexts in the store
-```
-
-_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/list.ts)_
-
-## `modelina config context remove CONTEXT-NAME`
-
-Delete a context from the store
-
-```
-USAGE
- $ modelina config context remove CONTEXT-NAME [-h]
-
-ARGUMENTS
- CONTEXT-NAME Name of the context to delete
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- Delete a context from the store
-```
-
-_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/remove.ts)_
-
-## `modelina config context use CONTEXT-NAME`
-
-Set a context as current
-
-```
-USAGE
- $ modelina config context use CONTEXT-NAME [-h]
-
-ARGUMENTS
- CONTEXT-NAME name of the saved context
-
-FLAGS
- -h, --help Show CLI help.
-
-DESCRIPTION
- Set a context as current
-```
-
-_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/config/context/use.ts)_
-
-## `modelina generate LANGUAGE FILE`
-
-Generates typed models
-
-```
-USAGE
- $ modelina generate LANGUAGE FILE [-h] [-o ] [--tsModelType class|interface] [--tsEnumType
- enum|union] [--tsModuleSystem ESM|CJS] [--tsIncludeComments] [--tsExportType default|named] [--tsJsonBinPack]
- [--tsMarshalling] [--tsExampleInstance] [--packageName ] [--javaIncludeComments] [--javaJackson]
- [--javaConstraints] [--namespace ] [--csharpAutoImplement] [--csharpNewtonsoft] [--csharpArrayType
- Array|List] [--csharpHashcode] [--csharpEqual] [--csharpSystemJson]
-
-ARGUMENTS
- LANGUAGE (typescript|csharp|golang|java|javascript|dart|python|rust|kotlin|php|cplusplus|scala) The language you want
- the typed models generated for.
- FILE Path or URL to the AsyncAPI document, or context-name
-
-FLAGS
- -h, --help Show CLI help.
- -o, --output= The output directory where the models should be written to. Omitting this flag will
- write the models to `stdout`.
- --csharpArrayType= [default: Array] C# specific, define which type of array needs to be generated.
-
- --csharpAutoImplement C# specific, define whether to generate auto-implemented properties or not.
- --csharpEqual C# specific, generate the models with the Equal method overwritten
- --csharpHashcode C# specific, generate the models with the GetHashCode method overwritten
- --csharpNewtonsoft C# specific, generate the models with newtonsoft serialization support
- --csharpSystemJson C# specific, generate the models with System.Text.Json serialization support
- --javaConstraints Java specific, generate the models with constraints
- --javaIncludeComments Java specific, if enabled add comments while generating models.
- --javaJackson Java specific, generate the models with Jackson serialization support
- --namespace= C#, C++ and PHP specific, define the namespace to use for the generated models. This
- is required when language is `csharp`,`c++` or `php`.
- --packageName= Go, Java and Kotlin specific, define the package to use for the generated models. This
- is required when language is `go`, `java` or `kotlin`.
- --tsEnumType= [default: enum] TypeScript specific, define which type of enums needs to be generated.
-
- --tsExampleInstance Typescript specific, generate example of the model.
- --tsExportType= [default: default] TypeScript specific, define which type of export needs to be
- generated.
-
- --tsIncludeComments TypeScript specific, if enabled add comments while generating models.
- --tsJsonBinPack TypeScript specific, define basic support for serializing to and from binary with
- jsonbinpack.
- --tsMarshalling TypeScript specific, generate the models with marshalling functions.
- --tsModelType= [default: class] TypeScript specific, define which type of model needs to be
- generated.
-
- --tsModuleSystem= [default: ESM] TypeScript specific, define the module system to be used.
-
-
-DESCRIPTION
- Generates typed models
-```
-
-_See code: [src/commands/generate.ts](https://github.com/asyncapi/modelina/blob/v4.0.0-next.26/src/commands/generate.ts)_
-
diff --git a/modelina-cli/package-lock.json b/modelina-cli/package-lock.json
index 921c7925e7..cd5b06a691 100644
--- a/modelina-cli/package-lock.json
+++ b/modelina-cli/package-lock.json
@@ -47,7 +47,7 @@
},
"..": {
"name": "@asyncapi/modelina",
- "version": "4.0.0-next.23",
+ "version": "4.0.0-next.27",
"license": "Apache-2.0",
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^11.1.0",
diff --git a/modelina-cli/package.json b/modelina-cli/package.json
index ef6d5ba06c..17b57d3350 100644
--- a/modelina-cli/package.json
+++ b/modelina-cli/package.json
@@ -82,8 +82,8 @@
"scripts": {
"build": "rimraf lib && tsc && oclif manifest && echo \"Build Completed\"",
"dev": "tsc --watch",
- "generate:readme:commands": "oclif readme --readme-path=\"./docs/usage.md\" --output-dir=\"./docs\"",
- "generate:assets": "npm run generate:readme:toc && npm run generate:commands",
+ "generate:readme:commands": "oclif readme --readme-path=\"./README.md\" --output-dir=\"./\" --repository-prefix=\"<%- repo %>/blob/v<%- version %>/modelina-cli/<%- commandPath %>\"",
+ "generate:assets": "npm run generate:commands && npm run generate:readme:toc",
"generate:commands": "npm run generate:readme:commands",
"generate:readme:toc": "markdown-toc -i README.md",
"lint": "eslint --max-warnings 0 --config .eslintrc .",