From ce8f9f72860ba54e8a7888ea89796d2ea3393ca8 Mon Sep 17 00:00:00 2001 From: Emily McMullan Date: Tue, 29 Aug 2023 15:03:29 -0400 Subject: [PATCH] update README with MacOS instructions and transform info --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/README.md b/README.md index ac53dbb..dc64d1b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ Kantra is an experimental CLI that unifies analysis and transformation capabilities of Konveyor. ## Installation +### Linux Easiest way to install Kantra is to get it via the container image. To download latest container image, run: @@ -10,6 +11,12 @@ Easiest way to install Kantra is to get it via the container image. To download podman pull quay.io/konveyor/kantra:latest && podman run --name kantra-download quay.io/konveyor/kantra:latest 1> /dev/null 2> /dev/null && podman cp kantra-download:/usr/local/bin/kantra . && podman rm kantra-download ``` +### MacOS + +```sh +podman pull quay.io/konveyor/kantra:latest && podman run --name kantra-download quay.io/konveyor/kantra:latest 1> /dev/null 2> /dev/null && podman cp kantra-download:/usr/local/bin/darwin-kantra kantra && podman rm kantra-download +``` + This will copy the binary into your current working directory. To make it available system-wide, run: ```sh @@ -87,14 +94,79 @@ Global Flags: Transform has two subcommands - `openrewrite` and `rules`. +```sh +Transform application source code or windup XML rules + +Usage: + kantra transform [flags] + kantra transform [command] + +Available Commands: + openrewrite Transform application source code using OpenRewrite recipes + rules Convert XML rules to YAML + +Flags: + -h, --help help for transform + +Global Flags: + --log-level int log level (default 5) + +Use "kantra transform [command] --help" for more information about a command. +``` + #### OpenRewrite `openrewrite` subcommand allows running OpenRewrite recipes on source code. +```sh +Transform application source code using OpenRewrite recipes + +Usage: + kantra transform openrewrite [flags] + +Flags: + -g, --goal string target goal (default "dryRun") + -h, --help help for openrewrite + -i, --input string path to application source code directory + -l, --list-targets list all available OpenRewrite recipes + -t, --target string target openrewrite recipe to use. Run --list-targets to get a list of packaged recipes. + +Global Flags: + --log-level int log level (default 5) +``` + +To run `transform openrewrite` on application source code, run: + +```sh +kantra transform openrewrite --input= --target= +``` + #### Rules `rules` subcommand allows converting Windup XML rules to analyzer-lsp YAML rules. +```sh +Convert XML rules to YAML + +Usage: + kantra transform rules [flags] + +Flags: + -h, --help help for rules + -i, --input stringArray path to XML rule file(s) or directory + -o, --output string path to output directory + +Global Flags: + --log-level int log level (default 5) +``` + +To run `transform rules` on application source code, run: + +```sh +kantra transform rules --input= --output= +``` + + ## Code of Conduct Refer to Konveyor's Code of Conduct [here](https://github.com/konveyor/community/blob/main/CODE_OF_CONDUCT.md).