Skip to main content
Version: Pasley (2.0.0-rc.9)

CLI Reference

Auth

The Auth command allows you to log in and out of Codezero.

Usage

czctl auth [SUB-COMMAND]

Examples

czctl auth login

Sub-commands

Sub-commandDescription
loginLogin to Codezero
logoutLogout from Codezero

Flags

FlagsDescription
--forceIf set, app will not check if the user is already logged in (not needed for --token).
--no-guiIf set, app will not try to open a browser window for login.
--tokenIf set, app will not try to open a browser window for login and will use the provided token.

Cleanup

Cleans the system changes performed by czdaemon. Can help if czdaemon did not exit gracefully to bring back your network settings.

Usage

czctl cleanup

Completion

Generate the autocompletion script for czctl for the specified shell.

See each sub-command's help for details on how to use the generated script.

Usage

czctl completion [SUB-COMMAND]

Sub-commands

Sub-commandDescription
bashGenerate the autocompletion script for bash
fishGenerate the autocompletion script for fish
powershellGenerate the autocompletion script for powershell
zshGenerate the autocompletion script for zsh

Example

To load zsh completions in your current shell session:

source <(czctl completion zsh)

Config

Provides operations for the configuration file.

Usage

czctl config [SUB-COMMAND]

Examples

czctl config view

Sub-commands

Sub-commandDescription
createCreates a new config file and quits. Does not overwrite existing config file be default. Use --overwrite to overwrite existing config file.
testTest the configuration file.
viewView config

Flags

FlagsDescription
--overwriteOverwrite existing config file

Consume

Manage consume rules.

Apply

Apply consume rules from a file.

Usage

czctl consume apply source_file [flags]

Examples

czctl consume apply source_file

Flags

FlagsDescription
--primary-namespaceThe primary namespace used for services consume

Edit

Edit consume rules.

Usage

czctl consume edit [flags]

Examples

czctl consume edit

Flags

FlagsDescription
--editorYour preferred editor to edit the rules. If not set, will try to use EDITOR environment variable, or present you a list of available ones. Please make sure to use the -w flag with the editor so that the app can wait for you to finish editing.
--primary-namespaceThe primary namespace used for services consume

List

List consumed services.

Usage

czctl consume list [flags]

Examples

czctl consume list

Flags

FlagsDescription
--filter stringFilter to apply to the list. Format is: \<namespace>[/\<resource>]. Wildcards are supported.
--format stringOutput format. Supported values: yaml, json, pretty (default "pretty")

View

View consume rules.

Usage

czctl consume view

Examples

czctl consume view

Organization

Manage Organizations.

Clear

Clear the currently selected organization.

Usage

czctl organization clear

List

List organizations

Usage

czctl organization clear [flags]

Examples

czctl organization clear --format json

Flags

FlagsDescription
--format stringOutput format (text|json) (default "text")

Select

Changes the current organization

You can use this command to change the current organization. If you don't provide a name or there are multiple spaces with the same name, you will be interactively prompted to select one.

Usage

czctl organization select [organization name] [flags]

Examples

czctl organization select MyOrg

Flags

FlagsDescription
--id stringSelect by organization ID

Primary Namesapce

Manage primary namespace.

Clear

Clear the currently selected primary namespace.

Usage

czctl primary-namespace clear

Select

Change the current primary namespace.

Usage

czctl primary-namespace select [namespace]

Examples

czctl primary-namespace select sample-project

Arguments

ArgumentsDescription
namespaceThe name of the Kubernetes namespace.

Restart

Restarts the Codezero daemon if it is running. If it is not running, does nothing.

Usage

czctl restart

Serve

Manage served resources.

Serving a resource

Usage

czctl serve [namespace/name] [local_port:]remote_port [...[local_port_n:]remote_port_n] [flags]

Example

czctl serve sample-project/core 3000

Flags

FlagsDescription
--deleteDelete served resource

List

List served resources.

Usage

czctl serve list [flags]

Example

czctl serve list --format json

Flags

FlagsDescription
--format stringOutput format (yaml|json) (default "yaml")

Space

Manage Spaces.

List

List spaces.

Usage

czctl space list [flags]

Example

czctl space list --format json

Flags

FlagsDescription
--format stringOutput format (text|json) (default "text")

Select

Changes the current space

You can use this command to change the current space. If you don't provide a name or there are multiple spaces with the same name, you will be interactively prompted to select one.

Usage

czctl space select [flags]

Example

czctl space select pre-production

Flags

FlagsDescription
--id stringSelect by space ID

Start

Starts the Codezero daemon, does nothing if daemon is already running

Usage

czctl start

Status

Returns the status of the Codezero daemon. If the daemon is not running, it will exit with code 1. Otherwise, it will exit with code 0.

Usage

czctl status [flags]

Example

czctl status --format json

Flags

FlagsDescription
--format stringOutput format. Supported values: yaml, json, pretty (default "pretty")

Stop

Stops the Codezero daemon. Does nothing if daemon is not running.

Usage

czctl stop

Version

Shows the current product version.

Usage

czctl version