Skip to main content

Unofficial CLI tool for orq.ai LLM Ops platform

Project description

ORQ CLI

Command line interface for the orq.ai LLM Ops platform.

Installation

pip install orq-cli

Quick Start

Configure API Key

Set your API key using one of these methods:

# Using the CLI
orq config set api_key YOUR_API_KEY

# Using environment variable
export ORQ_API_KEY=YOUR_API_KEY

Basic Usage

# List deployments
orq deployments list

# Invoke a deployment with a message
orq invoke my-deployment -m "Hello, world!"

# Invoke with variables (for prompt templates)
orq invoke my-deployment -v firstname=John -v city=Paris

# Combine variables and message
orq invoke my-deployment -v customer=John -m "Help me with my order"

# Stream a response
orq invoke my-deployment -v topic=AI --stream

# Interactive mode
orq --interactive

Passing Variables

When your deployment has prompt templates with placeholders like {{firstname}} or {{city}}, pass them using -v or --var:

# Using --var (recommended)
orq invoke customer-service -v firstname=John -v city=Paris -v language=English

# Multiple variables
orq deployments invoke my-key -v name=Alice -v topic="machine learning" -v format=markdown

# Using JSON (alternative)
orq deployments invoke my-key --inputs '{"firstname": "John", "city": "Paris"}'

Commands

Deployments

orq deployments list                              # List all deployments
orq deployments invoke KEY -v name=value          # Invoke with variables
orq deployments stream KEY -v name=value          # Stream with variables
orq deployments get-config KEY                    # Get deployment configuration

Datasets

orq datasets list                       # List datasets
orq datasets create --name "My Dataset" # Create a dataset
orq datasets get DATASET_ID             # Get dataset details
orq datasets delete DATASET_ID          # Delete a dataset

# Datapoints
orq datasets datapoints list DATASET_ID
orq datasets datapoints create DATASET_ID --inputs '{"key": "value"}'

Files

orq files list                          # List files
orq files upload path/to/file.txt       # Upload a file
orq files get FILE_ID                   # Get file details
orq files delete FILE_ID                # Delete a file

Knowledge Bases

orq knowledge list                      # List knowledge bases
orq knowledge search KB_ID --query "search term"
orq knowledge datasources list KB_ID    # List datasources
orq knowledge chunks list KB_ID DS_ID   # List chunks

Prompts

orq prompts list                        # List prompts
orq prompts get PROMPT_ID               # Get prompt details

Contacts

orq contacts create EXTERNAL_ID --name "John Doe" --email "john@example.com"

Feedback

orq feedback create TRACE_ID --field rating --value 5

Configuration

orq config show                         # Show configuration
orq config set KEY VALUE                # Set a config value
orq config get KEY                      # Get a config value
orq config path                         # Show config file path

Quick Shortcuts

# Quick list any resource
orq list deployments
orq list datasets
orq list files

# Quick invoke with message
orq invoke DEPLOYMENT_KEY -m "message"

# Quick invoke with variables
orq invoke DEPLOYMENT_KEY -v firstname=John -v city=Paris

# Quick invoke with streaming
orq invoke DEPLOYMENT_KEY -v topic=AI -m "Explain this" --stream

Interactive Mode

Run the CLI in interactive mode for a guided experience:

orq --interactive
# or
orq -i

Output Formats

All commands support different output formats:

orq deployments list --output table   # Default, pretty table
orq deployments list --output json    # JSON output
orq deployments list --output yaml    # YAML output

Configuration File

Configuration is stored in ~/.orq/config.yaml:

api_key: your-api-key
environment: production
output_format: table

Environment Variables

  • ORQ_API_KEY: API key for authentication
  • ORQ_ENVIRONMENT: Default environment (production, staging, etc.)

Development

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with coverage
pytest --cov=orq

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orq_cli-0.1.4.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orq_cli-0.1.4-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file orq_cli-0.1.4.tar.gz.

File metadata

  • Download URL: orq_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for orq_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ca6f58165cd64f009c28a1ab6b1caf928f82b6611cb08d1950eef35ce7b276d9
MD5 61669dd10df5caf253a75134237376a5
BLAKE2b-256 abee5d9e1d8b56d3070feeeef46ff349e25a31ff9b3867ec562a023102dc584e

See more details on using hashes here.

File details

Details for the file orq_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: orq_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for orq_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1297e4583b2aa7f8a6a6ea1a1a81ce68acb2725a0c58f2e8964215c587d907d5
MD5 6eb106cfffc54a446227fb86afe36fb3
BLAKE2b-256 e85fcc1773a84286dcd28b384bd84aae49d1856d17c3cc055c81e391aba5b62a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page