Skip to content

plugin-example-command

Version 2026.175.0900
Repo superproject
Plugin yes — see the plugin reference

Reference OUT-OF-TREE charly COMMAND-class plugin — a standalone Go module (go.mod + main.go) contributing the examplecommand command via the charly plugin SDK (github.com/opencharly/sdk). On charly examplecommand <args…>, charly’s CLI dispatch (provider_command_external.go dispatchExternalCommand) RESOLVES this plugin’s binary (host-built from source, or baked into a deployed image) and syscall.Exec’s it with the pass-through tokens in CLI mode (sdk.Main → cliMain). The plugin therefore owns real terminal stdio and does ONE observable, deterministic thing: it PRINTS the joined args to STDOUT, so a test can assert the command ran, received its args, AND reached a real stdout. The command-class companion of the verb-class candy/plugin-example-external. The command class is external-capable: charly prescans examplecommand into the CLI grammar and fork/execs this binary on a charly examplecommand invocation.

This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.

Intent Step
check the out-of-tree command plugin ships a buildable Go module (go.mod + the provider main) the host can build + fork/exec; the full charly examplecommand end-to-end is exercised by the Go e2e + the live R10