Add scoped PromptKit flag aliases

This commit is contained in:
2026-11-07 04:27:28 +00:00
parent 644e6c365b
commit 0183022a28
13 changed files with 237 additions and 38 deletions

View File

@@ -25,11 +25,11 @@ go run . promptkit show prompt briefing --campaign spring --format yaml
go run . pk show prompt briefing --campaign spring --fmt yaml
go run . promptkit show profile spring --campaign spring
go run . promptkit requirements show briefing --campaign spring
go run . promptkit requirements show briefing --campaign spring --llm-var mode=full --format yaml
go run . promptkit requirements show briefing --campaign spring --var mode=full --format yaml
go run . promptkit requirements validate briefing --campaign spring --llm-input-file topic=fixtures/topic.txt
go run . promptkit requirements validate briefing --campaign spring --llm-input-file topic=fixtures/topic.txt --llm-var mode=full --llm-input-file notes=fixtures/notes.txt --format yaml
go run . promptkit requirements validate briefing --campaign spring
go run . promptkit test text_inference --campaign spring --llm-prompt briefing --llm-profile spring
go run . promptkit test text_inference --campaign spring --prompt briefing --profile spring
go run . smoke text_inference --campaign spring --llm-prompt briefing --llm-profile spring
go run . promptkit test all --campaign spring --llm-prompt briefing --llm-profile spring
go run . pk --hlep

View File

@@ -249,7 +249,7 @@ func newAppWithEngineLoader(
if smokeTest != nil {
definitions.SmokeTest = smokeTest
}
definitionCommand := ckprompt.Command(definitions)
definitionDeclarations := ckprompt.Declarations(definitions)
store := map[string]session{
"session-42": {ID: "session-42", Campaign: "spring", Summary: "A synthetic planning session."},
@@ -291,7 +291,6 @@ func newAppWithEngineLoader(
})
declarations := []commandkit.Declaration{
configCommand,
definitionCommand,
commandkit.Completion("composed-example"),
commandkit.Group("session", "Manage saved sessions.", restore),
commandkit.Alias("list collections", "promptkit list collections"),
@@ -301,6 +300,7 @@ func newAppWithEngineLoader(
commandkit.FlagAliasFor("promptkit show prompt", "--fmt", "--format"),
commandkit.FlagAlias("--hlep", "--help"),
}
declarations = append(declarations, definitionDeclarations...)
return commandkit.New(commandkit.Identity{Name: "composed-example", Version: "1.0"}, declarations...)
}