Skip to content

[Feat] Add generated CLI run helper#37

Merged
samzong merged 1 commit into
mainfrom
feat/lathe-run-helper
May 25, 2026
Merged

[Feat] Add generated CLI run helper#37
samzong merged 1 commit into
mainfrom
feat/lathe-run-helper

Conversation

@samzong

@samzong samzong commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a standard lathe.Run entrypoint for generated CLIs so downstream main.go files no longer need to manually load and bind the manifest, mount modules, and route execution through the runtime.

Also updates examples and CLI usage docs to use the helper, while keeping NewApp available for advanced root command composition.

Verification

  • make check
  • GOWORK=<temp> go test ./... in daocloud-skills against this local Lathe checkout
  • GOWORK=<temp> go build -o <temp>/dc ./cmd/dc in daocloud-skills
  • <temp>/dc version
  • <temp>/dc commands schema --json
  • <temp>/dc search alerts --json

Compatibility

Additive runtime API. Existing downstream code using config.Load, config.Bind, lathe.NewApp, and direct root.Execute continues to compile and run. NewApp now binds the provided manifest itself; callers that already bind the same manifest remain compatible. Catalog schema and generated command shape are unchanged.

Checklist

  • Tests or focused verification cover the changed surface.
  • User-facing behavior changes are documented.
  • Generated output under internal/generated/, .cache/, and ad-hoc skills/<cli-name>/ directories is not committed.
  • Commits are signed off when this is ready to merge.

Signed-off-by: samzong <samzong.lu@gmail.com>
@samzong
samzong merged commit 9c1c27f into main May 25, 2026
3 checks passed
@samzong
samzong deleted the feat/lathe-run-helper branch June 26, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant