A Node.js command line interface (CLI) to interact with the realMethods Application Generation Platform.
This CLI helps you manage models and technology stacks to generate, commit, and archive fully functional applications.
Use realMethods to bootstrap DevOps by generating all the core code and services an applications needs.
Model support includes:
Current technology stacks support includes:
npm install realmethods_cli
Validate the install by typing realmethods_cli. A list of command options should appear.
realmethods_cli init <token>
where token is your unique token assigned when you signed up for an account at http://www.realmethods.com
If you do not have a token, you will be prompted to provide one.
Gets information about the signed in user.
To display the current user information:
model_list [options] [scope] [filter]
List available models.
scope: public, private, community. Providing no value returns all. filter: emf, sqlscript, uml, xmi, pojo, json Providing no value returns all.
To display all public models using pretty print:
realmethods_cli model_list public --output pretty
To display all your public and private models as json [default]:
To display all community sql script models as json:
realmethods_cli model_list community -f sqlscript
Validate a model for usage later on.
To validate a UML XMI file:
realmethods_cli model_validate ./models/myuml.xmi
model_publish <yaml_file> [scope]
Publish a model file or use a YAML with appropriate directives. Scope: public or private[default].
To publish a model as private:
realmethods_cli model_publish ./save-my-model.ecore
To publish a model as public:
realmethods_cli model_publish ./save-my-model.ecore public
model_download <app_id> <output_file_path>
Download a model file. Only owned or public models can be downloaded.
To download a model:
realmethods_cli model_download 2 ./tmp/archive/mymodel.xmi'
Any private model you own can be promoted to public. Making it public allows it to be accessed by others.
Promote an owned model from private scope to public. Promotion cannot be undone. Confirmation is required
To promote a model from being private to public, referenced by id=1000:
realmethods_cli model_promote 1000
Delete a model. Can only delete an owned private model. Deletion cannot be undone.
To delete a model referenced by id=12, prompted to confirm:
realmethods_cli model_delete 12
stack_list [options] [scope] [filter]
List available tech stacks. Scope: public, private, community Filter: serverless, webapp, restfulapi, mobile
Default returns all of your technology stack packages.
To display all your public tech stacks using pretty print:
realmethods_cli stack_list private --output pretty
To display all your serverless type technology stack packages as json
realmethods_cli stack_list -f serverless
Available technology stack package application options, modifiable to allow customization of a generated application. Download as JSON and provide as JSON during application generation.
To download the application options for the associated technology stack package, piped into a file as JSON with output turn to quiet:
realmethods_cli stack_options --quiet true 1 > app.options.json
Validates the structure and contents of a technology stack package (ZIP file). Download an existing technology stack package to view its contents to understand what is required.
To validate a technology stack package:
realmethods_cli stack_validate './samples/techstacks/AWS_Lambda_RDS_Modified.zip'
stack_publish <yaml_file> [scope]
Publish a technology stack package to make it available to others (public) and during application generation.
Publish using YAML directives. Scope: public or private [default].
A published technology stack package is first validated and if found to be valid it is published, otherwise it is rejected.
To publish a technology stack package as public:
realmethods_cli stack_publish ./yamls/save-my-techstack.yml public'
stack_download <app_id> <output_file_path>
Download a technology stack package as a ZIP file. Only owned or public stacks can be downloaded.
If interested in creating and publishing a technology stack, it is best to first try to locate and download an existing technology stack that closest meets your requirements.
To download a technology stack package referenced by id=15:
realmethods_cli stack_download 15 ./tmp/archive/mystack.zip'
Delete a technology stack package. Can only delete an owned private technology stack package. Confirmation is required.
To delete a technology stack package referenced by id=256:
realmethods_cli stack_delete 256
Promote an owned technology stack package from private scope to public. Making it public gives it community access.
Promotion cannot be undone. Confirmation is required.
To promote a technology stack package referenced by id=24:
realmethods_cli stack_promote 24
Generates an application using the directives of a YAML file.
This YAML file allows the description of an application generation directive including a model identifier, technology stack identifier, Git options and more.
A model identifier can be either a model YAML file or an ID of an already published model file.
To generate an application using the directives of a YAML file:
realmethods_cli app_generate ./sample.yamls/generate.apps.yml
app_download <app_id> <output_file_path>
Download a previously generated archived application ZIP file. Only owned or public applications can be downloaded.
To download an application archive file with identifier of 55 to a local file:
realmethod_cli app_download 55 ./myapplication.zip
Delete a previously generated app. Can only delete an owned private application. Confirmation is required.
To delete an application with id of 256:
realmethods_cli app_delete 256
Promote an owned application from private scope to public. Promotion cannot be undone. Confirmation is required.
To promote the application referenced by id=78:
realmethods_cli app_promote 78
app_list [options] [scope]
List previously generated applications that have been archive. Scope: public, private, community. Empty returns all.
To display all community archived applications using pretty print:
realmethods_cli app_list public --output pretty
To display all your publicly archived applications as json [default]:
realmethods_cli list_app public'
To display all your archived applications using pretty print:
realmethods_cli list_app -o pretty
To display all community archived applications using pretty print:
realmethods_cli list_app community -o pretty
Output the version number
Set <arg> to true or [false] to minimize output to only results with no status messages. Use this to pipe JSON output to a file.
Output usage information for the total system or for each command as follows:
realmethods_cli model_list -h
to display the help for the model_list command
As outlined above, certain commands require a YAML file. The following details the structure of each YAML file.
This YAML file contains one or more groupings of parameters to control committing an application's files (code, Maven files, Dockerfile, etc..) to GitHub. This file is referenced by an application generation YAML file.
gitParams: - name: bitbucket_test username: xxxxxxxxx password: xxxxxxxxx repository: bb-demo # public repository tag: latest host: bitbucket.org - name: git-hub-test username: xxxxxxxxx password: xxxxxxxxx repository: github-demo # public repository tag: latest host: github.com ``` View an example within the installed package in sub-directory _./samples/github/_ ### Application Generation Configuration Parameters This YAML file contains the directives required to generate an application using a specified model, technology stack, application options, and GitHub entry of an entry found in a specified YAML file. Example Contents:
- techStackId: 3
entry: app-1-params file: ./samples/github/demo.github.params.yml saveParams: name: Bowling App v0.01 description: Sprint 1 version of Serverless using Bowling EMF Model
- techStackId: AWSLambdaRDS modelId: 2 appOptionsFile: ./samples/options/aws.lambda.rdbms.options.json gitHubParams: entry: app-2-params file: ./samples/github/demo.github.params.yml saveParams: name: Bowling App v0.02 description: Sprint 2 version of Serverless using Bowling EMF Model
View an example within sub-directory _./samples/yamls/_ ### Stack and Model Publish Parameters This YAML file contains the location of the reference file to publish, along with save and version related details. Example Contents:
version: 1.0 saveParams: name: AWS Lambda RDS Upgraded description: Sprint 2 version of Bowling EMF stackPath: ./samples/techstacks/ stackFile: AWS_Lambda_RDS_Upgraded.zip
View an example within sub-directory _./samples/yamls/_