Public commands
Here's how to use cwc to perfom any actions you could do with the web console and be able to code some automation/IaC scripts (i.e: shells scripts, ansible roles, terraform, etc).
Notes:
- To checkout how to install and update the
cwccli checkout this tutorial. - For the commands accessible for the administrators, checkout this tutorial
Usage, help versionβ
cwc help # or -h or --help for getting help
cwc version # or -v or --version for getting the current version
Authenticationβ
Loginβ
cwc login -a <access_key> -s <secret_key>
In order to create the access_key and the secret_key, you can checkout this tutorial.
Default configurationsβ
Read the current configurationsβ
cwc configure get endpoint
cwc configure get provider
cwc configure get region
cwc configure get format
cwc configure ls
This command will list the available config files available on your .cwc folder in your machine.
Configureβ
Configuring the default endpoint, default region, default output format and provider with:
cwc configure
You can tap enter if you want to keep the current value:
cwc configure
Default endpoint [https://api.cwcloud.tech]:
Default provider [ovh]:
Default region [UK1]:
Default format [json]:
Note: After configuring your cli a config file will be created automatically in the .cwc folder in the home directory.
You can check available providers and regions with the following commands:
cwc provider ls
cwc region ls # you have to set the provider to get the up to date list of available regions here
For each settings you also can configure with a specific command:
cwc configure set endpoint https://api.cwcloud.tech
cwc configure set provider ovh
cwc configure set region UK1
cwc configure set format json
And you can also create a config file to use with the configuration you made:
cwc configure switch <config_file_name>
This will take the config file existing in the .cwc folder you choose and set up the configuration.
If you want to import a config file existing in a different directory you can use the following command:
cwc configure import <config_file_path>
Note: it's also possible to use environment variables CWC_{VAR_NAME} instead of this configuration file. For example, for the output format you can set CWC_FORMAT environment variable to json, plain or pretty.
Output's formatsβ
The know output's format are the following:
plain: columns separated with spaces, usable in a shell scriptjson: JSON format, usable in more high level programing languagespretty: more understandable output for human but not very usable in a program or shell scripts. This format can be punctually asked by adding-por--prettydirectly in your commands.
Bootstrapβ
Install CWCloud on Kubernetesβ
Basic installationβ
cwc bootstrap
Installation with custom configurationβ
cwc bootstrap -r <release_name> -n <namespace>
cwc bootstrap --release <release_name> --namespace <namespace>
Available flags:
-ror--release: Release name for deployment (default:cwcloud)-nor--namespace: Namespace to use for deployment (default:cwcloud)-kor--keep-dir: Keep the local helm directory-dor--recreate-ns: Recreate the namespace-oor--openshift: Use openshift cli instead of kubectl-por--value: Values to override configurations (can be repeated)--kind-cluster: Specify the kind cluster to use (it'll be recreated even if it already exists)
Example:
cwc bootstrap -r my-release -n production --value key=value --value values-override.yaml
Configure custom repositoryβ
Interactive configurationβ
cwc bootstrap configure
Direct configuration with flagsβ
cwc bootstrap configure -u <repo_url> -b <branch>
cwc bootstrap configure --repo-url <repo_url> --branch <branch>
Available flags:
-uor--repo-url: Temporary repository URL-bor--branch: Temporary branch name-Uor--username: Username for repository authentication-Por--password: Password for repository authentication-ror--release: Release name for deployment (default:cwcloud)-nor--namespace: Namespace to use for deployment (default:cwcloud)-kor--keep-dir: Keep the local helm directory-por--value: Values to override configurations
Example:
cwc bootstrap configure --repo-url https://gitlab.alternative.io/helm.git --branch feature-123
Uninstallβ
cwc bootstrap uninstall
Port forwardingβ
cwc bootstrap pfw
Projectsβ
Listβ
cwc project ls
Note: You can add -t (or --type) flag to get filter the projects by type (either vm or k8s)
Search Projectβ
Search Project By IDβ
cwc project ls -P <project_id>
cwc project ls --id <project_id>
Search Project By Nameβ
cwc project ls -n <project_name>
cwc project ls --name <project_name>
Search Project By URLβ
cwc project ls -u <project_url>
cwc project ls --url <project_url>
Createβ
cwc project create -n <project_name>
Notes:
- If you want to create a project in another Gitlab instance you can provide the Gitlab host, the group id, your access token and your git username by adding these options:
-hor--host: Gitlab instance host-tor--token: your Gitlab access token-gor--git: Your Git username-nor--namespace: namespace or group id where the project will be created-por--type: Project type (vm or k8s)
Deleteβ
Delete Project By IDβ
cwc project delete -p <project_id>
cwc project delete --id <project_id>
Delete Project By Nameβ
cwc project delete -n <project_name>
cwc project delete --name <project_name>
Delete Project By URLβ
cwc project delete -u <project_url>
cwc project delete --url <project_url>
DNS zonesβ
Listβ
cwc dnszones ls
Environmentsβ
Listβ
cwc environment ls
Get by IDβ
cwc environment ls -e <environment_id>
cwc environment ls --environment <environment_id>pretty
Instancesβ
List instances types of selected providerβ
cwc instance type ls
List instancesβ
cwc instance ls
List instance by IDβ
cwc instance ls -i <instance_id>
cwc instance ls --instance <instance_id>
Createβ
cwc instance create -n <instance_name> -e <environement> -t <instance_type> -p <project_name> -z <zone>
cwc instance create -n <instance_name> -e <environement> -t <instance_type> -i <project_id> -z <zone>
cwc instance create -n <instance_name> -e <environement> -t <instance_type> -u <project_url> -z <zone>
Notes:
- use
novazone for ovh and1or2for scaleway instance_typecorresponds to the provider instance sizing (i.e:DEV1-Mfor Scaleway)- use
--dns_zoneor-dto choose the dns zone in which the instance will be created (you can list availble zones usingcwc dnszones ls)
Attachβ
cwc instance attach -n <playbook_name> -t <instance_type> -p <project_name> -z <zone>
Notes:
- use
novazone for ovh and1or2for scaleway instance_typecorresponds to the provider instance sizing (i.e:DEV1-Mfor Scaleway)
Update statusβ
cwc instance update -i <instance_id> -s <action>
Notes:
- The status must be
poweroff,poweronorreboot
Rebootβ
cwc instance reboot -i <instance_id>
Deleteβ
cwc instance delete -i <instance_id>
cwc instance delete --instance <instance_id>
Buckets / object storageβ
Listβ
cwc bucket ls
Get by IDβ
cwc bucket ls -b <bucket_id>
cwc bucket ls --bucket <bucket_id>
Renew credentialsβ
cwc bucket renew -b <bucket_id>
cwc bucket renew --bucket <bucket_id>
Deleteβ
cwc bucket delete -b <bucket_id>
cwc bucket delete --bucket <bucket_id>
OCI / Docker registriesβ
Listβ
cwc registry ls
Get by IDβ
cwc registry ls -r <registry_id>
cwc registry ls --registry <registry_id>
Renew credentialsβ
cwc registry renew -r <registry_id>
cwc registry renew --registry <registry_id>
Deleteβ
cwc registry delete -r <registry_id>
cwc registry delete --registry <registry_id>
FaaS / Serverlessβ
Demoβ
Languagesβ
Listβ
cwc faas languages ls
Serverless functionsβ
Listβ
cwc faas function ls
Get by IDβ
cwc faas function ls -f <function_id>
cwc faas function ls --function <function_id>
Createβ
cwc faas function create -n <function_name> -l <language_name>
cwc faas function create --name <function_name> --language <language_name>
- By default the function created is private if you add
-por--publicflag the function becomes public. - There are other optional flags for direct creation:
-l # or --language: Language of the function
-r # or --regexp: regular expression for args protection
-u # or --callback-url: callback's URL
-a # or --callback-authorization-header: Authorization's header of the callback
-g # or --args arguments: (you can repeat this option for each argument's values)
-c # or --code: source code of the function
- Instead of entering the optional flags behind each other you can enter your data with the interactive mode by adding
-ior--interactiveflag.
Updateβ
cwc faas function update -f <function_id>
cwc faas function update --function <function_id>
You can update the function by going through the interactive mode by adding -i or --interactive flag or you can pass your data directly with these optional flags:
-l # or --language: Language of the function
-r # or --regexp: regular expression for args protection
-u # or --callback-url: callback's URL
-a # or --callback-authorization-header: Authorization's header of the callback
-g # or --args arguments: (you can repeat this option for each argument's values)
-c # or --code: source code of the function
Deleteβ
cwc faas function delete -f <function_id>
cwc faas function delete --function <function_id>
Invocationsβ
Listβ
cwc faas invocation ls
Get by IDβ
cwc faas invocation ls -i <invocation_id>
cwc faas invocation ls --invocation <invocation_id>
Createβ
cwc faas invocation create -f <function_id>
cwc faas invocation create --function <function_id>
- There is other optional flag for direct creation:
-a # or --args: arguments (you can repeat this option for each argument's values)
-s # or --synchronous: enable the synchronous mode
- Instead of entering the optional flag you can enter your data with the interactive mode by adding
-ior--interactiveflag.
Deleteβ
cwc faas invocation delete -i <invocation_id>
cwc faas invocation delete --invocation <invocation_id>
Truncateβ
cwc faas invocation truncate
Triggersβ
List kindsβ
cwc faas trigger kinds
Listβ
cwc faas trigger ls
Get by IDβ
cwc faas trigger ls -t <trigger_id>
cwc faas trigger ls --trigger <trigger_id>
Createβ
cwc faas trigger create -f <function_id>
cwc faas trigger create --function <function_id>
- There are other optional flags for direct creation:
-n # or --name: trigger's name
-k # or --kind: trigger' kind
-c # or --cron_expr: trigger's cron expression
-a # or --args: arguments (you can repeat this option for each argument's values)
- Instead of entering the optional flag you can enter your data with the interactive mode by adding
-ior--interactiveflag.
Deleteβ
cwc faas trigger delete -t <trigger_id>
cwc faas trigger delete --trigger <trigger_id>
Truncateβ
cwc faas trigger truncate
IoTβ
Object Typesβ
List Object Typesβ
cwc iot objectType ls
Note: You can add -p (or --pretty) flag to display the output in a pretty table format
Search Object Type by IDβ
cwc iot objectType ls -i <object_type_id>
cwc iot objectType ls --id <object_type_id>
Create Object Typeβ
cwc iot objectType create -n <name> -d <decoding_function>
Options:
-nor--name: Name of the object type-dor--decoding_function: Decoding function of the object type (required)--public: Set the object type as public (optional)-tor--triggers: Triggers of the object type (can be used multiple times)-ior--interactive: Interactive mode for guided creation
Interactive Modeβ
cwc iot objectType create -i
cwc iot objectType create --interactive
Update Object Typeβ
cwc iot objectType update -o <object_type_id>
Options:
-oor--id: The object type ID (required)-nor--name: New name of the object type-dor--decoding_function: New decoding function--public: Update public status-tor--triggers: New triggers (can be used multiple times)-ior--interactive: Interactive mode for guided update
Delete Object Typeβ
cwc iot objectType delete -o <object_type_id>
cwc iot objectType delete --objectType <object_type_id>
Devicesβ
List Devicesβ
cwc iot device ls
Note: You can add -p (or --pretty) flag to display the output in a pretty table format
Search Device by IDβ
cwc iot device ls -i <device_id>
cwc iot device ls --id <device_id>
Create Deviceβ
cwc iot device create -u <username> -o <object_type_id>
Options:
-uor--username: Username of the device (email) (required)-oor--object_type_id: Object type ID of the device (required)
Delete Deviceβ
cwc iot device delete -d <device_id>
cwc iot device delete --deviceId <device_id>
Dataβ
Create Dataβ
cwc iot data create -d <device_id> -c <content>
Options:
-dor--device_id: Device ID of the data (required)-cor--content: Content of the data (required)
Storageβ
Key-Valueβ
Listβ
cwc storage kv ls
Createβ
cwc storage kv create -k <key> -p <payload>
cwc storage kv create --key <key> --payload <payload>
Notes:
- The payload must be a valid JSON string (e.g:
'{"key":"value"}') - You can specify an optional time-to-live in hours with
-tor--ttl
Updateβ
cwc storage kv update -k <key> -p <payload>
cwc storage kv update --key <key> --payload <payload>
Notes:
- The payload must be a valid JSON string (e.g:
'{"key":"value"}') - You can specify an optional time-to-live in hours with
-tor--ttl
Deleteβ
cwc storage kv delete -k <key>
cwc storage kv delete --key <key>
Kubernetesβ
Deploymentsβ
List deploymentsβ
cwc kubernetes deployment ls
List deployment by IDβ
cwc kubernetes deployment ls -d <deployment_id>
## or
cwc kubernetes deployment ls --id <deployment_id>
Create deploymentβ
cwc kubernetes deployment create -n <deployment_name> -d <deployment_description> -c <cluster_id> -i <project_id> -e <environment_id>
## or
cwc kubernetes deployment create --name <deployment_name> --description <deployment_description> --cluster <cluster_id> --project <project_id> --environment <environment_id>
Delete deployment by IDβ
cwc kubernetes deployment delete -d <deployment_id>
## or
cwc kubernetes deployment delete --id <deployment_id>
Emailβ
Send an emailβ
You can send an email with the following command:
cwc email -t <recepient_email> -s <subject> -c <content>
Notes:
- There are other optional flags you can add:
-fto add customized expeditor email address-bto add a bcc email address
Monitorsβ
Listβ
cwc monitor ls
Get by IDβ
cwc monitor ls -m <monitor_id>
cwc monitor ls --monitor <monitor_id>
Note: You can add -p or --pretty flag to get a more readable output
Createβ
cwc monitor create -n <monitor_name> -u <monitor_url>
Optional flags:
-yor--type: Type of the monitor (http, tcp) - defaults to "http"-for--family: Family of the monitor-mor--method: HTTP method (GET, POST, PUT) - defaults to "GET"-eor--expected_http_code: Expected HTTP response code (200, 201, 401...) - defaults to "20*"-bor--body: Request body - defaults to "hello"-cor--expected_contain: Expected content in the response-tor--timeout: Request timeout in seconds - defaults to 30-sor--username: Basic auth username-por--password: Basic auth password-Hor--headers: Custom headers in format "key1:value1,key2:value2"-lor--level: Log level of the monitor (info, debug) - defaults to "info"-kor--check_tls: Activate/Deactivate TLS certificate check - Activated by default-Cor--callbacks: Callbacks in formattype:http,endpoint:https://exemple.com,token:123;type:mqtt,endpoint:mqtt://broker.com,topic:test
Updateβ
cwc monitor update -i <monitor_id>
Optional flags:
-yor--type: Type of the monitor (http or tcp)-nor--name: Name of the monitor-for--family: Family of the monitor-uor--url: URL to monitor-mor--method: HTTP method (GET, POST, PUT)-eor--expected_http_code: Expected HTTP response code-bor--body: Request body-cor--expected_contain: Expected content in the response-tor--timeout: Request timeout in seconds-sor--username: Basic auth username-por--password: Basic auth password-Hor--headers: Custom headers in format "key1:value1,key2:value2"-lor--level: Log level of the monitor (info, debug) - defaults to "info"-kor--check_tls: Activate/Deactivate TLS certificate check - Activated by default-Cor--callbacks: Callbacks in formattype:http,endpoint:https://example.com,token:123;type:mqtt,endpoint:mqtt://broker.com,topic:test
Deleteβ
cwc monitor delete -m <monitor_id>
cwc monitor delete --monitor <monitor_id>
AI Promptβ
Send Promptβ
cwc ai prompt -a <adapter> -m "<message>"
Options:
-aor--adapter: The chosen AI adapter (required)-mor--message: The message input to send to the AI (required)-lor--list: Optional list ID to continue an existing conversation-por--pretty: Pretty print the output (optional)
Continue Conversationβ
cwc ai prompt -a <adapter> -m "<message>" -l <list_id>
Get Prompt Historyβ
cwc ai prompt history
Options:
-sor--start: Start index for pagination (default: 0)-mor--max: Maximum results to return (default: 7)-por--pretty: Pretty print the output (optional)
Get Prompt History with Paginationβ
cwc ai prompt history -s <start_index> -m <max_results>
cwc ai prompt history --start <start_index> --max <max_results>
Get Prompt Detailsβ
cwc ai prompt details -l <list_id>
cwc ai prompt details --list <list_id>
Options:
-lor--list: List ID to get details for (required)-por--pretty: Pretty print the output (optional)
AI Adaptersβ
List All Adaptersβ
cwc ai adapter ls
List Only External Adaptersβ
cwc ai adapter ls -e
cwc ai adapter ls --external
Get Specific Adapter by IDβ
cwc ai adapter ls -a <adapter_id>
cwc ai adapter ls --adapter-id <adapter_id>
Note: You can add --pretty flag to get a more readable output
Createβ
cwc ai adapter create -n <adapter_name> -u <adapter_url>
Optional flags:
-sor--username: Username for authentication-wor--password: Password for authentication-tor--timeout: Timeout in seconds - defaults to 30-kor--check-tls: Check TLS certificate - enabled by default-por--public: Make adapter public - defaults to false
Example:
cwc ai adapter create -n "my-adapter" -u "https://api.openai.com/v1/chat/completions" -s "myuser" -w "mypass" -t 60 -k=false -p=true
Updateβ
cwc ai adapter update -a <adapter_id>
Optional flags:
-nor--name: Name of the AI adapter-uor--url: URL of the AI adapter-sor--username: Username for authentication-wor--password: Password for authentication-tor--timeout: Timeout in seconds-kor--check-tls: Check TLS certificate-por--public: Make adapter public
Example:
cwc ai adapter update -a 2080dc4f-2485-42fe-a0ba-613bbc9fd2e5 -n "updated-name" -u "https://new-api.com" -s "newuser" -w "newpass" -t 90 -=truep
Deleteβ
cwc ai adapter delete -a <adapter_id>
cwc ai adapter delete --adapter-id <adapter_id>
Example:
cwc ai adapter delete -a 2080dc4f-2485-42fe-a0ba-613bbc9fd2e5
AI MCP & Agentsβ
Create MCP serverβ
cwc ai mcp
cwc ai mcp -l 127.0.0.1 -p 8080 -e /mcp
Create agent calling the mcp serverβ
cwc ai agent -p "List the instances"
cwc ai agent -p "List the instances" -s "http://127.0.0.1:8080/mcp" --provider anthropic
Note: available providers are anthropic, openai, deepseek or openrouter, for now you can configure your keys like this:
cwc configure set openai_api_key "your_key"
cwc configure set anthropic_api_key "your_key"
cwc configure set openrouter_api_key "your_key"
cwc configure set deepseek_api_key "your_key"
cwc configure set gemini_api_key "your_key"
cwc configure set mistral_api_key "your_key"
You can also use environment variables instead:
export CWC_OPENAI_API_KEY="your_key"
export CWC_ANTHROPIC_API_KEY="your_key"
export CWC_OPENROUTER_API_KEY="your_key"
export CWC_DEEPSEEK_API_KEY="your_key"
export CWC_GEMINI_API_KEY="your_key"
export CWC_MISTRAL_API_KEY="your_key
Note: you can also use interactive mode to create your agent with -i or --interactive flag:
cwc ai agent -i
Create a web agentβ
You can also use a web server mode to query your agent with HTTP POST requests instead of CLI:
cwc ai web-agent -a 0.0.0.0 -p 8081
The path / can be configured as an external AI adapter and the path /gitlab as a gitlab webhook if you set the following configurations:
cwc configure set gitlab_base_url "https://gitlab.cwcloud.tech"
cwc configure set gitlab_token "your_gitlab_token"
cwc configure set gitlab_webhook_secret "your webhook secret"
Or with those environment variables:
export CWC_GITLAB_BASE_URL="https://gitlab.cwcloud.tech"
export CWC_GITLAB_TOKEN="your_gitlab_token"
export CWC_GITLAB_WEBHOOK_SECRET="your webhook
List all the MCP tools availableβ
cwc ai agent -p "list_mcp_dynamic_tools"
Note: a cwc MCP server has to be running for this command to work
Metricsβ
Get all the available metrics (from the prometheus URL /v1/metrics of the API) with:
cwc metrics ls
Get a particular metric with:
cwc metrics get -n <metric_name>
cwc metrics get --name <metric_name>
Notes:
- Wildcard
*is supported to get all the metrics starting with a particular string (e.g:cwc metrics get -n "imalive*"to get all the metrics starting withimalivein their name) - Label filtering is also supported with
--filterflag (e.g:cwc metrics get -n "imalive" --filter "user=3"to get the metricimalivewith the labeluserequal to3)