SOMOD CLI is a toolset to Develop, Build and Reuse Serverless Applications. With the command-line interface (CLI) you can work with a SOMOD module using a terminal, or through automated scripts, enabling you to build, and prepare deployable applications.
This page contains a complete list of all SOMOD CLI commands available, along with their arguments and options for additional behavior
To download and install SOMOD CLI, run the following command
npm install somod --save-dev
All SOMOD commands need to be run under an npm package directory.
-h
or --help
Displays the command usage instructions
--version
Displays the version of the SOMOD CLI
-v
or --verbose
Runs the command in verbose mode. In verbose mode, the command outputs more info to stdout
build
npx somod build
Validates the source and generates build
directory. The directory structure is explained in detail here.
--ui
--serverless
prepare
npx somod prepare
Prepares NextJs and AWS SAM Projects by combining all dependency modules.
--ui
--serverless
--debug
deploy
npx somod deploy
Deploys the AWS SAM project to AWS Cloudformation. Internally calls build
and prepare
with --serverless option.
This command requires that AWS SAM is installed and configured to the right AWS Account. Refer to the Getting started with AWS SAM guide for setting up SAM.
-g
or --guided
start
npx somod start
This command starts the NextJs Server. Internally calls build
and prepare
with the --ui
option.
Refer to the Next.js CLI guide for NextJs Commands.
--dev
parameters update
npx somod parameters update
After deploying AWS SAM Project, this command updates the parameters.json
with the exported parameters.
Refer to the Outputs
section of serverless/template.yaml
to know how to export an output from the Cloudformation stack to a parameter.
-s
or --stack-name
samconfig.toml
if omittedparameters validate
npx somod parameters validate
Validates the parameters.json
file against the parameters schema
No command-specific options
Write an email to opensource@sodaru.com