mirror of
https://github.com/coder/coder.git
synced 2026-06-05 14:08:20 +00:00
dcfd6d6f73
<!-- If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting. -->
40 lines
876 B
Go
40 lines
876 B
Go
package cli
|
|
|
|
import (
|
|
agplcli "github.com/coder/coder/v2/cli"
|
|
"github.com/coder/serpent"
|
|
)
|
|
|
|
type RootCmd struct {
|
|
agplcli.RootCmd
|
|
}
|
|
|
|
func (r *RootCmd) enterpriseOnly() []*serpent.Command {
|
|
return []*serpent.Command{
|
|
// These commands exist in AGPL, but we use a different implementation
|
|
// in enterprise:
|
|
r.Server(nil),
|
|
r.provisionerDaemons(),
|
|
agplcli.ExperimentalCommand(append(r.AGPLExperimental(), r.enterpriseExperimental()...)),
|
|
|
|
// New commands that don't exist in AGPL:
|
|
r.workspaceProxy(),
|
|
r.features(),
|
|
r.licenses(),
|
|
r.groups(),
|
|
r.prebuilds(),
|
|
r.provisionerd(),
|
|
r.externalWorkspaces(),
|
|
r.aibridge(),
|
|
}
|
|
}
|
|
|
|
func (*RootCmd) enterpriseExperimental() []*serpent.Command {
|
|
return []*serpent.Command{}
|
|
}
|
|
|
|
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
|
|
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
|
|
return all
|
|
}
|