2022-08-22 15:02:50 -07:00
|
|
|
package cli
|
|
|
|
|
|
|
|
|
|
import (
|
2025-09-26 16:58:12 +02:00
|
|
|
agplcli "github.com/coder/coder/v2/cli"
|
2024-03-15 11:24:38 -05:00
|
|
|
"github.com/coder/serpent"
|
2022-08-22 15:02:50 -07:00
|
|
|
)
|
|
|
|
|
|
2023-03-23 17:42:20 -05:00
|
|
|
type RootCmd struct {
|
2025-09-26 16:58:12 +02:00
|
|
|
agplcli.RootCmd
|
2023-03-23 17:42:20 -05:00
|
|
|
}
|
|
|
|
|
|
2024-03-17 09:45:26 -05:00
|
|
|
func (r *RootCmd) enterpriseOnly() []*serpent.Command {
|
|
|
|
|
return []*serpent.Command{
|
2025-09-26 16:58:12 +02:00
|
|
|
// These commands exist in AGPL, but we use a different implementation
|
|
|
|
|
// in enterprise:
|
2023-09-01 16:32:21 +03:00
|
|
|
r.Server(nil),
|
2025-09-26 16:58:12 +02:00
|
|
|
r.provisionerDaemons(),
|
|
|
|
|
agplcli.ExperimentalCommand(append(r.AGPLExperimental(), r.enterpriseExperimental()...)),
|
|
|
|
|
|
|
|
|
|
// New commands that don't exist in AGPL:
|
2026-01-23 12:56:36 -05:00
|
|
|
r.boundary(),
|
2023-04-20 09:48:47 -05:00
|
|
|
r.workspaceProxy(),
|
2023-03-23 17:42:20 -05:00
|
|
|
r.features(),
|
|
|
|
|
r.licenses(),
|
|
|
|
|
r.groups(),
|
2025-07-02 17:05:42 +02:00
|
|
|
r.prebuilds(),
|
2024-09-27 11:34:41 -04:00
|
|
|
r.provisionerd(),
|
2025-08-19 10:52:31 +02:00
|
|
|
r.externalWorkspaces(),
|
2025-10-29 07:36:08 -06:00
|
|
|
r.aibridge(),
|
2022-08-23 13:55:39 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-29 07:36:08 -06:00
|
|
|
func (*RootCmd) enterpriseExperimental() []*serpent.Command {
|
|
|
|
|
return []*serpent.Command{}
|
2025-09-26 16:58:12 +02:00
|
|
|
}
|
|
|
|
|
|
2024-03-17 09:45:26 -05:00
|
|
|
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
|
2024-03-25 20:01:42 +01:00
|
|
|
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
|
2022-08-22 15:02:50 -07:00
|
|
|
return all
|
|
|
|
|
}
|