# Install trufflehog on Windows, macOS and Linux

Find and verify leaked credentials in git history, files, buckets and more.

TruffleHog finds leaked credentials and then tests them. For hundreds of credential types it asks the service whether the key still works, so you know which findings matter. It scans git history, GitHub organisations, file systems, S3 buckets and more.

## How to install trufflehog

```
ot install trufflehog
```

ot downloads trufflehog 3.100.1 as a prebuilt binary from [github.com/trufflesecurity/trufflehog](https://github.com/trufflesecurity/trufflehog/releases) and verifies its SHA-256 checksum before installing it. Nothing has to be compiled. A Docker image is available as well: `ot install trufflehog --method docker`.

If you do not have ot yet:

macOS and Linux:

```
curl -fsSL https://otinstaller.com/install.sh | sh
```

Windows (PowerShell):

```
irm https://otinstaller.com/install.ps1 | iex
```

Current version: 0.3.0. Both scripts verify the download against its [SHA-256 checksum](https://otinstaller.com/releases/v0.3.0/checksums.txt) before installing.

## How to use trufflehog

Arguments after the tool's name go straight to trufflehog.

Scan a repository and show only credentials that still work.

```
ot run trufflehog git https://github.com/example/repo --results=verified
```

Scan every repository of a GitHub organisation.

```
ot run trufflehog github --org=example
```

Scan a folder and print JSON.

```
ot run trufflehog filesystem ./project --json
```

`ot run trufflehog --help` lists every option.

An AI agent can run trufflehog too: `ot mcp` serves it over the Model Context Protocol. See [OSINT with AI agents](https://otinstaller.com/mcp/).

## trufflehog licence, platforms and versions

- Project: https://github.com/trufflesecurity/trufflehog
- Licence: AGPL-3.0
- Runs on: Windows, macOS and Linux
- Takes: repository, directory, url
- Categories: secrets, code
- Sends traffic to the target: no
- Release binary: version 3.100.1 from github.com/trufflesecurity/trufflehog, verified by SHA-256
- Docker image: trufflesecurity/trufflehog, with --method docker

## Questions about trufflehog

### How do I install trufflehog on Windows?

Open PowerShell and install ot with `irm https://otinstaller.com/install.ps1 | iex`. Then run `ot install trufflehog`. ot fetches a pinned version of trufflehog and keeps it under `~/.ot`, apart from the rest of your system.

### Is trufflehog free?

Yes. trufflehog is open source, released under the AGPL-3.0 licence. ot, which installs it, is free under the Apache 2.0 licence.

### Do I need Go or a compiler to install trufflehog?

No. ot downloads the prebuilt trufflehog binary for your platform and checks its SHA-256 checksum. A mismatch installs nothing.

### How do I update or remove trufflehog?

`ot update trufflehog` moves it to the version pinned in ot's registry, and `ot update trufflehog --latest` to the newest upstream release. `ot remove trufflehog` uninstalls it.

## Tools related to trufflehog

- [gitleaks](https://otinstaller.com/tools/gitleaks/): Find secrets and API keys committed to git repositories and files.
- [cariddi](https://otinstaller.com/tools/cariddi/): Crawl a site for endpoints, secrets, API keys and interesting files.

More: [Secrets and cloud](https://otinstaller.com/osint-tools/secrets/).
