Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

txt2cql

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

txt2cql

Convert input text into a valid Centreon Query Language request

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

Python   OpenAI   experimental   interface

txt2cql

txt2cql is a command-line tool designed to convert input text into a valid Centreon Query Language (CQL) request. The generated CQL is automatically copied to your clipboard, ready to be pasted into the research bar of the resource status page in Centreon.

Demo Animation

Installation

Installing pipx

From their documentation:

On macOS:
brew install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
On Linux:
Ubuntu 23.04 or above
sudo apt update
sudo apt install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
Fedora:
sudo dnf install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
Using pip on other distributions:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions in global scope. See "Global installation" section below.
On Windows:
Install via Scoop:
scoop install pipx
pipx ensurepath
Install via pip (requires pip 19.0 or later)
# If you installed python using Microsoft Store, replace `py` with `python3` in the next line.
py -m pip install --user pipx
py -m pipx ensurepath

It is possible (even most likely) the above finishes with a WARNING looking similar to this:

WARNING: The script pipx.exe is installed in `<USER folder>\AppData\Roaming\Python\Python3x\Scripts` which is not on PATH

If so, go to the mentioned folder, allowing you to run the pipx executable directly. Enter the following line (even if you did not get the warning):

.\pipx.exe ensurepath

This will add both the above mentioned path and the %USERPROFILE%.local\bin folder to your search path. Restart your terminal session and verify pipx does run.

Installing txt2cql

pipx install git+https://github.com/CentreonLabs/txt2cql

Export OpenAI API key

For the tool to work, you need to export your OpenAI API key as an environment variable. You can do this by adding the following line to your shell configuration file (e.g., ~/.bashrc, ~/.zshrc, etc.):

export OPENAI_API_KEY="your-api-key"

Usage

txt2cql all ping services for all linux hosts

> s.description:ping h.name:linux

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc