Skip to main content

Quickwit CLI

We also provide a CLI called qwctl to interact with Quickwit. You can use it to ingest or search documents and also use it as MCP server for your AI agents.

qwctl_1

Installation​

Choose the installation mode that suits your operating system and follow the instructions.

Homebrew​

First installation:

brew tap qwctl/qwctl https://gitlab.cwcloud.tech/oss/quickwit/homebrew-qwctl.git
brew install qwctl

Upgrade:

brew update
brew upgrade qwctl

Curl​

Linux​

Linux x86 (64 bit)​
version="1.0.3"
curl -L "https://gitlab.cwcloud.tech/oss/quickwit/qwctl/-/releases/v${version}/downloads/qwctl_${version}_linux_amd64.tar.gz" -o "qwctl_cli.tar.gz"
mkdir qwctl_cli && tar -xf qwctl_cli.tar.gz -C qwctl_cli
sudo ./qwctl_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.0.3"
curl -L "https://gitlab.cwcloud.tech/oss/quickwit/qwctl/-/releases/v${version}/downloads/qwctl_${version}_linux_arm64.tar.gz" -o "qwctl_cli.tar.gz"
mkdir qwctl_cli && tar -xf qwctl_cli.tar.gz -C qwctl_cli
sudo ./qwctl_cli/install.sh

Beware of checking if the version is available in the releases because we only keep the 5 last builds.

For MacOS​

MacOS x86/arm (64 bit)​
version="1.0.3"
curl -L "https://gitlab.cwcloud.tech/oss/quickwit/qwctl/-/releases/v${version}/downloads/qwctl_${version}_darwin_all.tar.gz" -o "qwctl_cli.tar.gz"
mkdir qwctl_cli && tar -xf qwctl_cli.tar.gz -C qwctl_cli
sudo ./qwctl_cli/install.sh

Beware of checking if the version is available in the releases because we only keep the 5 last builds.

For Windows​

Windows x86 (64 bit)​
version="1.0.3"
curl -L "https://gitlab.cwcloud.tech/oss/quickwit/qwctl/-/releases/v${version}/downloads/qwctl_${version}_windows_amd64.zip" -o "qwctl_cli.zip"
unzip qwctl_cli.zip
cd qwctl_cli
qwctl.exe

Beware of checking if the version is available in the releases because we only keep the 5 last builds.

Windows arm (64 bit)​
version="1.0.3"
curl -L "https://gitlab.cwcloud.tech/oss/quickwit/qwctl/-/releases/v${version}/downloads/qwctl_${version}_windows_arm64.zip" -o "qwctl_cli.zip"
unzip qwctl_cli.zip
cd qwctl_cli
qwctl.exe

Installation of quickwit using the CLI​

qwctl bootstrap

Available flags:

  • -r or --release: Release name for deployment (default: qwctl)
  • -n or --namespace: Namespace to use for deployment (default: qwctl)
  • -k or --keep-dir: Keep the local helm directory
  • -d or --recreate-ns: Recreate the namespace
  • -o or --openshift: Use openshift cli instead of kubectl
  • -p or --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:

qwctl bootstrap -r my-release -n production --value key=value --value values-override.yaml

Configuration​

qwctl configure
qwctl configure set format pretty
qwctl configure set endpoint https://quickwit.changeit.org
qwctl configure set basic_auth_username <your user>
qwctl configure set basic_auth_password <your password>
qwctl configure set authorization_header_name Authorization
qwctl configure set authorization_header_value "Basic <your base64 encoded credentials>"

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.

List the indexes​

qwctl list
qwctl list -p "otel-*" # list indexes with a name starting with "otel-"

Search logs​

qwctl search
qwctl search -i "otel-logs-v0_7" -q "*"
qwctl search -i "my-index" -q "foo:bar" --format json --jq ".foo" --max 100

Ingest documents​

qwctl ingest -i "my-index" -b '{"foo": "bar", "time": "2024-01-01T00:00:00Z"}'
qwctl ingest -i "my-index" -f "data.json"

AI MCP & Agents​

Create MCP server​

qwctl ai mcp
qwctl ai mcp -l 127.0.0.1 -p 8080 -e /mcp

Create agent calling the mcp server​

qwctl ai agent -p "List the indexes"
qwctl 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:

qwctl configure set openai_api_key "your_key"
qwctl configure set anthropic_api_key "your_key"
qwctl configure set openrouter_api_key "your_key"
qwctl configure set deepseek_api_key "your_key"
qwctl configure set gemini_api_key "your_key"
qwctl configure set mistral_api_key "your_key"

You can also use environment variables instead:

export QWCTL_OPENAI_API_KEY="your_key"
export QWCTL_ANTHROPIC_API_KEY="your_key"
export QWCTL_OPENROUTER_API_KEY="your_key"
export QWCTL_DEEPSEEK_API_KEY="your_key"
export QWCTL_GEMINI_API_KEY="your_key"
export QWCTL_MISTRAL_API_KEY="your_key"

Note: you can also use interactive mode to create your agent with -i or --interactive flag:

qwctl 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:

qwctl 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:

qwctl configure set gitlab_base_url "https://gitlab.cwcloud.tech"
qwctl configure set gitlab_token "your_gitlab_token"
qwctl configure set gitlab_webhook_secret "your webhook secret"

Or with those environment variables:

export QWCTL_GITLAB_BASE_URL="https://gitlab.cwcloud.tech"
export QWCTL_GITLAB_TOKEN="your_gitlab_token"
export QWCTL_GITLAB_WEBHOOK_SECRET="your webhook secret"

List all the MCP tools available​

qwctl ai agent -p "list_mcp_dynamic_tools"

Note: a qwctl MCP server has to be running for this command to work