Skip to content

basic commands

This category includes the commands which are necessary for basic functionality of the projects. Like, enable, disable, fetch or rename and so on. Each of those commands will be described below.

get

get command enables you to fetch details about any application that you have access to. This command behaves in different ways, as according to the arguments supplied.

arguments

zocli project get [<:id>|<:name>]
If id or name is supplied at the end of the command then, that specific project details will be fetched without any other project information. The name argument on this command is case-insensitive, i.e. ZoClI is equal to zocli, which makes searching or manipulating projects easier using names also.

Sample:

$ zocli project get 2454

Will retrieve the project of ID 2454 and print the information

Along with,

$ zocli project get "demo project"

Will retrieve the project information of name demo project and print the information

NOTE: The above IDs and Name of the project must be in your account scope

zocli project get
If no any argument is supplied on the command then, this will fetch all the projects that are on your account scope.

Sample:

$ zocli project get

Will retrieve all the projects that you have access to.

flags

Expect the global flags, there are couple of flags which are available in get sub-command scope. And they are: help, id, name, output, and wide. Documentation for each of the flags can be found below.

help

This flag is available for every commands and sub-commands and this prints the help menu for that specific command, and this flag can be used as,

$ zocli project get [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to fetch details about that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project get [--id | -i] 2454

name

If you are not providing project name from the arguments then, you can start the --name flag, and provide the project name to fetch details about that specific project. And this exactly works as same as while provided from argument. Example:

$ zocli project get [--name | -n] test

output:

Output flag with format, will trigger the zocli to print the output in the desired format like, JSON and this flag can be used in combination with any other flags. This can be helpful if you want to automate works in 01cloud using any other 3rd party tools (like, jq). And as of right now, zocli supports 2 formats i.e. JSON and YAML. And you can utilize this output for using as manifest or resource file while performing actions using cli commannd apply.

You can use the output flag as,

$ zocli project get -o [json | yaml]

Example:

$ zocli project get 1 -o yaml
apiVersion: app.01cloud.io/v1
kind: project
metadata:
    id: 1
    createdat: 2000-01-11T01:01:00.000000Z
    name: Cli Docs
spec:
    subscription:
        id: 1
        name: Basic Plan
    logging: 01Logs
    monitoring: Prometheus
    optimize_cost: false
    dedicated_lb: true
    variables:
        - id: 0
          key: test
          type: normal
          value: this is a dummy secret
    owner:
        id: 0
        email: ""

wide

Wide flag can be used while you want more columns on the table for more detailed information. This flag can be used as,

$ zocli project get [-w | --wide]

And that will add DESCRIPTION, REGION, LOGGING, DISKSPACE(GB) and LB MONITORING headers to the existing table (like in get command) and print the respective details.


overview

overview command is responsbile for printing the general usage of the resources used by the project. Like, memory, core usage, storage usage... (You can expect a copy of the resources tab of 01cloud UI in CLI format.)

arguments

$ zocli project overview [<:id>|<:name>]

If projectID or projectName is supplied as an argument, then the overview command will print the resources usage of that specific project. Here also, the projectName is case-insensitive.

flags

Expect the global flags, there are couple of flags which are available in overview sub-command scope. And they are: help, id and name.

help

As this flag is available for every commands and sub-commands and this prints the help menu for overview command, and this flag can be used as,

$ zocli project overview [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to fetch overview details about that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project overview [--id | -i] 1

name

If you are not providing project name from the arguments then, you can start the --name flag, and provide the project name to fetch overview details about that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project overview [--name | -n] "zocli docs"

enable

enable command, as the name suggests, helps you to enable projects which are on DEACTIVATED state on 01cloud. If the project is not in active state then below error will be printed to the console,

project is already activated
exit status 8

For more information regarding the exit status of zocli, Check here

On successfull enabling of project, you can see the below output on the console. Note You need to confirm on the question that you want to proceed on to enale the project.

✓ Successfully deactivated project.

arguments

$ zocli project enable [<:projectID>|<:projectName>]

If projectID or projectName is supplied as an argument then, enable command will trigger enabling of this specific project.

flags

Expect the global flags, there are couple of flags which are available in enable sub-command scope. And they are: help, id and name.

help

As this flag is available for every commands and sub-commands and this prints the help menu for enable command, and this flag can be used as,

$ zocli project enable [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to enable this specific project. And this exactly works as same as while provided from argument.

Example:

$ zocli project enable [--id | -i] 1

name

If you are not providing project name from the arguments then, you can start the --name flag, and provide the project name to enable that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project enable [--name | -n] "zocli docs"

disable

disable command, as the name suggests, helps you to disable projects which are on ACTIVE state on 01cloud. If the project is not in active state then below error will be printed to the console,

project is already deactivated
exit status 8

For more information regarding the exit status of zocli, Check here

If valid projectID or projectName is supplied i.e. if the project state is active then, you will be asked for confirmation for, if you sure want to disable the project ?.

On successfull disabling of project, you can see the below output on the console.

✓ Successfully deactivated project.

arguments

$ zocli project disable [<:projectID>|<:projectName>]

If projectID or projectName is supplied as an argument then, disable command will trigger disabling of this specific project.

flags

Expect the global flags, there are couple of flags which are available in disable sub-command scope. And they are: help, id and name.

help

As this flag is available for every commands and sub-commands and this prints the help menu for disable command, and this flag can be used as,

$ zocli project disable [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to disable this specific project. And this exactly works as same as while provided from argument.

Example:

$ zocli project disable [--id | -i] 1

name

If you are not providing project name from the arguments then, you can start the --name flag, and provide the project name to disable that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project disable [--name | -n] "zocli docs"

rename

rename command helps you to rename any of the project in which you have permission to write.

arguments

$ zocli project rename [<:projectID>]

If projectID is supplied as an argument then, delete command will trigger renaming of this specific project nor then, it will ask for the project ID after executing

$ zocli project rename

flags

Expect the global flags, there are couple of flags which are available in rename sub-command scope. And they are: help, id and name.

help

As this flag is available for every commands and sub-commands and this prints the help menu for rename command, and this flag can be used as,

$ zocli project rename [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to rename this specific project. And this exactly works as same as while provided from argument.

Example:

$ zocli project rename [--id | -i] 1

name

You can start the --name flag, and provide the new project name to rename the project to this new name.

Example:

$ zocli project rename [--name | -n] "zocli docs"

delete

delete command will help you to delete any project from your 01cloud account or the organization you reside in.

NOTE: In order to delete the projects you must have the necessary permission.

arguments

$ zocli project delete [<:projectID>|<:projectName>]

If projectID or projectName is supplied as an argument then, delete command will trigger delition of this specific project.

flags

Expect the global flags, there are couple of flags which are available in delete sub-command scope. And they are: help, id and name.

help

As this flag is available for every commands and sub-commands and this prints the help menu for disable command, and this flag can be used as,

$ zocli project delete [--help | -h]

Note: If help flag is supplied then, any other flags or arguments will be ignored

id

If you are not providing project id from the arguments then, you can start the --id flag, and provide the project id to delete this specific project. And this exactly works as same as while provided from argument.

Example:

$ zocli project delete [--id | -i] 1

name

If you are not providing project name from the arguments then, you can start the --name flag, and provide the project name to delete that specific one. And this exactly works as same as while provided from argument.

Example:

$ zocli project delete [--name | -n] "zocli docs"