Skip to content

CLI Reference

⚙️ Settings

Logging:

LevelDescriptionWhen to Use
debugDetailed debug informationFor diagnosing issues
infoGeneral process informationDefault logging level
warnWarningsFor potential issues
errorErrorsFor critical failures only

Logging level is set via the GODYNO_LOG_LEVEL environment variable.

Formatting:

Disable colored output via the GODYNO_LOG_NO_COLOR environment variable.

💻 Commands

CommandDescription
versionDisplay the current version
helpShow help information
generateGenerate Go code from a JSON schema
validateValidate JSON schema

generate

Command Flags:

FlagRequiredDescriptionEnv Variable
s / schemaPath to the JSON schema fileGODYNO_SCHEMA
o / output-dirDirectory for generated Go codeGODYNO_OUTPUT-DIR
m / modeSet generation mode: [ALL, MIN]GODYNO_MODE
packageOverwrite generated file package nameGODYNO_PACKAGE
filenameOverwrite generated filenameGODYNO_FILENAME

Examples:

bash
godyno generate --schema schema.json --output-dir ./gen
bash
godyno generate -s schema.json -o ./gen -m min
bash
export GODYNO_SCHEMA=./schema.json
export GODYNO_OUTPUT-DIR=./gen

godyno generate -package mypackage

validate

Command Flags:

FlagRequiredDescriptionEnv Variable
s / schemaPath to the JSON schema fileGODYNO_SCHEMA

Examples:

bash
godyno validate --schema schema.json
bash
export GODYNO_SCHEMA=./schema.json

godyno validate

Released under the MIT License.