Skip to content

Scaffolding CLI

edgecommons is a single static binary that scaffolds a component, validates its configuration and artifacts, moves it between library versions, packages it for the platforms it targets, and compiles a deployment definition into platform-native artifacts. It carries the component templates and the canonical config schema inside itself, so those operations work offline.

This page gets you installed and scaffolding. The CLI’s full documentation — tutorial, task recipes, every flag, and every diagnostic code — lives under Tools → edgecommons.

Build and install from the cli/ workspace of the monorepo:

Terminal window
cargo install --path cli/crates/ec-cli # installs `edgecommons` onto your PATH
edgecommons --version

Ask the tool what your targets need before generating anything:

Terminal window
edgecommons doctor --language RUST --platforms HOST

doctor reports each external tool it expects, whether it is on your PATH, and whether the version is new enough. It never installs anything.

Terminal window
edgecommons component new \
--name com.example.TankAdapter \
--language RUST \
--kind protocol-adapter \
--description "Reads tank levels and publishes signal updates"

The output directory is derived from the name in kebab form — tank-adapter. The four kinds are archetypes that generate different skeletons: service (the default), protocol-adapter, processor, and sink. See the command reference for the full flag set, including --platforms, --dep-source, and --license.

Then validate what you got:

Terminal window
cd tank-adapter
edgecommons component validate --platform GREENGRASS

Validation runs in three layers — schema, semantic rules, and artifact lint — so packaging mistakes that would otherwise surface at deploy time are caught at commit time instead.