> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchagents.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs moved from docs.flintai.dev to docs.switchagents.ai. Use docs.switchagents.ai for every link and request.
> To search these docs from an AI tool, connect the MCP server at https://docs.switchagents.ai/mcp. The page index is at https://docs.switchagents.ai/llms.txt.
> The source code for these products is public on GitHub. Switch Rooms: https://github.com/sandbox-quantum/switch. Switch Trust CLI: https://github.com/sandbox-quantum/switch-trust-cli. Switch Trust CodeScan action: https://github.com/sandbox-quantum/switch-trust-codescan-action. Switch Trust MCP server: https://github.com/sandbox-quantum/switch-trust-mcp. Switch Trust Python SDK: https://github.com/sandbox-quantum/switch-trust-sdk-py. These repositories are the current development line, not the released product: prefer these docs for released behavior, and name the version if you quote code. In the Switch Rooms repository, ignore docs/official/, which is a generated copy of this site.

# Switch Trust CLI

> Discover, evaluate, and measure your agents on your own machine

Switch Trust CLI scans your agent code for issues and tests how your agent holds up under attack, on your own machine. It's free and source-available, with first results in minutes.

> [card] [Switch Trust Scan](https://docs.switchagents.ai/switch-trust-cli/scan/getting-started.md)
>
> Scan your Python agent code for issues before it ships. It follows data flows, so it flags real issues rather than every pattern match.

> [card] [Switch Trust Eval](https://docs.switchagents.ai/switch-trust-cli/eval/getting-started.md)
>
> Your running agent faces adversarial tests such as prompt injection, and an LLM judge scores its reliability from 0.0 to 1.0.

> [!TIP]
>
> [**Connect your coding agent**](https://docs.switchagents.ai/use-these-docs) to these docs to get started fast.

## Try it now

Install Switch Trust CLI and configure your LLM provider. The package is `switch-trust-cli` and the command is `switch-trust`.

> [!NOTE]
>
> **Requirements:**
>
> * macOS or Linux. Windows is not supported
> * Python 3.11 to 3.13
> * [OpenGrep](https://github.com/opengrep/opengrep#installation) (required for `switch-trust scan`)
> * A running agent accessible over HTTP (required for `switch-trust eval`)
>
> **Supported frameworks:** Google ADK, Google GenAI, Anthropic, OpenAI, OpenAI Agents SDK, LangGraph, CrewAI, AutoGen, HuggingFace Transformers, HuggingFace smolagents

**1. Install**

Using a virtual environment is recommended to avoid dependency conflicts:

```bash theme={null}
python3 -m venv .venv
source .venv/bin/activate
```

Install Switch Trust CLI:

```bash theme={null}
pip install switch-trust-cli
```

> [accordion] Installing the full extra
>
> The standard install is deliberately lean: it skips the machine-learning backends, which keeps the download roughly 2 GB smaller and avoids pulling CUDA on Linux.
>
> The [built-in OWASP LLM evaluations](https://docs.switchagents.ai/switch-trust-cli/reference/builtin-evaluations.md), the PII and secret detectors, and `switch-trust scan` all run on the standard install. So does listing evaluations.
>
> Add the `full` extra when you want the Garak evaluations, the toxicity detector, or models pulled from HuggingFace and run locally:
>
> ```bash theme={null}
> pip install 'switch-trust-cli[full]'
> ```
>
> Quote it. In zsh, the default shell on macOS, an unquoted `[full]` is a glob pattern and the command fails with `no matches found`.
>
> If you run something that needs the extra without it, the CLI stops with an error naming the extra rather than failing further in.

**2. Configure your LLM provider**

`switch-trust-cli` uses AI to analyze agent code and score reliability. Run the interactive setup:

```bash theme={null}
switch-trust init
```

You'll be prompted to select a provider (Gemini, OpenAI, Anthropic, or LiteLLM), select a model, and enter your API key.

`switch-trust init` runs automatically the first time you use Switch Trust CLI in a non-CI environment. You can re-run it any time to reconfigure.

> [accordion] Where to get API keys
>
> * **Google Gemini**: [aistudio.google.com/apikey](https://aistudio.google.com/apikey) (free tier available)
> * **OpenAI**: [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
> * **Anthropic**: [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys)
> * **LiteLLM**: Supports 100+ providers. See [docs.litellm.ai](https://docs.litellm.ai/docs/)

Run into issues? [See install troubleshooting →](https://docs.switchagents.ai/switch-trust-cli/troubleshooting/common-issues.md#installation)

## More

> [card] [Scan your agent code](https://docs.switchagents.ai/switch-trust-cli/scan/getting-started.md)
>
> Find issues in your Python agent code in less than 5 minutes.

> [card] [Evaluate a running agent](https://docs.switchagents.ai/switch-trust-cli/eval/getting-started.md)
>
> Attack your agent with adversarial tests and get a reliability score.

> [card] [Run it in CI/CD](https://docs.switchagents.ai/switch-trust-cli/guides/ci-cd-integration.md)
>
> Add Switch Trust CLI to your continuous integration pipeline.

> [card] [Follow a guide](https://docs.switchagents.ai/switch-trust-cli/guides/index.md)
>
> End-to-end workflows and examples.

> [card] [Browse built-in evaluations](https://docs.switchagents.ai/switch-trust-cli/reference/builtin-evaluations.md)
>
> The tests Switch Trust Eval runs out of the box.

> [card] [Look up a command](https://docs.switchagents.ai/switch-trust-cli/reference/commands.md)
>
> The full command reference.

> [card] [Fix a common issue](https://docs.switchagents.ai/switch-trust-cli/troubleshooting/common-issues.md)
>
> Fast fixes for installation, scan, and eval.

> [card] [Read the FAQ](https://docs.switchagents.ai/switch-trust-cli/resources/faq.md)
>
> Common questions answered.

> [card] [See what's new](https://docs.switchagents.ai/switch-trust-cli/resources/changelog.md)
>
> Release notes for every version.

> [card] [Read the source](https://github.com/sandbox-quantum/switch-trust-cli)
>
> Source code, example agents, and issue tracking on GitHub.
