Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions cmd/crossplane/alpha/alpha.go

This file was deleted.

41 changes: 0 additions & 41 deletions cmd/crossplane/alpha/render/cmd.go

This file was deleted.

99 changes: 0 additions & 99 deletions cmd/crossplane/alpha/render/xr/cmd.go

This file was deleted.

42 changes: 0 additions & 42 deletions cmd/crossplane/beta/beta.go

This file was deleted.

27 changes: 27 additions & 0 deletions cmd/crossplane/cluster/cluster.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
Copyright 2026 The Crossplane Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package cluster contains commands for inspecting a Crossplane cluster.
package cluster

import (
"github.com/crossplane/cli/v2/cmd/crossplane/top"
)

// Cmd contains commands for inspecting a Crossplane cluster.
type Cmd struct {
Top top.Cmd `cmd:"" help:"Display resource (CPU/memory) usage by Crossplane related pods."`
}
29 changes: 29 additions & 0 deletions cmd/crossplane/composition/composition.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Copyright 2026 The Crossplane Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package composition contains commands for working with Crossplane Compositions.
package composition

import (
"github.com/crossplane/cli/v2/cmd/crossplane/convert"
"github.com/crossplane/cli/v2/cmd/crossplane/render/xr"
)

// Cmd contains commands for working with Crossplane Compositions.
type Cmd struct {
Convert convert.Cmd `cmd:"" help:"Convert a Composition to a newer version." maturity:"beta"`
Render xr.Cmd `cmd:"" help:"Render a composite resource (XR)."`
}
49 changes: 49 additions & 0 deletions cmd/crossplane/config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
Copyright 2026 The Crossplane Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package config contains the `crossplane config` subcommands.
package config

// ConfigPath is the resolved config file path. It is bound by main so that
// subcommands can receive it as a Run() argument. Using a typed alias keeps
// the binding distinct from any other string value Kong may know about.
type ConfigPath string //nolint:revive // The "Config" stutter is intentional; this is the type Kong binds.

// Cmd groups subcommands for inspecting and modifying the CLI config file.
type Cmd struct {
// Keep subcommands sorted alphabetically.
Set setCmd `cmd:"" help:"Set a config value and write it to the config file."`
View viewCmd `cmd:"" help:"Print the current effective config as YAML."`
}

// Help returns the extended help for the config command.
func (c *Cmd) Help() string {
return `
Manage the crossplane CLI configuration file.

The config file location is, in priority order:
1. The --config flag.
2. The CROSSPLANE_CONFIG environment variable.
3. $XDG_CONFIG_HOME/crossplane/config.yaml (or ~/.config/crossplane/config.yaml).

Examples:
# Show the current effective config.
crossplane config view

# Enable alpha commands.
crossplane config set features.enableAlpha true
`
}
Loading
Loading