The okit-cli provides the user with the ability to interact with the OKIT functionality from the command line. At present this is limitted to converting the initial OKIT json files to the ".okit" format and from these ".okit" files generating ".svg" files.
Before using the okit-cli you will need to install nodejs and once installed we will need to install the required packages.
cd oci-designer-toolkit/node/okit-cli
npm install
This okit-cli provides a simple syntax, in the following format, that specifies command, action and files to act upon.
node src/okit-cli.js <COMMAND> <ACTION> <INPUT FILE> <OUTPUT FILE>
Converting the okit ".json" files to the ".okit" format can be achieved using the following simple command
cd oci-designer-toolkit/node/okit-cli
node src/okit-cli.js import okit-json test/okit-node-test.json test/okit-node-test.okit
### Generate SVG To generate an SVG image from an OKIT model we will need a ".okit" input file and hence if you only have the ".json" it will need to be converted. Once converted the ".svg" can be created with the following simple command.
cd oci-designer-toolkit/node/okit-cli
node src/okit-cli.js generate svg test/okit-node-test.okit test/okit-node-test.svg