AgentOps-AI / Spellcaster

AI agent to automatically check grammar and spelling on documentation files
MIT License
59 stars 6 forks source link
agent agentops ai grammar grammar-checker grammarly spelling spelling-correction

Spellcaster Logo

AI spelling and grammar checker for documentation

🐦 Twitter   β€’   πŸ“’ Discord   β€’   πŸ–‡οΈ AgentOps

Python 3.10+ License: MIT

Spellcaster is an open-source CLI tool that uses AI to improve your codebase's documentation. It scans repositories for:

Spellcaster helps identify potential problems to help you write clear, concise, and professional documentation.

https://github.com/user-attachments/assets/60dbfdb1-d5a6-4dfd-9707-37e60d60b24e

To run Spellcaster:

pip install spellcaster
spellcaster -d /path/to/your/docs/directory/

Screenshot

πŸ¦‰ Features

Installation

  1. Install package:

    pip install spellcaster
  2. Set up environment variables:

    Create a .env file in your project root and add the following variables:

    AGENTOPS_API_KEY=your_agentops_api_key
    ANTHROPIC_API_KEY=your_anthropic_api_key
    OPENAI_API_KEY=your_openai_api_key
    GROQ_API_KEY=your_groq_api_key

Spellcaster uses AgentOps for cost and latency tracking. You can sign up for an API key here.

Replace your_*_api_key with your actual API keys for each service.

Usage

To run Spellcaster:

  1. In your terminal, use the following command structure:

    spellcaster [options]

    Options:

    • -d, --directory: The directory to scan
    • -u, --url: The GitHub repository URL to clone and scan
    • -l, --llm_provider: The LLM provider to use (choices: claude, sonnet, 3.5, gpt4o, gpt4, gpt3.5; default: MODEL from config)
    • -p, --proper_nouns: A string of proper nouns to include in the prompt (default: " Llama3.1-70B\n Cerebras\n Cohere\n OpenAI\n AgentOps\n Spellcaster")
    • -f, --file_types: File types to scan (default: from FILE_TYPES in config)
    • -m, --max_files: Maximum number of files to scan (default: MAX_FILES from config)
  2. Examples:

    Scan a local directory with custom LLM provider:

    spellcaster --directory /path/to/your/docs --llm_provider gpt4

    Scan a GitHub repository:

    spellcaster --url https://github.com/username/repo
  3. Spellcaster will analyze the specified directory or repository and output any detected issues, along with suggestions for fixing them.

Configuration

You can customize Spellcaster's behavior by adjusting the config.py file: