Metadata-Version: 2.4
Name: jules-planner
Version: 0.1.0
Summary: GitHub Action integration for Jules API architecture planning
License: MIT License
        
        Copyright (c) 2024 Jules AI
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/maravedi/InferSpect
Project-URL: Repository, https://github.com/maravedi/InferSpect
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: license-file

# Jules Planner

A Python package and GitHub Action for integrating [Jules](https://jules.google.com) architecture planning into your development workflow.

## Overview

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.

## Installation

```bash
pip install jules-planner
```

## Usage

### As a GitHub Action

This package is designed to be used primarily within a GitHub Actions workflow.

1.  **Set up secrets:**
    *   `JULES_API_KEY`: Your Jules API key (Get it from [Jules Settings](https://jules.google.com/settings#api)).
    *   `GITHUB_TOKEN`: Automatically provided by GitHub Actions.

2.  **Create a workflow file:** (e.g., `.github/workflows/jules-plan.yml`)

    ```yaml
    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
    ```

### As a Python Library

You can also use the client directly in your Python scripts:

```python
from jules_planner import JulesPlanner

planner = JulesPlanner(
    api_key="your-api-key",
    repo_owner="owner",
    repo_name="repo"
)

# ... use planner methods ...
```

## Configuration

The CLI tool expects the following environment variables:

*   `JULES_API_KEY`: Required. Your Jules API key.
*   `GITHUB_REPOSITORY`: The repository name in `owner/repo` format (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).

## License

MIT
