Command Line interface
Gleece is designed to run in CI/CD flows and during builds. As such, it provides a command line interface (CLI) from which all operations can be invoked.
Detailed below are the available commands.
Global Flags
The following flags are supported for all commands:
--no-banner- Disables the printing of Gleece's banner during execution-v|--verbosity <level>- Controls the logger's verbosity where lower values means greater verbosity.
Available values are:
0- All1- Debug2- Info3- Warn4- Error5- Fatal6- None
Version
Prints information about Gleece's version to stdout.
Version information includes:
- Version
- Build date
- Commit
- Target architechture
- Target platform
Usage: gleece version
Context: Standalone primary command
Example: gleece version
Flags: None
Generate
Analyzess a project and emits usable code or other artifacts
Usage: gleece generate <routes|spec|spec-and-routes> [options]
Context: Primary command
Example: gleece generate spec -c "./acme/gleece.config.json"
Flags:
[-c|--config <config-path>]- The path to the Gleece configuration file.
Defaults to./gleece.config.json
Sub Commands:
routes- Create a routing filespec- Create an OpenAPI schemaspec-and-routes- Create both a routing file and an OpenAPI schema
Dump
Retrieves information about Gleece's internal state.
This command is primarily used for visual inspection or troubleshooting.
Usage: gleece dump <type>
Context: Primary command
Example: gleece dump graph
Flags:
[-c|--config <config-path>]- The path to the Gleece configuration file.
Defaults to./gleece.config.json
Sub Commands:
graph- Analyzes a project and dumps Gleece's internal HIR graph tostdout- Flags:
format- The format to output the graph to. Valid values are:dot
- Flags: