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 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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orq_cli-0.1.0.tar.gz.
File metadata
- Download URL: orq_cli-0.1.0.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37dff3667614e97dafbf81f8a514491fbe80d56e661e3754c57720c67da88e1d
|
|
| MD5 |
a49ce138e9e7791a1ce2bc8f451d387d
|
|
| BLAKE2b-256 |
cebc9da4d1237a95c86c737c02ce05131fa510119ba9a5877e7b92ca0d06b99d
|
File details
Details for the file orq_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orq_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0049de7261d6a1efc341b6d385f7d00b3f35a2cc1e8504daa91526d2f4d771c5
|
|
| MD5 |
89841ac5fe67b31ad32e6486b4562e29
|
|
| BLAKE2b-256 |
0cea25d3bfc3d54a2307a579bac703a25f50b73563928fbe33a740373d058769
|