A developer CLI for Jules API automation
Project description
jules-cli
The AI-Powered Developer Assistant.
Automate tests, refactoring, and feature development with a single command.
⚡ Quick Start (The "5-Minute Rule")
Prerequisites
- Python 3.8 or higher.
- Git installed and configured.
- pip package manager.
Install
Install the package in editable mode or from source:
pip install .
Run
Initialize your credentials and configuration (interactive wizard):
jules init
Demo
Fix a bug, run tests, and create a PR in seconds:
# 1. Ask Jules to fix a bug
jules task "Fix the NullReferenceError in user_login function"
# 2. Verify the fix
jules auto --runner pytest
# 3. Create a Pull Request
jules pr create --title "Fix: Handle null user in login"
✨ Features (The "Why")
Core Capabilities
- Automated Bug Fixing:
jules autodetects test failures and attempts to fix them automatically. - Task Execution:
jules task "Implement feature X"writes code, tests, and docs from natural language. - Refactoring:
jules refactormodernizes legacy codebases safely. - Test Generation:
jules testgencreates unit and integration tests for existing code. - Proactive Suggestions:
jules suggestaudits your code for technical debt and security risks.
Performance & Experience
- Smart Caching: Local caching of session artifacts to minimize API latency.
- Async Core: Built for speed with asynchronous I/O operations.
- TUI Mode: A rich terminal user interface (
jules tui) for complex sessions.
Security
- Secure Storage: API keys are stored in the system keyring, never in plain text.
- Safe Patching: Review patches before applying them to your local file system.
- Local Processing: Supports
.julesignoreto keep sensitive files out of the context window.
🛠️ Configuration (The "How")
Environment Variables
| Name | Description | Default | Required |
|---|---|---|---|
JULES_API_KEY |
Your Jules API Key. | None | Yes |
GITHUB_TOKEN |
Token for creating PRs and interacting with GitHub. | None | No (for PRs) |
CLI Arguments
Global arguments available for every command:
| Flag | Description |
|---|---|
--debug |
Enable debug logging for detailed troubleshooting. |
--verbose |
Enable verbose output. |
--json |
Output results in JSON format (useful for scripting). |
--pretty |
Pretty-print JSON output. |
--no-color |
Disable colored output. |
Configuration File
Settings are stored in ~/.config/jules/config.toml. You can manage them via CLI:
# Set a value
jules config set core.logging_level DEBUG
# Get a value
jules config get core.default_branch
🏗️ Architecture
Directory Tree
.
├── src/jules_cli
│ ├── commands/ # CLI command implementations (auto, task, pr...)
│ ├── core/ # Jules API client interaction
│ ├── git/ # Git VCS wrappers
│ ├── patch/ # Patch application and conflict resolution
│ ├── testing/ # Test runner integration (pytest, unittest)
│ ├── tui/ # Textual-based TUI
│ └── utils/ # Shared utilities (logging, config, crypto)
└── tests/ # Pytest suite
Data Flow
- Input: User runs
jules task "...". - Process:
- CLI parses args and loads
configviasrc/jules_cli/utils/config.py. coresends prompt + context (filtered by.julesignore) to Jules API.- Jules API returns a
Patch.
- CLI parses args and loads
- Output:
patchmodule applies changes to local files.testingvalidates changes viapytestorunittest.- Results displayed via
richconsole ortextualTUI.
🐞 Troubleshooting
Common Issues
| Error Message | Solution |
|---|---|
JulesError: Unauthorized |
Run jules auth login to refresh credentials. |
FileNotFoundError: config.toml |
Run jules init to create default config. |
DatabaseLocked |
Ensure no other jules process is running. |
Command not found: jules |
Ensure the virtual environment is activated and installed (pip install .). |
Debug Mode
To see detailed logs for issue reporting:
jules --debug task "Verify setup"
Logs are written to stderr and can be captured:
jules --debug task "..." 2> jules_debug.log
🤝 Contributing
We welcome contributions! Please follow these steps to set up your development environment.
Dev Setup
-
Clone the repository:
git clone https://github.com/dhruv13x/jules-cli.git cd jules-cli
-
Install in editable mode with dev dependencies:
pip install -e ".[dev]"
-
Run Tests:
pytest
-
Linting:
ruff check . black .
See CONTRIBUTING.md for more detailed guidelines.
🗺️ Roadmap
Phase 1: Foundation (Current)
- Core CLI structure & Session management.
- Auto-fixing & Patch application.
- TUI & Secure Auth.
Phase 2: The Standard
-
jules doctor& Interactiveinit. - Context-aware suggestions (
jules suggest).
Phase 3: The Ecosystem (Upcoming)
- CI/CD Templates.
- IDE Extensions (VS Code, JetBrains).
- Plugin Architecture.
Phase 4: The Vision (Future)
- Multi-Agent Orchestration.
- Autonomous Bug Hunting.
For a detailed view, check ROADMAP.md.
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-17.0.1.tar.gz.
File metadata
- Download URL: jules_cli-17.0.1.tar.gz
- Upload date:
- Size: 54.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
096c44631cc8fcea9032207324c0a90b25ea3de10ed54ce918babc7d86e1d458
|
|
| MD5 |
9486bda9bf14f2b50348413058d55b4a
|
|
| BLAKE2b-256 |
6947e7db5606de7dbb462c8a866dd851ae4edb1ccc601057a2147442d1f390dc
|
Provenance
The following attestation bundles were made for jules_cli-17.0.1.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-17.0.1.tar.gz -
Subject digest:
096c44631cc8fcea9032207324c0a90b25ea3de10ed54ce918babc7d86e1d458 - Sigstore transparency entry: 764297638
- Sigstore integration time:
-
Permalink:
dhruv13x/jules-cli@33764862a7a4fb0d9eaded00a9e3e8f75a0f6f22 -
Branch / Tag:
refs/tags/v17.0.1 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33764862a7a4fb0d9eaded00a9e3e8f75a0f6f22 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jules_cli-17.0.1-py3-none-any.whl.
File metadata
- Download URL: jules_cli-17.0.1-py3-none-any.whl
- Upload date:
- Size: 51.1 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 |
0d2783e0c4dbb3bb98e230df6a86a36e165ce01bf6542b810b65afabbb6d2e0e
|
|
| MD5 |
1a984089c11d0388e5d3e4397d43b697
|
|
| BLAKE2b-256 |
d508ad16b922c8596992d2ae5935139bfc2f7ee2b79cbc172763101bcc5b0483
|
Provenance
The following attestation bundles were made for jules_cli-17.0.1-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-17.0.1-py3-none-any.whl -
Subject digest:
0d2783e0c4dbb3bb98e230df6a86a36e165ce01bf6542b810b65afabbb6d2e0e - Sigstore transparency entry: 764297641
- Sigstore integration time:
-
Permalink:
dhruv13x/jules-cli@33764862a7a4fb0d9eaded00a9e3e8f75a0f6f22 -
Branch / Tag:
refs/tags/v17.0.1 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@33764862a7a4fb0d9eaded00a9e3e8f75a0f6f22 -
Trigger Event:
push
-
Statement type: