CWClock CLI
We provide an OpenSource1 CLI for CWClock. You can use it to record your time using a terminal and more.
Installationβ
Choose the installation mode that suits your operating system and follow the instructions.
Homebrewβ
First installation:
brew tap cwclock/cwclock https://gitlab.cwcloud.tech/oss/cwclock.git
brew trust --formula cwclock/cwclock/cwclock
brew install cwclock
Upgrade:
brew update
brew upgrade cwclock
Curlβ
Linuxβ
Linux x86 (64 bit)β
version="1.13.4"
curl -L "https://gitlab.cwcloud.tech/oss/cwclock/-/releases/v${version}/downloads/cwclock/cwclock_${version}_linux_amd64.tar.gz" -o "cwclock_cli.tar.gz"
mkdir cwclock_cli && tar -xf cwclock_cli.tar.gz -C cwclock_cli
sudo ./cwclock_cli/install.sh
Beware of checking if the version is available in the releases because we only keep the 5 last builds.
Linux arm (64 bit)β
version="1.13.4"
curl -L "https://gitlab.cwcloud.tech/oss/cwclock/-/releases/v${version}/downloads/cwclock/cwclock_${version}_linux_arm64.tar.gz" -o "cwclock_cli.tar.gz"
mkdir cwclock_cli && tar -xf cwclock_cli.tar.gz -C cwclock_cli
sudo ./cwclock_cli/install.sh
Beware of checking if the version is available in the releases because we only keep the 5 last builds.
MacOSβ
MacOS x86/arm (64 bit)β
version="1.13.4"
curl -L "https://gitlab.cwcloud.tech/oss/cwclock/-/releases/v${version}/downloads/cwclock/cwclock_${version}_darwin_all.tar.gz" -o "cwclock_cli.tar.gz"
mkdir cwclock_cli && tar -xf cwclock_cli.tar.gz -C cwclock_cli
sudo ./cwclock_cli/install.sh
Beware of checking if the version is available in the releases because we only keep the 5 last builds.
Windowsβ
Direct downloadβ
You can directly download from here. Choose the right architecture (amd64 or arm64), download, unzip and you'll find an exe file there.
Windows x86 (64 bit) with Powershellβ
$version = "1.13.4"
$user = "YOUR_USER"
cd "C:\Users\${user}"
Invoke-WebRequest -Uri "https://gitlab.cwcloud.tech/oss/cwclock/-/releases/v${version}/downloads/cwclock/cwclock_${version}_windows_amd64.zip" -OutFile "cwclock_cli.zip"
Expand-Archive -Path "cwclock_cli.zip" -DestinationPath "cwclock_cli" -Force
Set-Location "cwclock_cli"
.\cwclock.exe
Beware of checking if the version is available in the releases because we only keep the 5 last builds.
Windows arm (64 bit) with Powershellβ
$version = "1.13.4"
$user = "YOUR_USER"
cd "C:\Users\${user}"
Invoke-WebRequest -Uri "https://gitlab.cwcloud.tech/oss/cwclock/-/releases/v${version}/downloads/cwclock/cwclock_${version}_windows_arm64.zip" -OutFile "cwclock_cli.zip"
Expand-Archive -Path "cwclock_cli.zip" -DestinationPath "cwclock_cli" -Force
Set-Location "cwclock_cli"
.\cwclock.exe
Installation of quickwit using the CLIβ
cwclock bootstrap
Available flags:
-ror--release: Release name for deployment (default:cwclock)-nor--namespace: Namespace to use for deployment (default:cwclock)-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)--directory: Change the directory folder location (usefull if you want to use your own helm templates)--kind-cluster: Specify the kind cluster to use (it'll be recreated even if it already exists)
Example:
cwclock bootstrap -r my-release -n production --value key=value --value values-override.yaml
Open tunnelsβ
cwclock bootstrap pfw
Opens tunnels (or port forward) to the different services.
You can override the configuration like this:
cwclock bootstrap pfw --config my-pfw-config.yml
Expected YAML configuration format:
---
pfwConfigs:
- name: "cwclock-api"
port: 8080
targetPort: 8080
- name: "cwclock-ui"
port: 3000
targetPort: 3000
Configurationβ
cwclock configure
cwclock configure set format pretty
cwclock configure set api_url https://api.cwclock.me
cwclock configure set api_key <your api key>
Note: it's also possible to use environment variables QWCTL_{VAR_NAME} instead of this configuration file. For example, for the output format you can set QWCTL_FORMAT environment variable to json or pretty.
Metricsβ
Get all the available metrics (from the prometheus URL /v1/metrics of the API) with:
cwclock metrics ls
Get a particular metric with:
cwclock metrics get -n <metric_name>
cwclock metrics get --name <metric_name>
Notes:
- Wildcard
*is supported to get all the metrics starting with a particular string (e.g:cwclock metrics get -n "quickwit_metastore_*"to get all the metrics starting withquickwit_metastore_in their name) - Label filtering is also supported with
--filterflag (e.g:cwclock metrics get -n "quickwit_metastore_grpc_request_duration_seconds_bucket" --filter "kind=client"to get the metricquickwit_metastore_grpc_request_duration_seconds_bucketwith the labelkindequal toclient)
AI MCP & Agentsβ
Create MCP serverβ
cwclock ai mcp
cwclock ai mcp -l 127.0.0.1 -p 8080 -e /mcp
Create agent calling the mcp serverβ
cwclock ai agent -p "List the indexes"
cwclock ai agent -p "Search *" -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:
cwclock configure set openai_api_key "your_key"
cwclock configure set anthropic_api_key "your_key"
cwclock configure set openrouter_api_key "your_key"
cwclock configure set deepseek_api_key "your_key"
cwclock configure set gemini_api_key "your_key"
cwclock configure set mistral_api_key "your_key"
You can also use environment variables instead:
export CWCLOCK_OPENAI_API_KEY="your_key"
export CWCLOCK_ANTHROPIC_API_KEY="your_key"
export CWCLOCK_OPENROUTER_API_KEY="your_key"
export CWCLOCK_DEEPSEEK_API_KEY="your_key"
export CWCLOCK_GEMINI_API_KEY="your_key"
export CWCLOCK_MISTRAL_API_KEY="your_key"
Note: you can also use interactive mode to create your agent with -i or --interactive flag:
cwclock 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:
cwclock ai web-agent -a 0.0.0.0 -p 8081
The path / can be configured as an external AI adapter (usable directly from Aristochat) and the path /gitlab as a gitlab webhook if you set the following configurations:
cwclock configure set gitlab_base_url "https://gitlab.cwcloud.tech"
cwclock configure set gitlab_token "your_gitlab_token"
cwclock configure set gitlab_webhook_secret "your webhook secret"
Or with those environment variables:
export CWCLOCK_GITLAB_BASE_URL="https://gitlab.cwcloud.tech"
export CWCLOCK_GITLAB_TOKEN="your_gitlab_token"
export CWCLOCK_GITLAB_WEBHOOK_SECRET="your webhook secret"
List all the MCP tools availableβ
cwclock ai agent -p "list_mcp_dynamic_tools"
Note: a cwclock MCP server has to be running for this command to work