@bellatricks/audit-ai

1.0.1 • Public • Published

@bellatricks/audit-ai

Analyze smart contracts using Gemini AI

This CLI tool allows you to audit and analyze Solidity smart contracts using Gemini AI. It checks for vulnerabilities, gas optimization issues, and more.

Features

  • Analyzes Solidity smart contracts.
  • Uses Gemini AI to identify potential security risks and performance improvements.
  • Provides a comprehensive report on contract vulnerabilities and suggestions for optimization.

Installation

Install the package globally using npm:

npm install -g @bellatricks/audit-ai

Usage

Once installed, you can use the audit-ai command in your terminal to analyze smart contracts.

Commands

Analyze a Smart Contract

Use the check command followed by the path to the Solidity file you want to analyze:

audit-ai check <path-to-smart-contract>

For example:

audit-ai check contracts/MyContract.sol

Example

audit-ai check contracts/MyContract.sol

You will be prompted to enter your Gemini API key:

Enter your Gemini API key:

After providing your API key, the tool will analyze your smart contract and display the results in your terminal.

Setup

To use this tool, you need a valid Gemini API key. If you don't have one, visit the Gemini website to obtain it.

API Key Prompt

When you run the check command, you will be prompted to enter your API key. The key will be used for analyzing your smart contract and generating an audit report.

Example Prompt:

Enter your Gemini API key:

Requirements

  • Node.js v12 or above.
  • A valid Gemini AI API key.

Project Structure

.
├── bin
│   └── audit-ai.js        # Entry point for the CLI
├── src
│   └── ai-prompt.js       # Handles contract analysis using Gemini AI
├── package.json           # NPM package configuration
└── README.md              # Documentation

Contributing

We welcome contributions! If you'd like to improve this package, please submit a pull request or open an issue.

License

This project is licensed under the MIT License.


Package Sidebar

Install

npm i @bellatricks/audit-ai

Weekly Downloads

113

Version

1.0.1

License

MIT

Unpacked Size

9.36 kB

Total Files

5

Last publish

Collaborators

  • bellatricks