Skip to main content

A developer CLI for Jules API automation

Project description

jules-cli

PyPI Version Python Versions License GitHub Workflow Status

A fully automated developer assistant CLI built on the Jules API (Googleโ€™s experimental code automation system).
jules-cli lets you run tests, fix bugs, apply patches, refactor code, and even create GitHub pull requests โ€” all from your terminal.

Designed for real-world workflows, CI pipelines, and local debugging sessions.


๐Ÿš€ Features

๐Ÿ”ง Automated Test Fixer

  • Runs pytest
  • Sends failures to the Jules API
  • Receives automated patches or PRs
  • Applies patches locally
  • Re-runs tests
  • Optional auto-push + auto-PR via GitHub

๐Ÿค– AI-Powered Development Assistant

Issue natural-language commands:

jules task "refactor the user login service" jules task "add test coverage for payment workflows" jules task "fix NullPointer bug in auth module"

Jules performs the work in a dedicated session and returns patches or PRs.

๐Ÿ” Stateful Interactive REPL

Run:

jules

And access a full command shell:

auto task "..." apply commit push pr create session list session show last exit

๐Ÿ›  GitHub Integration

  • Auto-creates branches
  • Auto-commits and auto-pushes
  • Automatically creates PRs using GITHUB_TOKEN

๐Ÿ” Trusted Auth

Uses Google's Jules API with the X-Goog-Api-Key header.
Secure, isolated, and simple.


๐Ÿ“ฆ Installation

From PyPI (recommended)

pip install jules-cli

From source (editable)

git clone https://github.com/dhruv13x/jules-cli cd jules-cli pip install -e .


โš™๏ธ Environment Setup

Before using the CLI, set:

1. Jules API Key

export JULES_API_KEY="your_key_here"

2. GitHub Token (optional, for PR creation)

export GITHUB_TOKEN="ghp_xxx..."

(Optional) Set your Git identity:

git config --global user.name "Your Name" git config --global user.email "you@example.com"

3. Configuration File (optional)

You can also store your API key and other settings in a configuration file located at ~/.config/jules/config.toml.

[jules]
api_key = "your_key_here"

[github]
token = "ghp_xxx..."

๐Ÿงช Usage

Open the REPL

jules

Youโ€™ll see:

Jules Interactive CLI โ€” fully immersive developer assistant.

Commands: auto task "instruction" apply commit push pr create session list ...


๐Ÿ“˜ Command Guide

๐Ÿ”ฅ auto โ€“ Automatic pytest debugging

Runs pytest โ†’ detects failures โ†’ sends to Jules โ†’ applies patch or PR.

jules> auto

๐Ÿ“ task "<instruction>" โ€“ Tell Jules anything

Examples:

jules> task "refactor utils.py to remove duplicated logic" jules> task "add unit tests for create_dump function" jules> task "fix failing integration test for redis manager"

๐Ÿฉน apply โ€“ Apply the last patch Jules returned

jules> apply

๐ŸŒฟ commit โ€“ Auto-create branch & commit patch

jules> commit

๐Ÿš€ push โ€“ Push current branch

jules> push

๐Ÿ”— pr create โ€“ Create GitHub pull request

Requires GITHUB_TOKEN.

jules> pr create

๐Ÿ” session list โ€“ View recent Jules sessions

jules> session list

๐Ÿ“– session show <id> โ€“ Inspect a session

jules> session show 1234567890

๐Ÿ“ฆ last โ€“ Show last session + result

jules> last

๐Ÿฉบ doctor โ€“ Check your environment

Verifies that your environment is correctly configured to run jules-cli. Checks for:

  • JULES_API_KEY
  • GITHUB_TOKEN (optional)
  • Git installation
  • Internet connectivity

๐Ÿงฉ Example Workflow

Fix test failure automatically

jules
jules> auto
jules> apply
jules> commit
jules> push
jules> pr create

Request refactor

jules> task "Refactor bot_platform/init_manager for clarity"
jules> apply

Add tests

jules> task "Add pytest tests for projectclone cli"


---

๐Ÿ— Project Structure

jules-cli/
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ jules_cli/
โ”‚       โ”œโ”€โ”€ cli.py
โ”‚       โ””โ”€โ”€ __init__.py
โ”‚
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ .github/workflows/publish.yml


---

๐Ÿ”„ Release Workflow (PyPI Trusted Publisher)

To publish a new version:

1. Update version in pyproject.toml

version = "1.1.0"

2. Commit and push

git add .
git commit -m "Release 1.1.0"
git push

3. Create tag

git tag v1.1.0
git push origin v1.1.0

GitHub Actions will automatically build & publish to PyPI.


---

๐Ÿ›ก License

This project is licensed under the MIT License.
See LICENSE for details.


---

๐Ÿค Contributing

Contributions, bug reports, and feature requests are welcome.

1. Fork the repo


2. Create a feature branch


3. Add your changes


4. Submit a PR




---

โญ Support the Project

If you like this tool:

โญ Star the repo

๐Ÿ—ฃ Share ideas

๐Ÿงช Open issues and feature requests



---

๐Ÿ’ฌ Feedback Welcome

Feel free to open an issue or reach out anytime โ€” the goal is to make jules-cli the most powerful local automation assistant for developers.

---

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jules_cli-11.0.2.tar.gz (36.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jules_cli-11.0.2-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file jules_cli-11.0.2.tar.gz.

File metadata

  • Download URL: jules_cli-11.0.2.tar.gz
  • Upload date:
  • Size: 36.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jules_cli-11.0.2.tar.gz
Algorithm Hash digest
SHA256 b68a35bd082c7b0535d58618f4cbeae956d3c51c4bfb72f6d9aa7c2ea4e98c12
MD5 9940a3131a3d1b338c1975a005f00e87
BLAKE2b-256 67d877903531d5c1b364a93e728178cb1a02a56175a06d3cc1d5f3377ae75df8

See more details on using hashes here.

Provenance

The following attestation bundles were made for jules_cli-11.0.2.tar.gz:

Publisher: publish.yml on dhruv13x/jules-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jules_cli-11.0.2-py3-none-any.whl.

File metadata

  • Download URL: jules_cli-11.0.2-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jules_cli-11.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5eb70ef6796c7cbff4dbb9c2dc29ddd6d0fc547a27a393abf99fd697945b5795
MD5 1c0f9ed4e0ce561cf663ac4b4fa10b06
BLAKE2b-256 eb370466094aeb51187e3b0940ba41596ecb66c01f39207584d5006322206f7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for jules_cli-11.0.2-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/jules-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page