A developer CLI for Jules API automation
Project description
jules-cli
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.
🚀 Quick Start (User View)
Prerequisites
- Python 3.8+
pip
One-command installation
pip install jules-cli
Usage Example
# Initialize and setup API keys
jules init
# Fix tests automatically
jules auto
✨ Key Features
- God Level: Proactive Suggestions:
jules suggestscans your codebase to identify security holes, missing tests, and technical debt before they become problems. - God Level: Automated Test Fixer:
jules autoruns pytest, sends failures to the API, and autonomously applies fixes. - Flaky Test Detection: Automatically detects flaky tests by re-running failures (
jules auto --detect-flaky). - God Level: Intelligent Test Generation:
jules testgengenerates comprehensive tests for your code (jules testgen src/utils.py). - AI-Powered Refactoring: Perform repository-wide refactors with natural language instructions (
jules refactor "Migrate to Python 3.11"). - Development Assistant: Issue arbitrary tasks like bug fixes or feature additions (
jules task "Add a retry mechanism to the HTTP client"). - Stateful Interactive REPL: Chat with your codebase in real-time (
jules interact). - TUI Dashboard: Launch a rich terminal interface for a visual experience (
jules tui). - Workspace Automation: Run commands across multiple repositories defined in a workspace (
jules workspace run). - Multi-Platform PR/MR Support: Create Pull Requests/Merge Requests for GitHub, GitLab, and Bitbucket (
jules pr create). - Git Hooks: Install pre-commit hooks to run jules checks automatically (
jules hooks install). - Session Management: Track, review, and resume your interactive sessions (
jules session list,jules history view). - Interactive Staging: Selectively stage changes with a user-friendly interface (
jules stage). - Environment Doctor: Validate your setup and dependencies (
jules doctor). - Secure Credential Storage: Safely stores API keys in your system keyring (
jules auth login) instead of plain text files. - Self-Update Mechanism: Keep your CLI up-to-date with
jules upgrade. - Shell Completion: Native tab-completion support for Bash, Zsh, and Fish shells (
jules --install-completion).
⚙️ Configuration & Advanced Usage (Dev View)
Environment Variables
JULES_API_KEY: Your Jules API key.GITHUB_TOKEN: Your GitHub token for PR creation.
CLI/API Table
| Command | Description | Arguments | Options |
|---|---|---|---|
init |
Interactive setup wizard. | ||
auth login |
Interactively set API keys securely. | ||
config get/set |
Manage configuration values. | key, value |
|
config list |
List all configuration. | ||
auto |
Run tests and auto-fix failures. | --runner (-r), --detect-flaky |
|
testgen |
Generate tests for a given file. | file_path |
--type (-t) |
refactor |
Run a repository-wide refactor. | instruction |
|
task |
Ask Jules to perform an arbitrary dev task. | prompt |
|
suggest |
Proactively scan and suggest improvements. | --focus (-f), --security, --tests, --chore |
|
interact |
Start an interactive chat session. | prompt |
|
tui |
Launch the Jules TUI. | ||
workspace run |
Run command across multiple repos. | command |
|
approve |
Approve the plan for the current session. | session_id |
|
reject |
Reject the plan for the current session. | session_id |
|
session list |
List active sessions. | ||
session show |
Show active session details. | session_id |
|
history list |
List all past sessions. | ||
history view |
View details of a past session. | session_id |
|
apply |
Apply last patch received. | ||
commit |
Commit & create branch after apply. | --message (-m), --type (-t) |
|
push |
Push branch to origin. | ||
pr create |
Create a PR/MR (GitHub/GitLab/Bitbucket). | --title, --body, --draft, --labels, --reviewers, --assignees, --issue |
|
hooks install |
Install Jules pre-commit hooks. | ||
stage |
Interactively stage changes. | ||
doctor |
Run environment validation checks. | ||
upgrade |
Self-update the Jules CLI. |
Global Options:
--debug: Enable debug logging.--verbose: Enable verbose logging.--no-color: Disable colored output.--json: Output in JSON format.--pretty: Pretty-print JSON output.
🏗️ Architecture
jules-cli/
│
├── src/
│ └── jules_cli/
│ ├── commands/ # Individual command modules (auto.py, task.py, etc.)
│ ├── core/ # Jules API interaction
│ ├── git/ # Git utilities
│ ├── patch/ # Patch application logic
│ ├── testing/ # Test runner integration
│ ├── utils/ # Shared helpers (logging, config)
│ ├── cli.py # Main entry point (Typer app)
│ └── ...
│
├── tests/ # Test suite
├── config.toml # Configuration file
├── pyproject.toml # Project metadata and dependencies
└── README.md # Documentation
The jules-cli is a Python-based command-line interface powered by the typer library. The core logic is organized into several modules within the src/jules_cli directory. cli.py serves as the main entry point, aggregating sub-commands from the commands/ directory. The application uses a global state (_state) to manage session data across commands and secure storage (keyring) for credentials.
🗺️ Roadmap
Upcoming
- Spec-First Mode: Generate specs, then code, then tests.
- AI-powered merge conflict resolver: Intelligent conflict resolution strategies.
- Enhanced Workspace Support: Deeper integration for monorepos and multi-repo setups.
Completed
- Automated test fixer:
jules auto - Proactive Suggestions:
jules suggest - Intelligent Test Generation:
jules testgen - Interactive REPL:
jules interact - Multi-Platform PR/MRs:
jules pr create - Workspace Automation:
jules workspace run - Secure Auth: Keyring integration.
- Self-Updates:
jules upgrade
🤝 Contributing & License
Contributions, bug reports, and feature requests are welcome. Please refer to the FEATURE_PROPOSAL_TEMPLATE for more information.
This project is licensed under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jules_cli-16.0.0.tar.gz.
File metadata
- Download URL: jules_cli-16.0.0.tar.gz
- Upload date:
- Size: 56.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69a33baa17c988cc85ea7d30d629bdd270f8354f3634e7cc51a19466aa668fe3
|
|
| MD5 |
d7030071fe4d4aeffa584914f4b6a586
|
|
| BLAKE2b-256 |
a79d98c64137845a07a12dd165011e578199e85e1b2145a776875de02c79af33
|
Provenance
The following attestation bundles were made for jules_cli-16.0.0.tar.gz:
Publisher:
publish.yml on dhruv13x/jules-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jules_cli-16.0.0.tar.gz -
Subject digest:
69a33baa17c988cc85ea7d30d629bdd270f8354f3634e7cc51a19466aa668fe3 - Sigstore transparency entry: 747468128
- Sigstore integration time:
-
Permalink:
dhruv13x/jules-cli@03643235d5c5efc34eeed891feedad247ed3114e -
Branch / Tag:
refs/tags/v16.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03643235d5c5efc34eeed891feedad247ed3114e -
Trigger Event:
push
-
Statement type:
File details
Details for the file jules_cli-16.0.0-py3-none-any.whl.
File metadata
- Download URL: jules_cli-16.0.0-py3-none-any.whl
- Upload date:
- Size: 51.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ec8c9a74885ebe2de785ccbb8fb4402955a8ad72ee5c6b927859743801a48a
|
|
| MD5 |
219c27c6b169ae22848fae04844ca55a
|
|
| BLAKE2b-256 |
6b7f99100fb976b7cba0d55637dcf72ae3e921facb01c07bf6708530a20f1fde
|
Provenance
The following attestation bundles were made for jules_cli-16.0.0-py3-none-any.whl:
Publisher:
publish.yml on dhruv13x/jules-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jules_cli-16.0.0-py3-none-any.whl -
Subject digest:
f0ec8c9a74885ebe2de785ccbb8fb4402955a8ad72ee5c6b927859743801a48a - Sigstore transparency entry: 747468130
- Sigstore integration time:
-
Permalink:
dhruv13x/jules-cli@03643235d5c5efc34eeed891feedad247ed3114e -
Branch / Tag:
refs/tags/v16.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@03643235d5c5efc34eeed891feedad247ed3114e -
Trigger Event:
push
-
Statement type: