Skip to content

Commit 2001dad

Browse files
committed
cli: add stop as alias for unload command
Users coming from docker model run naturally expect docker model stop to stop a model. Add stop as a Cobra alias for the unload command so both docker model stop and docker model unload work interchangeably. Fixes #820
1 parent 9a2c555 commit 2001dad

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmd/cli/commands/unload.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ func newUnloadCmd() *cobra.Command {
1414

1515
const cmdArgs = "(MODEL [MODEL ...] [--backend BACKEND] | --all)"
1616
c := &cobra.Command{
17-
Use: "unload " + cmdArgs,
18-
Short: "Unload running models",
17+
Use: "unload " + cmdArgs,
18+
Aliases: []string{"stop"},
19+
Short: "Unload running models",
1920
RunE: func(cmd *cobra.Command, modelArgs []string) error {
2021
unloadResp, err := desktopClient.Unload(desktop.UnloadRequest{All: all, Backend: backend, Models: modelArgs})
2122
if err != nil {

0 commit comments

Comments
 (0)