CLI Reference¶
Director-AI ships a command-line interface for scoring, serving, benchmarking, and project scaffolding.
Commands¶
Scoring¶
# Score a single prompt/response pair
director-ai review "What is the capital of France?" "The capital is Berlin."
# Process with agent (generate + score)
director-ai process "What is the refund policy?"
# Batch score from JSONL
director-ai batch input.jsonl --output results.jsonl
Server¶
# Start REST server (default transport: http)
director-ai serve --port 8080 --workers 4
# Start gRPC server
director-ai serve --transport grpc --port 50051 --workers 4
# Health check (via curl, no dedicated CLI command)
curl http://localhost:8080/v1/health
Configuration¶
# Show current config
director-ai config
# Check runtime dependencies and model revision pins
director-ai doctor
# Show a named profile
director-ai config --profile medical
# Generate YAML config
director-ai config --export config.yaml
Project Scaffolding¶
# Create a new project with config, facts, and guard script
director-ai quickstart --profile medical
cd director_guard/
python guard.py
# Create and validate an authenticated production scaffold
director-ai quickstart --profile production
director-ai production-check --path director_guard
director-ai production-check --path director_guard --require-secrets
Benchmarking¶
# Run latency benchmark
director-ai bench
# Run with specific dataset
director-ai bench --dataset e2e
# Run regression suite
python -m benchmarks.regression_suite
Model Export¶
# Export to ONNX
director-ai export --format onnx --output ./models/onnx/
# Export to TensorRT
director-ai export --format tensorrt --output ./models/trt/
Guardrail Forensics¶
# Explain reviewed misses from tenant-safe eval records
director-ai forensics --input eval_records.json --format markdown
The input is either a JSON array of eval records or an object with a records
array. It may include director.eval.* attributes from the eval-trace layer plus
reviewer labels such as label: "hallucination" or label: "grounded".
Fine-Tuning¶
Managed Training¶
Managed training submissions use one CLI contract across local, portable, and
Vertex execution lanes. local runs on the current machine. portable emits a
provider-neutral container job request for AWS, Azure, Slurm, Kubernetes, or
other customer-owned orchestrators. vertex submits directly to Vertex AI when
the managed-training extra and cloud credentials are installed.
# Local dry run
director-ai train submit \
--backend local \
--dataset-uri ./train.jsonl \
--output-uri ./artifacts/customer-run-001 \
--dry-run
# Portable external-orchestrator contract
director-ai train submit \
--backend portable \
--dataset-uri s3://customer-data/train.jsonl \
--eval-uri azure://customer-data/eval.jsonl \
--output-uri file:///mnt/customer-artifacts/director-ai/run-001 \
--image registry.example.com/director-ai/train:2026-05 \
--dry-run
# Vertex managed submission
director-ai train submit \
--backend vertex \
--dataset-uri gs://customer-data/train.jsonl \
--eval-uri gs://customer-data/eval.jsonl \
--output-uri gs://customer-artifacts/director-ai/run-001 \
--project customer-project \
--region europe-west4 \
--image europe-west4-docker.pkg.dev/customer-project/director/train:2026-05
The portable backend is dry-run only by design. It redacts secret-looking environment variables in the emitted request and leaves live job lifecycle control to the customer's external orchestrator.
Threshold Tuning¶
Version¶
Global Options¶
| Flag | Description |
|---|---|
--config PATH |
YAML config file |
--profile NAME |
Named profile (fast, thorough, medical, etc.) |
--verbose |
Enable debug logging |
--json |
JSON output format |