Files
coder/enterprise/cli/root.go
T
Kacper Sawicki 7b1dcd9846 feat(cli): add enterprise external-workspaces CLI command (#19287)
This pull request introduces support for external workspace management, allowing users to register and manage workspaces that are provisioned and managed outside of the Coder.

* coder external-workspaces create - Creates a new external workspace (this command extends coder create)
  * Example: coder external-workspaces create ext-workspace --template=externally-managed-workspace -y
  * Checks if template has coder_external_agent resource before creating a workspace
* coder external-workspaces list - Lists all external workspaces
* coder external-workspaces agent-instructions <workspace name> <agent name> - Retrieves agent connection instruction
  * Example: coder external-workspaces agent-instructions ext-workspace main --output=json
2025-08-19 10:52:31 +02:00

30 lines
524 B
Go

package cli
import (
"github.com/coder/coder/v2/cli"
"github.com/coder/serpent"
)
type RootCmd struct {
cli.RootCmd
}
func (r *RootCmd) enterpriseOnly() []*serpent.Command {
return []*serpent.Command{
r.Server(nil),
r.workspaceProxy(),
r.features(),
r.licenses(),
r.groups(),
r.prebuilds(),
r.provisionerDaemons(),
r.provisionerd(),
r.externalWorkspaces(),
}
}
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
all := append(r.CoreSubcommands(), r.enterpriseOnly()...)
return all
}