Skip to Content
CLI ReferenceOverview

CLI Reference

The @launchgate/cli is a command-line tool for running LaunchGate evaluations from the terminal, shell scripts, or CI/CD pipelines.

Installation

npm install -g @launchgate/cli

Quick example

export LAUNCHGATE_API_KEY=lg_live_your_key_here launchgate run rag-faithfulness \ --output "The Eiffel Tower was built in 1889." \ --input '{"context": "The Eiffel Tower was completed in 1889.", "query": "When was it built?"}'

Output:

✓ Cleared for launch Pass rate: 100% (3/3) Duration: 842ms Run ID: run_abc123 ✓ Contains source citation 1.0 / 1.0 ✓ Factual accuracy 0.9 / 0.7 ✓ No hallucination 1.0 / 0.8

Exit codes

CodeMeaning
0Run cleared or skipped
1Run aborted or errored

This makes it easy to use in CI/CD pipelines — a non-zero exit code fails the pipeline step.

Last updated on