https://docs.sweep.dev/assistant [banner]HomeHomeEmailEmail (opens in a new tab)Sweep ProSweep Pro (opens in a new tab) [ ] GitHub (opens in a new tab) Discord (opens in a new tab) [ ] * What's Sweep? * Getting Started * Sweep Assistant * Self-Host * Usage + Tutorial: Solving an Example Ticket with Sweep + Advanced Sweep Features: becoming a Power User + Config: Customize Sweep using sweep.yaml + Extra Self Hosting Configurations + Sandbox: Giving Sweep Dev Tools * About + Examples + Limitations + Roadmap * FAQ * Blogs + Releasing our Open Source LLM Framework + Playground! + Large Language Models are Bad at Refactoring Code + [?] A Simple Proxy for Azure and OpenAI raised our GPT4 TPM limit by 24x + Having GPT-4 Iterate on Unit Tests like a Human + Zero Downtime Deployment with < 50 lines of bash + [?] How an AI plans code changes across an entire GitHub Repository + [?] AI Junior Dev meets Super-Linter + Why getting GPT-4 to modify files is hard + When you should handle tech debt + Self Hosting an AI Junior Developer + Improving LlamaIndex's Code Chunker by Cleaning Tree-Sitter CSTs + How our AI junior dev reads all of your documentation + Sweep's Core Algorithm + [?][?] Generating 50k+ embeddings in 25 seconds using GTE and MapReduce + Chunking 2M+ files a day for Code Search using Syntax Trees + Letting an AI Junior Dev run GitHub Actions + Code Search Infra for an AI junior developer - that doesn't store code + Understanding your codebase with ctags + [?] Building a code search engine in one day + GPT 32k, Open-source, DeepLake [?], GPT Functions Search and more! + Index * Videos + Introducing Sweep + [?] Adding a Banner to our Landing Page using Sweep + AI Junior Dev Refactors Itself + Adding Walrus Operator to our Code using Sweep + AI junior developer adds an easter egg to our logo * Privacy Policy On This Page * Installation (2 min) * Usage (After Installation) * Set Repository Path * Select a files for Sweep to edit * Add Instructions * Generate Code * Checking your Code Question? Give us feedback - (opens in a new tab)Edit this page Sweep Assistant Sweep Assistant Sweep is a locally running dev tool that codes alongside you. To preserve your security, Sweep will only send code to your OpenAI endpoint. If you use Azure OpenAI, all of your code will stay within your network. Sweep Assistant Installation (2 min) Prerequisites 1. OpenAI API key(https://platform.openai.com (opens in a new tab)) 2. Node.js v18+(https://nodejs.org/en/download/ (opens in a new tab)). Use npm install -g n && n 18 to use Node.js v18. Install Sweep by running the following command in your terminal: npm (recommended)curl terminal npm i -g sweepai && npx sweepai build npx sweepai Having Trouble 1. If you see a build error, you may be on version 16 of Node.js. You can upgrade to version 18 by running the following command: terminal npm install -g n && n 18 2. If you see a permissions issue, you can fix it by running the following command: terminal sudo (npm i -g sweepai && npx sweepai build) You can run npx sweepai to start Sweep in the future. To update the assistant, run terminal npm update -g sweepai && npx sweepai build Disabling Telemetry We collect telemetry (not code) to improve the assistant, such as the types of tasks you're asking Sweep to handle. To disable telemetry, add NEXT_PUBLIC_NO_TELEMETRY=true to your .env in your Sweep Assistant directory. You can find where the Sweep directory is cloned by running which sweep. For example, if which sweep yields sweep: aliased to npm start --prefix /home/bob/sweep/platform, then you would run: terminal cd /home/bob/sweep echo "NEXT_PUBLIC_NO_TELEMETRY=true" >> platform/.env Usage (After Installation) Set Repository Path You can run pwd to use your current working directory. Select a files for Sweep to edit Click "Modify file" or "Create file". Add Instructions Add meticulous instructions for the code to edit. You can type @ to mention a file. Generate Code Click "Generate Code" to run the assistant. Then click the check mark to approve the change or the reload to reject the change. Checking your Code We highly recommended that you add a checks to your assistant. There are two types of checks: 1. Validation Script: runs after every edit. We recommend using a formatter and linter to catch syntax errors and undefined variables. 2. Test Suite: runs after all edits are complete. Why do we need a validation script? Human developers identify syntax errors using visual cues like syntax highlighting and red squiggles, which is unavailable to LLMs. The best way for LLMs to detect such errors is to use a formatter to check the syntax and a linter for catching undefined variables. Here are some example scripts we recommend: PythonJavascript / Typescript Validation Script python3 -m py_compile < $FILE_PATH pylint $FILE_PATH --errors-only Test Suite pytest $FILE_PATH Make sure to click the "Run Tests" button to test the script. You may want to provide the full path to the CLI tools (e.g. /home/ kevin/.cache/pypoetry/virtualenvs/sweepai-u_abcdefg-py3.10/bin/black) if you are using a custom virtual environment. You may also want to run python -m pylint or python3 -m pylint instead of pylint. Getting Started Self-Host --------------------------------------------------------------------- Sweep AI (c) 2024