Eclipse Che CLI
Issues are tracked on the main Eclipse Che Repository: https://github.com/eclipse/che/issues
There are two channels of chectl
: stable
and next
Stable is for all tagged versions of Eclipse Che. Next is updated after each commit/Pull Request being merged in master branch of the Chectl repository.
If you're using Windows x64, here is how to install chectl by using one single PowerShell command:
- For
stable
channel:
C:\Users> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://www.eclipse.org/che/chectl/win/'))
- For
next
channel:
C:\Users> $CHANNEL="next"; Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://www.eclipse.org/che/chectl/win/'))
If you're using linux or macOS, here is how to install chectl by using one single command:
- For
stable
channel:
$ bash <(curl -sL https://www.eclipse.org/che/chectl/)
- For
next
channel:
$ bash <(curl -sL https://www.eclipse.org/che/chectl/) --channel=next
Assemblies of chectl are available at https://github.com/che-incubator/chectl/releases
Manual install:
- Download a .tgz file based on your Operating System / Arch
- Unpack the assembly
- move
chectl
folder into a folder like$HOME/chectl
- add
$HOME/chectl/bin
to `$PATH``
$ chectl server:start
running command...
$ chectl server:stop
running command...
$ chectl workspace:start --devfile
running command...
$ chectl --help [COMMAND]
USAGE
$ chectl COMMAND
...
chectl autocomplete [SHELL]
chectl devfile:generate
chectl help [COMMAND]
chectl server:delete
chectl server:start
chectl server:stop
chectl server:update
chectl update [CHANNEL]
chectl workspace:inject
chectl workspace:list
chectl workspace:start
chectl workspace:stop
display autocomplete installation instructions
USAGE
$ chectl autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ chectl autocomplete
$ chectl autocomplete bash
$ chectl autocomplete zsh
$ chectl autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
generate and print a devfile to stdout given some Kubernetes resources and other Che workspaces features (project, language-support, commands etc...)
USAGE
$ chectl devfile:generate
OPTIONS
-h, --help show CLI help
--command=command Command to include in the workspace
--dockerimage=dockerimage dockerimage component to include in the Devfile
--editor=editor Specify the Che editor component. Currently supported editors: theia-next,theia-1.0.0
--git-repo=git-repo Source code git repository to include in the workspace
--language=language Add support for a particular language. Currently supported languages:
java,typescript,go,python,c#
--name=name Workspace name
--namespace=namespace Kubernetes namespace where the resources are defined
--plugin=plugin Che plugin to include in the workspace. The format is JSON. For example this is a valid Che
Plugin specification: {"type": "TheEndpointName.ChePlugin", "alias": "java-ls", "id":
"redhat/java/0.38.0"}
--selector=selector label selector to filter the Kubernetes resources. For example
--selector="app.kubernetes.io/name=employee-manager"
See code: src/commands/devfile/generate.ts
display help for chectl
USAGE
$ chectl help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
delete any Che related resource: Kubernetes/OpenShift/Helm
USAGE
$ chectl server:delete
OPTIONS
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che was deployed
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/server/delete.ts
start Eclipse Che Server
USAGE
$ chectl server:start
OPTIONS
-a, --installer=installer Installer type. Valid values are "helm", "operator" and "minishift-addon"
-b, --domain=domain Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or
<local-ip>.nip.io)
-h, --help show CLI help
-i, --cheimage=cheimage [default: eclipse/che-server:nightly] Che server container image
-m, --multiuser Starts che in multi-user mode
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che resources will be deployed
-o, --cheboottimeout=cheboottimeout (required) [default: 40000] Che server bootstrap timeout (in
milliseconds)
-p, --platform=platform Type of Kubernetes platform. Valid values are "minikube", "minishift",
"k8s (for kubernetes)", "openshift", "crc (for CodeReady Containers)",
"microk8s".
-s, --tls Enable TLS encryption.
Note that for kubernetes 'che-tls' with TLS
certificate must be created in the configured namespace.
For OpenShift, router will use default cluster
certificates.
-t, --templates=templates [default: templates] Path to the templates folder
--che-operator-cr-yaml=che-operator-cr-yaml Path to a yaml file that defines a CheCluster used by the operator. This
parameter is used only when the installer is the operator.
--che-operator-image=che-operator-image [default: quay.io/eclipse/che-operator:nightly] Container image of the
operator. This parameter is used only when the installer is the operator
--devfile-registry-url=devfile-registry-url The URL of the external Devfile registry.
--k8spodreadytimeout=k8spodreadytimeout [default: 130000] Waiting time for Pod Ready Kubernetes (in milliseconds)
--k8spodwaittimeout=k8spodwaittimeout [default: 300000] Waiting time for Pod Wait Timeout Kubernetes (in
milliseconds)
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or
'verbose'
--os-oauth Enable use of OpenShift credentials to log into Che
--plugin-registry-url=plugin-registry-url The URL of the external plugin registry.
--self-signed-cert Authorize usage of self signed certificates for encryption. Note that
`self-signed-cert` secret with CA certificate must be created in the
configured namespace.
See code: src/commands/server/start.ts
stop Eclipse Che Server
USAGE
$ chectl server:stop
OPTIONS
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che resources will be deployed
--access-token=access-token Che OIDC Access Token
--che-selector=che-selector [default: app=che,component=che] Selector for Che Server resources
--deployment-name=deployment-name [default: che] Che deployment name
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/server/stop.ts
update Eclipse Che Server
USAGE
$ chectl server:update
OPTIONS
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che resources will be deployed
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/server/update.ts
update the chectl CLI
USAGE
$ chectl update [CHANNEL]
See code: @oclif/plugin-update
inject configurations and tokens in a Che Workspace
USAGE
$ chectl workspace:inject
OPTIONS
-c, --container=container Target container. If not specified, configuration files will be injected in all
containers of a Che Workspace pod
-h, --help show CLI help
-k, --kubeconfig Inject the local Kubernetes configuration
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che workspace is running
-w, --workspace=workspace Target workspace. Can be omitted if only one Workspace is running
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/workspace/inject.ts
list Che workspaces
USAGE
$ chectl workspace:list
OPTIONS
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che server is deployed
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/workspace/list.ts
create and start a Che workspace
USAGE
$ chectl workspace:start
OPTIONS
-f, --devfile=devfile path or URL to a valid devfile
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] kubernetes namespace where Che server is deployed
-w, --workspaceconfig=workspaceconfig path to a valid workspace configuration json file
--access-token=access-token Che OIDC Access Token
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
--name=name workspace name: overrides the workspace name to use instead of the one defined
in the devfile. Works only for devfile
See code: src/commands/workspace/start.ts
stop a running Che workspace
USAGE
$ chectl workspace:stop
OPTIONS
-h, --help show CLI help
-n, --chenamespace=chenamespace [default: che] Kubernetes namespace where Che server is deployed
--listr-renderer=listr-renderer [default: default] Listr renderer. Can be 'default', 'silent' or 'verbose'
See code: src/commands/workspace/stop.ts
Contributing to chectl is covered in CONTRIBUTING.md