Skip to main content
The SQR CLI is a single-file Python script for managing records, templates, and API keys from the terminal.

Install

pip install requests
curl -o sqr https://raw.githubusercontent.com/your-org/yys-sqr-render/main/cli/sqr.py
chmod +x sqr
Or clone the repo and run directly:
python3 cli/sqr.py <command>

Configure

Save your API URL and key so you don’t have to pass them every time:
sqr configure
This creates ~/.sqr/config.json:
{
  "api_url": "https://yys-sqr-render-bsbe.onrender.com",
  "api_key": "your-api-key"
}

Commands

Health check

sqr health

Templates

sqr templates list
sqr templates get pharma

Records

# List all records
sqr records list

# Get a specific record
sqr records get SQR-A1B2C

# Create a record
sqr records create -t pharma -i label.jpg \
  --set product_name="Aspirin" \
  --set dosage="100mg"

# Update metadata
sqr records update SQR-A1B2C --set dosage="200mg"

Scanning

sqr scan photo.jpg

Embedding

sqr embed -i label.jpg -m A1B2C

API keys

sqr keys create --name "ci-pipeline"
sqr keys list
sqr keys revoke 3

Environment variables

Instead of sqr configure, you can set environment variables:
export SQR_API_URL="https://yys-sqr-render-bsbe.onrender.com"
export SQR_API_KEY="your-api-key"
Environment variables take precedence over ~/.sqr/config.json.