opper-cli

Use the Opper CLI (oppercli) for terminal-based AI task completion, function management, knowledge base operations, model configuration, trace inspection, and usage analytics. Activate when users want to call Opper functions from the command line, manage indexes, inspect traces, track costs, or configure models via terminal.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "opper-cli" with this command: npx skills add opper-ai/opper-skills/opper-ai-opper-skills-opper-cli

Opper CLI

Command-line interface for the Opper platform. Call functions, manage knowledge bases, configure models, inspect traces, and track usage from your terminal.

Installation

Homebrew (macOS):

brew tap opper-ai/oppercli git@github.com:opper-ai/oppercli
brew install opper

Binary download (macOS ARM64):

sudo curl -o /usr/local/bin/opper https://github.com/opper-ai/oppercli/releases/latest/download/opper-darwin-arm64
sudo chmod 755 /usr/local/bin/opper

Other platforms: download from GitHub Releases (opper-linux-amd64, opper-darwin-amd64, etc.).

Configuration

Set up your API key:

opper config add default <your-api-key>

Use multiple configurations with the --key flag:

opper config add staging <staging-api-key>
opper call --key staging myfunction "instructions" "input"

Core Command: call

Execute an Opper function from the terminal:

# Basic call
opper call myfunction "respond in kind" "what is 2+2?"

# With a specific model
opper call --model anthropic/claude-4-sonnet myfunction "summarize this" "long text..."

# Pipe input from stdin
echo "what is 2+2?" | opper call myfunction "respond in kind"

Commands Overview

CommandDescription
callExecute a function with instructions and input
functionsList, get, chat with, and run evaluations on functions
indexesManage knowledge base indexes (list, get, create, delete, add, query, upload)
modelsRegister, list, get, test, delete custom models, and list builtins
tracesInspect execution traces
usageTrack usage analytics, tokens, and costs by tags
configManage API key configurations
versionDisplay CLI version

Function Chat

Interactive chat with a function:

opper functions chat myfunction "Hello there!"
echo "Hello there!" | opper functions chat myfunction

Model Management

Register custom models (uses LiteLLM identifiers):

# Register an Azure-deployed model
opper models create my-gpt4 azure/my-gpt4-deployment my-api-key '{"api_base": "https://my.openai.azure.com", "api_version": "2024-02-01"}'

# List registered models
opper models list

# List built-in models
opper models builtin

# Get details of a model
opper models get my-gpt4

# Test a model interactively
opper models test my-gpt4

# Delete a model
opper models delete my-gpt4

Usage Tracking

Query usage analytics with filtering and grouping:

# Usage for a date range grouped by tag
opper usage list --from-date=2025-05-15 --to-date=2025-05-16 --fields=total_tokens --group-by=model

# Time-precise query (RFC3339 format)
opper usage list --from-date=2025-05-15T14:00:00Z --to-date=2025-05-15T16:00:00Z --granularity=minute

# Export as CSV
opper usage list --out=csv

Note: cost and count are always included automatically. Valid --fields values: total_tokens, prompt_tokens, completion_tokens. Do NOT pass count as a field.

Global Flags

FlagDescription
--debugEnable diagnostic output
--key <name>API key configuration to use (default: "default")
-h, --helpShow help for any command

Common Mistakes

  • Missing config: Run opper config add default <key> before using any commands.
  • Wrong argument order for call: It's opper call <function> <instructions> <input>, not opper call <instructions> <function> <input>.
  • Model identifiers: Use LiteLLM format (azure/deployment-name, anthropic/claude-4-sonnet), not raw model names.
  • Piping with chat: When piping, the function name still comes first: echo "hi" | opper functions chat myfunction.

Additional Resources

Related Skills

  • opper-api: Use when you need the full REST API reference for HTTP-based integrations.
  • opper-python-sdk: Use when building Python applications with the Opper SDK.
  • opper-node-sdk: Use when building TypeScript applications with the Opper SDK.

Upstream Sources

When this skill's content may be outdated, resolve using this priority:

  1. Installed CLI — run opper --help and subcommand help to check current commands and options
  2. Source code: https://github.com/opper-ai/oppercli

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

opper-python-agents

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

opper-python-sdk

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

opper-node-agents

No summary provided by upstream source.

Repository SourceNeeds Review