Skip to main content

A developer CLI for Jules API automation

Project description

jules-cli logo

PyPI version Python Wheel Release

Build status Codecov Test Coverage Code style: black Ruff Security

Downloads PyPI Downloads OS Python Versions

License: MIT

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 suggest scans your codebase to identify security holes, missing tests, and technical debt before they become problems.
  • God Level: Automated Test Fixer: jules auto runs 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 testgen generates 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


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-17.0.0.tar.gz (56.2 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-17.0.0-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jules_cli-17.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

Hashes for jules_cli-17.0.0.tar.gz
Algorithm Hash digest
SHA256 a7ca1557e0ff37e601239ad01b60534ceb6b4f7c2868fc6939c199f9597dc9e3
MD5 af294bab05c00254d16766bd3433bc54
BLAKE2b-256 c01d24974fc6937eb47113ef3c65e5ab08db78adb429d82c4d6f0d574a2fe594

See more details on using hashes here.

Provenance

The following attestation bundles were made for jules_cli-17.0.0.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-17.0.0-py3-none-any.whl.

File metadata

  • Download URL: jules_cli-17.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

Hashes for jules_cli-17.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62de2f77950b1f98f725c592ccb5a7158eecc4b7dc0516d54f009edb65539e77
MD5 7f736b0c505aec74e0e89737e4c02fc7
BLAKE2b-256 fb28645ef748f03c2dd16807e144977e05d4b134fb8738a08ceed5aed16eb301

See more details on using hashes here.

Provenance

The following attestation bundles were made for jules_cli-17.0.0-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