# Running a Safety Scan

### 📝 Run your first security scan

Running your first scan in the command line only takes a few seconds.

Open up your command line / terminal interface and navigate to the Python repository or codebase you want to run a security scan on.

Download our Safety CLI from PyPi:

```
// pip install safety
```

Run the security scan using Safety. You can find your API key on your account dashboard when you create an account or log into Safety.

```
// safety check --key <your_api_key>
```

In this example, Safety is scanning your local Python environment for every package or dependency that is installed and checking it against our industry-leading Python Dependency Vulnerability database.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.safetycli.com/safety-2/safety-2.x-basics/running-a-safety-scan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
