flightline discover
The discover command scans your repository to find AI operations. It builds a map of where your application interacts with LLMs, helping you understand the surface area of your AI features.
Usage
How it Works
Discovery uses static analysis and heuristics to identify:- SDK Verifications: Direct usage of supported LLM SDKs (OpenAI, Anthropic, etc.).
- Prompt Sources: Where prompts are defined (inline, files, or external APIs).
- Data Sinks: Where AI outputs are sent (database, user UI, external APIs).
- Risk Tiers: Assigns a risk level (Critical, High, Medium, Low) based on the sensitivity of inputs and the impact of the output sink.
Key Options
| Option | Description |
|---|---|
--output, -o | Path to save the discovery results (default: flightline.discovery.json). |
--languages, -l | Comma-separated list of languages to scan (e.g., python,typescript). |
--baseline | Path to a previous discovery file to compare against and show changes. |
--sync | Upload results to Flightline Mission Control (requires FLIGHTLINE_API_KEY). |
Output
The command generates aflightline.discovery.json file. This file includes:
- A list of all detected AI call sites.
- Inferred project context and domain.
- A “Scenario Space” mapping out the dimensions of variance in your inputs.
Example
Next Steps
Once discovery is complete, you can use the output to scaffold your project configuration or jump straight to learning from your data.Scaffold Config
Generate a
flightline.yaml from your discovery results.