Skip to main content

LLM Audit README

Overview

LLM Audit is a CLI tool designed to scan GitHub repositories or local directories for the usage of Large Language Models (LLMs). It aggregates usage statistics, identifies top LLM providers, and generates a comprehensive report.

This tool was built in response to security engineers needing a streamlined way to gather and report on the use of LLMs across codebases in their organization. We quickly built LLM Audit to replace those custom scripts.

Installation

To install LLM Audit, ensure you have Python 3.8 or higher installed, then run:

pip install llmaudit

Usage

LLM Audit can be used in two modes: scanning GitHub repositories or scanning local directories.

Scanning GitHub Repositories

To scan GitHub repositories, use the github command followed by the repositories you wish to scan. You can specify additional options such as a temporary directory for cloning, whether to keep the cloned repos, and a timeout for cloning.

llmaudit github [--repos <repo1> <repo2>] [--temp-dir <dir>] [--keep] [--timeout <seconds>]

  • --repos: Names of the GitHub repositories to scan. Scans all repos if not specified.
  • --temp-dir: Temporary directory to clone repositories into. Default is llm_usage_temp.
  • --keep: Keep the temporary folder after cloning. By default, the folder is deleted.
  • --timeout: Timeout for cloning each repository in seconds. Default is 300 seconds.

Scanning Local Directories

To scan local directories, use the local command followed by the paths to the directories you wish to scan.

llmaudit local --repos <path1> <path2> ...

  • --repos: Paths to the local directories to scan. Required.

Report Generation

After scanning, LLM Audit generates an HTML report detailing the usage of LLMs across the scanned repositories or directories. The report includes total usage counts, usage by LLM provider, top owners, and statistics by repository.

The report is saved in the results directory with a filename that includes the current date, e.g., llm_usage_report_DD-MM-YYYY.html.

Security and Privacy

LLM Audit does not send any data externally. All processing and report generation are done locally on your machine.

Supported Provider SDKs and Languages

  • Mistral : Python, JS/TS
  • OpenAI : Python, JS/TS
  • Anthropic: Python, JS/TS

Contributing

Contributions to LLM Audit are welcome! Expanding provider/language and platform support are top of mind, but any other suggestions are welcome!

License

LLM Audit is licensed under the Apache Software License. See the LICENSE file for more details.

Contact

For questions or support, please contact founders@promptarmor.com.

Metadata

Release files for llmaudit 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmaudit 0.1.3
File Size Uploaded
llmaudit-0.1.3.tar.gz 14.8 kB Details

Release files / llmaudit-0.1.3.tar.gz

Download URL llmaudit-0.1.3.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
00cdcaef9b1a10f1e8503c6e989439a1fdf701c31fbd29d5b9adfe64789de7e8
BLAKE2b-256 checksum
How to use checksums
917b71d5273ac285f842c06c98133438de6a1c049863b7ae1ef23f24db84f230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page