-
Notifications
You must be signed in to change notification settings - Fork 0
Contribute to TJBot
TJBot: Community Edition is an open source project and contributions are welcome! This page covers the basic workflow for setting up a local development environment for hacking on TJBot's software libraries.
TJBot's TypeScript workflow is centered around a local checkout of the node-tjbotlib library and linking it to your recipes.
TJBot's Node.js library is called node-tjbotlib and is implemented in Typescript. Create a fork of the node-tjbotlib repository and check it out locally. We recommend placing it under ~/.tjbot so it is easy to find and reuse across recipes.
mkdir -p ~/.tjbot
cd ~/.tjbot
git clone <your-fork-url-of-node-tjbotlib>
cd node-tjbotlibRun npm link inside node-tjbotlib so npm knows about your local copy of the package.
npm linkThis creates a global symlink for the package and makes it available to local recipes without publishing a new version.
In directory of the recipe you want to work on, link the local tjbot package name to your checkout of node-tjbotlib.
cd /path/to/your-recipe
npm link tjbot-ceTip
If you want to update your recipe to use the node-tjbotlib version from npmjs.com, you can unlink the local library via npm unlink --no-save tjbot-ce && npm install.
As you make changes within node-tjbotlib, run the standard quality checks -- formatting, linting, and testing -- before you open a pull request.
npm run format
npm run lint
npm run testThese task runners keep the code formatted consistently, catches style and correctness issues, and rebuilds and runs the test suite.
TJBot's Python workflow is centered around a local checkout of the python-tjbotlib library and linking it to your recipes.
TJBot's Python library is called python-tjbotlib. Create a fork of the python-tjbotlib repository and check it out locally. We recommend placing it under ~/.tjbot so it is easy to find and reuse across recipes.
mkdir -p ~/.tjbot
cd ~/.tjbot
git clone <your-fork-url-of-python-tjbotlib>
cd python-tjbotlibIn directory of the recipe you want to work on, link the local tjbot package name to your checkout of python-tjbotlib.
cd /path/to/your-recipe
uv add --editable ~/.tjbot/python-tjbotlibTip
If you want to update your recipe to use the python-tjbotlib version from pypi.org, you can unlink the local library via uv add my_python_lib && uv sync.
As you make changes within python-tjbotlib, run the standard quality checks -- formatting, linting, and testing -- before you open a pull request.
mise run format
mise run lint
mise run testThese task runners keep the code formatted consistently, catches style and correctness issues, and rebuilds and runs the test suite.
Please keep pull requests focused and easy to review.
- Open or reference an issue before starting work, especially for larger changes.
- Keep the scope of each PR narrow when possible.
- Describe what changed, why it changed, and how you verified it.
- Include tests or explain why a test is not practical.
- Update documentation when the user-facing behavior changes.
- Avoid unrelated refactors in the same PR.
- Call out hardware requirements, setup changes, or migration steps in the PR description.
Use clear commit messages that explain the change. Include a Signed-off-by line in your commit or PR description to satisfy the Developer Certificate of Origin (DCO).
Example:
Signed-off-by: Your Name <you@example.com>
Use this short checklist before you submit changes:
- The code is formatted.
- Lint passes.
- Tests pass.
- Documentation is updated if behavior changed.
- The change is easy to review.
- The PR description includes any setup or verification notes the reviewer needs.
Note: If you see an issue with this Wiki, please open a Wiki issue