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 authenticationORQ_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
Metadata
Release files for orq-cli 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| orq_cli-0.1.4.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| orq_cli-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.9 kB
Release files / orq_cli-0.1.4.tar.gz
| Download URL | orq_cli-0.1.4.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca6f58165cd64f009c28a1ab6b1caf928f82b6611cb08d1950eef35ce7b276d9
|
|
BLAKE2b-256 checksum How to use checksums |
abee5d9e1d8b56d3070feeeef46ff349e25a31ff9b3867ec562a023102dc584e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / orq_cli-0.1.4-py3-none-any.whl
| Download URL | orq_cli-0.1.4-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1297e4583b2aa7f8a6a6ea1a1a81ce68acb2725a0c58f2e8964215c587d907d5
|
|
BLAKE2b-256 checksum How to use checksums |
e85fcc1773a84286dcd28b384bd84aae49d1856d17c3cc055c81e391aba5b62a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|