Skip to main content

CLI Overview

SynapseKit ships a command-line interface for two core tasks: serving any pipeline as a REST API and running evaluation test suites.

Installation

The CLI is installed automatically with the synapsekit package:

pip install synapsekit
synapsekit --version
# Expected output:
# synapsekit 1.2.0

The serve subcommand requires the [serve] extra:

pip install synapsekit[serve]

Subcommands

CommandDescription
synapsekit serveDeploy a RAG pipeline, graph workflow, or agent as a FastAPI REST API
synapsekit testDiscover and run @eval_case-decorated evaluation suites

Global flags

synapsekit --version     # Print version and exit
synapsekit --help # Show help
synapsekit serve --help # Subcommand help
synapsekit test --help # Subcommand help

Quick examples

# Serve a RAG pipeline
synapsekit serve my_app:rag --port 8000

# Serve with hot reload (development)
synapsekit serve my_app:rag --reload

# Run evaluation suite
synapsekit test tests/evals/ --threshold 0.8

# Run with JSON output (for CI)
synapsekit test tests/evals/ --format json

Auto-detection

synapsekit serve inspects the object you point it at and auto-detects its type:

Detected typeEndpoints created
RAG pipelinePOST /query, POST /stream, GET /health
Graph workflowPOST /run, POST /stream, GET /health
AgentPOST /run, POST /stream, GET /health

Detection is based on class name and MRO — any class named RAG*, *RAGPipeline, *Graph*, or *Agent* is detected automatically. You can override with --type rag|graph|agent.

Environment variables

VariableDescription
SYNAPSEKIT_LOG_LEVELLog level for CLI output (DEBUG, INFO, WARNING)

See also

  • serve — full synapsekit serve reference
  • test — full synapsekit test reference