4.8 KiB
Jules Execution Guide
This guide explains how to use Jules CLI to execute tasks and automate GitHub workflows for this repository.
What is Jules?
Jules is a Google CLI tool that provides AI-powered GitHub automation. It can help with:
- Code reviews
- Pull request management
- Issue triage
- Repository automation
- Task execution
Setup
1. Install Jules
npm install -g @google/jules
2. Authenticate
jules login
This will open a browser for Google authentication.
3. Authorize GitHub Access
For organization repositories (like A6-9V):
- Go to GitHub → Organization Settings → GitHub Apps
- Find "Jules" and install it
- Grant access to repositories (or all repos)
- Ensure full
repopermissions for private repos
4. Verify Setup
jules version
jules remote list --repo
Using Jules with This Repository
Repository Information
- Repository:
A6-9V/MQL5-Google-Onedrive - Main Branch:
main - Remote:
origin
Common Jules Commands
Check repository access:
jules remote list --repo A6-9V/MQL5-Google-Onedrive
Create a new task:
jules new --repo A6-9V/MQL5-Google-Onedrive "Task description"
Review pull requests:
jules review --repo A6-9V/MQL5-Google-Onedrive
Execute automation:
jules execute --repo A6-9V/MQL5-Google-Onedrive --task "task-name"
Using the Helper Script
We've created a helper script to make Jules execution easier:
python scripts/jules_execute.py
This script will:
- Check if Jules is installed
- Verify authentication
- List available repositories
- Show available commands
Integration with GitHub Actions
Jules can be integrated with GitHub Actions workflows. Example workflow:
name: Jules Automation
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
jobs:
jules-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install -g @google/jules
- run: jules review --repo ${{ github.repository }}
env:
JULES_TOKEN: ${{ secrets.JULES_TOKEN }}
Common Use Cases
1. Automated Code Review
After pushing commits, use Jules to review:
jules review --repo A6-9V/MQL5-Google-Onedrive --pr <PR_NUMBER>
2. Issue Triage
Automatically categorize and assign issues:
jules triage --repo A6-9V/MQL5-Google-Onedrive
3. Task Execution
Execute specific tasks:
# Deploy cloud configurations
jules execute --repo A6-9V/MQL5-Google-Onedrive --task "deploy-cloud"
# Sync to GitHub Pages
jules execute --repo A6-9V/MQL5-Google-Onedrive --task "sync-pages"
4. Repository Maintenance
Automated maintenance tasks:
jules maintain --repo A6-9V/MQL5-Google-Onedrive
Troubleshooting
Jules Not Found
If jules command is not found:
- Verify npm installation:
npm --version - Install Jules:
npm install -g @google/jules - Check PATH:
where jules(Windows) orwhich jules(Linux/Mac)
Authentication Issues
If authentication fails:
jules logout
jules login
Repository Access Denied
If you can't access the repository:
- Verify GitHub App is installed for organization
- Check repository permissions in GitHub App settings
- Refresh Jules:
jules logout && jules login
Permission Errors
For private repositories:
- Ensure GitHub App has full
repoaccess - Check organization settings
- Verify repository is included in app permissions
Best Practices
- Always verify before executing: Use
--dry-runwhen available - Review changes before committing: Let Jules review PRs
- Monitor execution: Check logs and outputs
- Keep Jules updated:
npm update -g @google/jules
Integration Examples
After Push to Main
# After pushing commits
git push origin main
# Use Jules to review and execute tasks
jules execute --repo A6-9V/MQL5-Google-Onedrive --auto
Automated Workflow
Create .github/workflows/jules-automation.yml:
name: Jules Automation
on:
push:
branches: [main]
jobs:
jules-execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm install -g @google/jules
- run: jules execute --repo ${{ github.repository }}
env:
JULES_TOKEN: ${{ secrets.JULES_TOKEN }}
Support
For Jules-specific issues:
- Jules Documentation: https://github.com/google/jules
- GitHub App: Check organization settings
- This Repository: Create an issue with
@julestag
For repository-specific issues:
- Email: Lengkundee01.org@domain.com
- GitHub Issues: https://github.com/A6-9V/MQL5-Google-Onedrive/issues