Skip to content

gen:command & rem:command ​

Scaffold or remove custom Cobra CLI commands inside core/console/.

goforge gen:command [name] ​

Creates core/console/<safeID>_cmd.go (replacing :, -, ., / with _) and registers it on rootCmd in init().

bash
goforge gen:command stats:report

How to Run Custom Commands

goforge app only defines the serve subcommand (it does not have an app run subcommand). Run your generated command via:

bash
goforge app serve stats:report
# or directly:
go run ./app stats:report

goforge rem:command <name> ​

Prompts for confirmation and deletes core/console/<safeID>_cmd.go.

Released under the Apache-2.0 License.