CodeAssist is a completely private and local AI coding assistant, developed by Gensyn. It helps you practice programming problems and train a novel assistant to help you code.
Unlike typical code assistants, CodeAssist writes directly in your editor as you work. Every keystroke - whether you type, fix, delete, or leave its output untouched - becomes a learning signal. Over time, it adapts to your habits and style, acting more like an apprentice learning from your craft than a tool following commands.
Docs | Tutorial | Leaderboard
Get started with installing CodeAssist.
Install Docker on your system, according to the instructions for your machine.
Python is required to run the main script that handles your environment. We require a version no older than 3.10.
UV is required to manage the dependencies of the main script. It can be installed with the following steps:
brew install uvcurl -LsSf https://astral.sh/uv/install.sh | shTo download the code, simply clone the repository:
git clone https://github.com/gensyn-ai/codeassist.git
cd codeassistTo run CodeAssist, simply execute the following command:
uv run run.pyTo start CodeAssist, you will need to have a HuggingFace token. Follow these instructions and generate a token with Write access.
After the script is running, your browser should open automatically but if it doesn't, open a window and go to localhost:3000 to open CodeAssist.
When the web UI loads, you'll see a login modal where you can log in with email (which sends a one-time passcode) or with Google. After logging in for the first time, your local credentials will be stored in persistent-data/auth/userKeyMap.json.
Once logged in, you can select Easy, Medium, or Hard problems from the sidebar. CodeAssist will begin recording an episode. Every click, keystroke, edit, or deletion is logged as training feedback.
When you stop typing, CodeAssist takes initiative. It writes directly into your file without any pop-ups or confirmations. Whether you accept, modify, or remove its edits, each interaction contributes to the model’s understanding of your preferences.
- Use
Shift+Spaceor click the Pause Assistant button to temporarily stop the assistant. The first keystroke after pausing will unpause it. - Keep your cursor near the section you're working on, as CodeAssist inserts code relative to your cursor position.
- When the assistant produces a "No-Op" (does nothing), it's waiting for you. This is intentional and signals it's your turn to act.
CodeAssist continuously records your interactions while the web UI is running. To complete an episode and train your model, press Ctrl+C in the terminal where CodeAssist is running.
You do not need to successfully solve a LeetCode problem to train the model. You can stop recording the episode by leaving the CodeAssist web UI, returning to the terminal CodeAssist is running in, and using the ctrl+c command to start training.
During training, CodeAssist will:
- Compare your edits to the assistant's actions
- Calculate rewards and penalties based on your interactions
- Update your local model checkpoint
- Store new model weights under
persistent-data/trainer/models - Upload your trained model to Hugging Face (if a valid token is provided)
After training completes (which takes a few minutes depending on your system), you can restart CodeAssist to use your updated model trained on your most recent episode.
- Be patient: The assistant watches your typing and timing. Working too quickly or aggressively correcting can neutralize training efficacy.
- Treat it as a collaborator: Let it naturally interject code and keep useful code around briefly before editing or removing.
- Don't delete everything instantly: If you delete everything it writes right away, you're teaching it to stop acting altogether.
- Record multiple varied problems: Diversify its learning signals by working on different problems.
- Expect gradual improvement: Early episodes may feel inconsistent. Improvement becomes clearer after 4-5 episodes of training.
This occurs when a container fails to boot. You can view the logs by running docker logs <container-name>. Please review and upload the logs when creating a new issue.
2025-09-04 15:03:47,975 - ERROR - Error connecting to Docker daemon: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2025-09-04 15:03:47,976 - ERROR - Please ensure Docker is installed and running.
If you see lines like the above, it means Docker is not running, or you do not have permission to connect to Docker. Make sure Docker is properly installed on your system and running.
This occurs when there is already a Docker container running that uses port 3000. You have two options:
- Stop the other service that is using the port (e.g., if you are running RL Swarm).
- Run CodeAssist on a different port using the
--portargument:
uv run run.py --port 3001Note: When choosing a new port, please avoid
8000,8080,8001,8008,3003, and11434, as they are reserved for other CodeAssist services.
We welcome contributions!
We use a pre-commit hook to run linting on the repository before committing. You can install pre-commit as described below:
To install pre-commit, simply run the below command
pip install pre-commitTo set up pre-commit, run this command
pre-commit installThis repository is formatted with ruff format. Any commits which do not meet Ruff's lint checks will have GitHub actions fail, and will need to be fixed before merging.
CodeAssist is released under the (MIT) license.