A Python package and GitHub Action for integrating Jules architecture planning into your development workflow.
This package simplifies interfacing with the Jules API from GitHub Actions. It allows you to automatically generate architecture and implementation plans for issues and pull requests directly within GitHub.
pip install jules-plannerThis package is designed to be used primarily within a GitHub Actions workflow.
-
Set up secrets:
JULES_API_KEY: Your Jules API key (Get it from Jules Settings).GITHUB_TOKEN: Automatically provided by GitHub Actions.
-
Create a workflow file: (e.g.,
.github/workflows/jules-plan.yml)name: Jules Architecture Planning on: issue_comment: types: [created] permissions: contents: read issues: write pull-requests: write jobs: plan: if: contains(github.event.comment.body, '@jules plan') runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' - name: Install Jules Planner run: pip install jules-planner - name: Generate Plan env: JULES_API_KEY: ${{ secrets.JULES_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: jules-planner
You can also use the client directly in your Python scripts:
from jules_planner import JulesPlanner
planner = JulesPlanner(
api_key="your-api-key",
repo_owner="owner",
repo_name="repo"
)
# ... use planner methods ...The CLI tool expects the following environment variables:
JULES_API_KEY: Required. Your Jules API key.GITHUB_REPOSITORY: The repository name inowner/repoformat (automatically set in GitHub Actions).GITHUB_EVENT_PATH: Path to the event payload file (automatically set in GitHub Actions).GITHUB_TOKEN: GitHub token for API access (automatically set in GitHub Actions).
MIT