Documentation
¶
Overview ¶
Package add holds the `forge add` command group — the verbs that scaffold a new component (service / worker / operator / binary / frontend / webhook / package / adapter / library / handler-file / rpc / entity / crd / scenario) into an existing forge project.
It is a dir-nested command group (the devspace idiom forge ships in generated apps). The subcommands that trigger codegen — `add service`, `add worker`, `add operator` — reach the generate pipeline and the pkg/app/services.go registration view through factory.GenAPI (function values internal/cli registers via SetGenAPI). The group never imports internal/cli, so the registry indirection in the factory package is what keeps the dependency one-directional (group → factory) and the import cycle broken. init() self-registers the parent command with the factory.