Teiid Designer - Komodo CLI Concept
An important goal of the Designer Komodo project is the development of an api through which all designer activities can be performed. Therefore, It is anticipated that the first phase of Komodo development will be completely independent of client application / UI. The development approach should ensure that a user can perform all activities from a command line interface if they so choose.
A CLI prototype is under development and is presented below. Hopefully this will facilitate discussion and generate feedback to drive future development.
CLI goals
- Easy to understand
- Built in help and command completion
- Extensible - allow users to develop and contribute their own commands
- Able to run interactively or from a file of commands
- Able to record interactive session commands to a file, for later use.
- Easily unit testable
Summary
Below is an example of interactive session. The prototype just implements a few commands ('help', 'status', 'list', 'cd', 'exit')
1) Start the interactive session, show status
- The session starts at the 'root' of the repository or workspace
- The repository and server defaults could be specified in startup properties file, and also settable within the session.
- The current context 'root' is the current location within the repository or workspace
2) List the child nodes at the current context.
- There are two projects available in the workspace.
3) cd into Project2.
- You are now in Project2 and the prompt changes to show the context.
4) List the child nodes at the current context.
- There is one source model and one view model in the project.
5) cd into ViewModel1 and show status
- The prompt changes to current context. Notice the status shows the full path of the context.
6) list the children in ViewModel1
- There are currently no children in ViewModel1. At this context you could start creating children if desired.
7) move back up to the project
- at this point you could create children applicable to the project context....
8) exit
=======================================
The following is a sample of the current Komodo Shell CLI output
=====================================================================================================================
Starting Komodo Engine... Started
Starting Local Repository initialisation ........... Started
**********************************************************************
Welcome to Komodo Shell
**********************************************************************
[tko:komodo] > help
Komodo Shell supports the following commands at this workspace context:
cd create delete import
list navigate property record
status useTeiid
To get help for a specific command, try "help <cmdName>".
To execute a specific command, try "<commandName> <args>".
[tko:komodo] >
=====================================================================================================================
cd > navigate up/down repository structure
Description: The "cd" command navigates the workspace.
Usage: cd .. | cd myVdb
Comments