Thanks for your interest in contributing! This document explains how to get a development environment running and how to submit changes.
- Bug reports: open a GitHub Issue with steps to reproduce, your OS, Python version, and the relevant log lines
- Feature requests: open an issue describing the use case
- Bug fixes and improvements: open a Pull Request (PR)
- Documentation: corrections, translations, and clarifications are always welcome
git clone https://github.com/its-benjamin/muse2api.git
cd muse2api
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .envRun the service locally:
python run.pyThe test suite uses no real muse.ai accounts and consumes no generation quota:
python tests/test_session_health.py # account-health logic
python tests/test_media_selection.py # media-selection regression
python tests/test_async_images.py # async image task logic
python tests/test_vm_wait.py engine.py --assert # VM wait behaviourIf Chromium is not on PATH, set:
MUSE2API_CHROMIUM=/path/to/chromium python tests/test_media_selection.py- Fork the repo and create a branch:
git checkout -b fix/your-fix-name - Make your changes; keep them focused, one logical change per PR
- Run the tests above and make sure they pass
- Commit with a clear message:
fix: describe what changed and why - Push to your fork and open a PR against
its-benjamin/muse2api:main
type: short description
Optional longer explanation.
Types: fix, feat, docs, refactor, test, chore
- Python: follow the existing style (no formatter enforced; just keep it readable)
- Avoid adding new dependencies unless necessary
- Keep Chinese comments/strings only where they serve as DOM-matching regex alternatives (e.g.
/发送|send/i): these are intentional and must not be removed
If you find a security vulnerability, please do not open a public issue. Email the maintainer directly or use GitHub's private vulnerability reporting.
All core reverse-engineering and architecture credit belongs to @czg86389-hub and the LINUX DO community. Please credit them in any derivative work.