The AI-powered command line tool for working with legacy code
Project description
Menderbot
The AI-powered command line tool for working with legacy code. Designed based on the principles of the Mechanized Mending Manifesto.
Status
Menderbot is usable in development of itself - a very small codebase. For instance, it's used on this project for first drafts of commit messages, it added most of the type annotations, and chat usually gives relevant answers. On codebases of an interesting size (> 10K lines) there is still much work to do.
Commands implemented (-ish):
menderbot ask
: Ask a question about the codebasemenderbot chat
: Interactively chat about the codebasemenderbot commit
: Git commit the current changeset with a pre-populated commit messagemenderbot diff
: Summarize the differences between two versions of a codebasemenderbot doc
: Generate documentation for the existing code (Python only)menderbot review
: Review a code block or changeset and provide feedbackmenderbot type
: Insert type hints (Python only)menderbot ingest
: Index the current state of the repo forask
andchat
commandsmenderbot check
: Verify we have what we need to run
System requirements
- git
- Python 3.9+
- The environment variable
OPENAI_API_KEY
set to a valid OpenAI API Key.
Running
Clone the project...
Install an editable version.
python -m pip install -e .
Then run with menderbot
in any repo.
Installing from Pip
Not yet supported, install from a local checkout for now. Upvote this issue if you're interested.
Developing
Clone the project...
git clone git@github.com:craftvscruft/menderbot.git
Then you can initialize your Python environment using venv.
python -m venv venv
source venv/bin/activate
pip install "." ".[dev]"
If you want to re-generate the Antlr parsers, see PARSERS.md, but you probably won't need to.
Pre-commit
Formatting, linting, tests, and type-checking can all be run through pre-commit, configured in .pre-commit-config
.
pre-commit run --all-files
Install this as a git hook with pre-commit install
.
Or you can run individual steps
isort menderbot tests
black menderbot tests
pylint --disable=C,R menderbot
pytest
mypy
Author
👤 Ray Myers
- YouTube: Craft vs Cruft
- Twitter: @lambdapocalypse
- GitHub: @raymyers
- LinkedIn: @cadrlife
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a ⭐️ if this project helped you!
Acknowledgements
- OpenAI GPT and Ada models
- LlamaIndex, an LLM data framework
- Antlr parser generator
📝 License
Copyright © 2023 Ray Myers.
This project is Apache 2 licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for menderbot-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6006f7a7b7224cdd9327c1d0dc9464bbd92a9addb4307463f3764dbe3053da |
|
MD5 | 34365c93a570b571e148c077e7401e42 |
|
BLAKE2b-256 | f4117fd3fd99d411ba11ef2cb6b5058db8e39a2d7ac0f58b5314c76365ef74fe |