# Audit Tools

## Count Lines of Code (cloc)

{% embed url="<https://github.com/AlDanial/cloc?tab=readme-ov-file#install-via-package-manager>" %}

```bash
 cloc ./src
 
 # OUTPUT
      16 text files.
      16 unique files.
       0 files ignored.

github.com/AlDanial/cloc v 2.00  T=0.02 s (917.5 files/s, 144913.9 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Solidity                        16            335            837           1355
-------------------------------------------------------------------------------
SUM:                            16            335            837           1355
-------------------------------------------------------------------------------
```

## VCS Solidity Metrics Report&#x20;

{% embed url="<https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-metrics>" %}

## Slither

{% embed url="<https://github.com/crytic/slither>" %}

Use Docker to avoid Python dependency issues.

### Installation

{% code title="Pull latest image" %}

```bash
docker pull trailofbits/eth-security-toolbox
```

{% endcode %}

{% code title="Run and enter container" %}

```bash
docker run -it -v <PATH_TO_PROJECT_ROOT>:/share trailofbits/eth-security-toolbox
```

{% endcode %}

### Usage

{% code title="Slither commands inside container" %}

```bash
slither .                 # Run on all files
slither src/AavePM.sol    # Run on specific files
```

{% endcode %}

## Aderyn

{% embed url="<https://github.com/Cyfrin/aderyn>" %}

### Installation

```bash
curl -L https://raw.githubusercontent.com/Cyfrin/aderyn/dev/cyfrinup/install | bash
```

```bash
cyfrinup
```

### Usage

```bash
aderyn .
```


---

# 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.eridian.xyz/ethereum-dev/auditing/audit-tools.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.
