Skip to content

CLI Reference

CRP includes a command-line interface for shell-based workflows and pipeline composition.

Installation

The CLI installs automatically with the SDK:

pip install crprotocol
crp --help

Commands

crp dispatch

Run a dispatch from the command line:

crp dispatch \
  --system "You are a technical writer." \
  --task "Write a guide to Kubernetes networking." \
  --provider ollama \
  --model llama3.1

crp init

Initialize a new CRP session with persistent CKF storage:

crp init --app-id my-project --ckf-path ./knowledge_base

crp status

Check session status:

crp status --session-id <session-id>

crp serve (HTTP Sidecar)

Start CRP as an HTTP service for polyglot deployments:

crp serve --port 9470 --provider ollama --model llama3.1

This exposes a REST API on http://localhost:9470 that any language can call. See HTTP Sidecar for details.

Pipeline Composition

CRP's CLI composes with standard Unix tools:

# Pipe document content through CRP
cat document.txt | crp dispatch \
  --system "Summarize this document." \
  --provider ollama --model llama3.1

# Process multiple files
for f in docs/*.txt; do
  crp dispatch --system "Extract key facts." --task "$(cat $f)" >> facts.txt
done

Environment Variables

Variable Purpose Example
OPENAI_API_KEY OpenAI provider auth sk-...
ANTHROPIC_API_KEY Anthropic provider auth sk-ant-...
CRP_PROVIDER Default provider ollama
CRP_MODEL Default model llama3.1
CRP_CKF_PATH Default CKF storage path ~/.crp/ckf

Global Options

Flag Description
--verbose / -v Enable detailed logging
--quiet / -q Suppress non-essential output
--json Output in JSON format
--version Show CRP version