Skip to main content

A context-aware coding assistant for everyone. Students, learners, anyone who doesn't want to pay for subscriptions.

Project description

Scrappy

Tests PyPI version License: MIT

23,000+ free AI coding requests per day. No subscriptions. No credit card. No geographic restrictions.

Scrappy orchestrates free-tier LLM providers (Cerebras, Groq, Gemini) into a context-aware coding assistant that understands your entire codebase.

Scrappy showing a diff preview before applying changes Scrappy shows diffs before making changes. You approve or reject each edit.


The Mission: AI for Everyone

Paid AI tools are great, but $20/month adds up. Scrappy exists for:

  • Students - Learn to code with AI help, without the subscription
  • Developers in restricted regions - Where payments are blocked or $20 is significant
  • Frugal folks - Build and learn without subscriptions.

Why Scrappy?

Tool Cost Context-Aware Agent Mode Offline Index
Scrappy Free Yes Yes Yes
ChatGPT Plus $20/mo No No No
Claude Pro $20/mo Limited Yes No
GitHub Copilot $10/mo Yes No No
Aider Free* Yes Yes No
Continue Free* Yes No No

* Requires your own API keys with usage-based billing. Scrappy uses providers with generous free tiers.


What You Get

  • Context-aware chat - Scrappy indexes your codebase locally; it knows your functions, classes, and patterns
  • Agent mode - /agent executes multi-step tasks with human approval at each step
  • Diff preview - See exactly what changes before they're applied (shown above)
  • Automatic checkpoints - Git-based rollback if anything goes wrong
  • Provider failover - When one API hits rate limits, Scrappy switches to another
  • Offline search - After initial setup, semantic code search runs entirely on your machine
  • Session persistence - Conversations auto-save; pick up where you left off

Quick Start

1. Install

pip install scrappy-ai

Or with a virtual environment:

# Mac/Linux
python3 -m venv venv && source venv/bin/activate && pip install scrappy-ai

# Windows (PowerShell)
python -m venv venv; .\venv\Scripts\activate; pip install scrappy-ai

2. Get Free API Keys

You need at least one (all three recommended for 23K+ daily requests):

Provider Free Tier Get Key
Cerebras 14,400 req/day cloud.cerebras.ai
Groq 7,000+ req/day console.groq.com
Gemini 1,650 req/day aistudio.google.com

No credit card required for any of them.

3. Run

cd your-project
scrappy

First run:

  1. Paste your API keys (stored locally, never sent anywhere)
  2. Scrappy downloads the embedding model (~33MB, one-time)
  3. Your codebase indexes in the background
  4. Start chatting immediately - no need to wait for indexing

Usage Examples

Chat Mode (default)

You: How does the authentication flow work?
You: What files handle database connections?
You: Explain the error handling in src/api/

Agent Mode

You: /agent add input validation to the signup form
You: /agent refactor UserService to use dependency injection
You: /agent write tests for the payment module

Agent mode shows you each proposed change as a diff. You approve, reject, or modify before anything is written.

Commands

/agent <task>    Run the coding agent with human approval
/help            Show all commands
/clear           Clear conversation history
/quit            Exit

See CLI Documentation for the full reference.


How It Works

  1. Indexing: BGE-small embeddings (33MB, runs locally) index your codebase into LanceDB
  2. Retrieval: Your questions trigger semantic search to find relevant code
  3. Orchestration: Scrappy routes requests across providers, handling rate limits automatically
  4. Response: Context-aware answers that understand your specific codebase

For the full architecture, see ARCHITECTURE.md.


FAQ

  • Q: Is this really free?

    • A: Yes. Cerebras, Groq, and Google offer generous free tiers. Scrappy just orchestrates them intelligently.
  • Q: What happens when rate limits hit?

    • A: Scrappy automatically fails over to the next available provider. With all three configured, you're unlikely to hit limits in normal use.
  • Q: Is my code private?

    • A: Scrappy has no servers. Code snippets are sent to the LLM providers (Cerebras/Groq/Google) to generate responses. Check their privacy policies. The local index never leaves your machine.
  • Q: What languages does it support?

    • A: All of them. The semantic search and LLMs are language-agnostic.
  • Q: Does it work offline?

    • A: Chat requires internet (to reach LLM APIs). Code indexing and search are fully offline after the initial 33MB model download.
  • Q: What if a provider removes their free tier?

    • A: Scrappy is modular. New providers can be added easily. As long as any free tier exists, Scrappy works.

Requirements

  • Python 3.11+
  • Git (for undo)
  • Windows, macOS, or Linux

Troubleshooting

"No API keys configured" Run scrappy and follow the setup wizard to add at least one key.

"Rate limit exceeded" Add more providers, or wait for the limit to reset (usually hourly/daily).

Indexing seems slow Large codebases take time on first run. Subsequent runs are incremental and fast.

Model download fails Check your internet connection. The BGE-small model downloads from Hugging Face.


Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.


Disclaimer

Use at your own risk. Always work from a clean git state so you can revert if needed. Scrappy creates checkpoints, but git is your ultimate safety net.


License

MIT License. Use it, modify it, share it.


If Scrappy helps you, star the repo so others can find it.

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

scrappy_ai-1.2.0.tar.gz (625.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrappy_ai-1.2.0-py3-none-any.whl (712.1 kB view details)

Uploaded Python 3

File details

Details for the file scrappy_ai-1.2.0.tar.gz.

File metadata

  • Download URL: scrappy_ai-1.2.0.tar.gz
  • Upload date:
  • Size: 625.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for scrappy_ai-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b80e6d84435a186e833fc7c7977feb760aadd3a1eac8dc22604078fa96fc8cc7
MD5 e12e635ddc91a1bb2df731b87626ec39
BLAKE2b-256 3afedcfa0dbc972dafb6f89a3cbb6648b31e868038cbc355527fdf1a4fa83c97

See more details on using hashes here.

File details

Details for the file scrappy_ai-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: scrappy_ai-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 712.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for scrappy_ai-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 02919144e48d081c9a7f05d6420abcc7743adc9c89c0c1856065c425e7495f8c
MD5 40b691865f87f2078de122623ec03c43
BLAKE2b-256 2e94a498e83c9d4da6cb6bf673f05e8c5f5020afbc2857c223cdb7aa3eb43b2c

See more details on using hashes here.

Supported by

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