Skip to main content

An open-source tool that leverages AI agents to enhance the quality of your codebase by scanning repositories for grammar, spelling, and code example errors in documentation files.

Project description

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:

  • Grammar errors
  • Spelling mistakes
  • Issues in code examples

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

To run Spellcaster:

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

Screenshot

🦉 Features

  • Grammar and Spelling Checks: Spellcaster reviews your documentation and comments to ensure they are clear, correct, and professional.
  • Comprehensive File Scanning: Spellcaster reads across multiple file formats (Markdown, plain text, etc.) to detect issues.

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:

  • FILE_TYPES: A list of file extensions to scan. By default, it includes .mdx and .md files. You can add or remove file extensions as needed.
  • MAX_FILES: The maximum number of files to scan. By default, it's set to 500. You can change this number to suit your needs.
  • MODEL: The default LLM provider to use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spellcaster-0.0.2.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

spellcaster-0.0.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file spellcaster-0.0.2.tar.gz.

File metadata

  • Download URL: spellcaster-0.0.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for spellcaster-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4256d221a4920aa69f76c6585f9a1ecbf3c4c5e96b0fbd3b9cc48369c7fd71f3
MD5 77fb6bfa77e00066ee5eccc46497f630
BLAKE2b-256 1a23d1690970f3edf47281e08080d725b12ebc1c953468ea0951e181f90ff56d

See more details on using hashes here.

File details

Details for the file spellcaster-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: spellcaster-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for spellcaster-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81249d716f2e6b0fe7ef01fe1959548e583b1d7e779e8ac196975ea3e1fd5b8a
MD5 2c6e669c2101bb3e6791fac5d270b5ca
BLAKE2b-256 465e1e6a39740e8e2ff59400bf36268d8116ea0c646a9d8b3a4e679acd50d4ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page