A smart command-line tool that converts natural language ideas into professional GitHub issues using OpenAI's GPT models.
- π€ AI-Powered: OpenAI automatically analyzes your input
- π Multilingual: Input in German, French, Spanish - outputs in English
- π·οΈ Smart Labels: AI automatically assigns appropriate labels
- β‘ Priority Detection: Automatic priority assessment (low/medium/high/critical)
- π¬ Natural Input: No quotes needed, all special characters supported
- π― Project-Aware: Only works within Git repositories
Install required tools:
# macOS
brew install gh jq
# Ubuntu/Debian
sudo apt install gh jq
# Verify installation
gh --version
jq --versiongh auth loginChoose one method:
Option A: Environment Variable (Recommended)
export OPENAI_API_KEY="sk-your-api-key-here"
# Add to ~/.bashrc or ~/.zshrc for persistence
echo 'export OPENAI_API_KEY="sk-your-api-key-here"' >> ~/.bashrcOption B: Project .env File
echo 'OPENAI_API_KEY=sk-your-api-key-here' > .envOption C: Global Config File
echo 'sk-your-api-key-here' > ~/.openai_api_keyGet your API key from: https://platform.openai.com/api-keys
Save the script as todo in your project directory:
# Download script
curl -o todo https://gist.github.com/your-username/gist-id/raw/ai-github-todo-creator.sh
# Make executable
chmod +x todo
# Optional: Create alias for convenience
echo "alias todo='noglob ./todo'" >> ~/.bashrc
source ~/.bashrc# Simple ideas (no quotes needed!)
todo Memory system should auto-backup to cloud
todo Voice input would be cool with hotkey
todo Performance optimization for large datasets
# Bug reports
todo Bug: Special characters not saving correctly
todo Crash when uploading files over 10MB
todo Login fails with 2FA enabled
# With special characters (all supported!)
todo Can we add auto-save? That would be awesome!
todo Export feature: CSV/JSON formats needed {urgent}
todo API timeout issues @high-traffic endpoints# German
todo Speicher-System sollte automatisch sichern
todo Bug: Umlaute werden nicht richtig gespeichert
# French
todo Système de sauvegarde automatique serait pratique
todo Erreur: Les caractères spéciaux ne fonctionnent pas
# Spanish
todo Sistema de respaldo automΓ‘tico serΓa ΓΊtil
todo Error: Los acentos no se guardan correctamenteCreate recommended labels for better AI categorization:
# Priority labels
gh label create "priority-high" --color "ff0000" --description "High priority issue"
gh label create "priority-medium" --color "ffaa00" --description "Medium priority issue"
gh label create "priority-low" --color "00ff00" --description "Low priority issue"
gh label create "priority-critical" --color "800000" --description "Critical priority issue"
# Feature labels
gh label create "feature-request" --color "a2eeef" --description "New feature request"
gh label create "ui-ux" --color "ff7f00" --description "User interface improvements"
gh label create "performance" --color "ffeb3b" --description "Performance related issues"
gh label create "security" --color "e91e63" --description "Security related issues"
# Technical labels
gh label create "api" --color "0366d6" --description "API related issues"
gh label create "frontend" --color "bfdadc" --description "Frontend related issues"
gh label create "backend" --color "c2e0c6" --description "Backend related issues"
gh label create "mobile" --color "f9d0c4" --description "Mobile related issues"
gh label create "testing" --color "d4c5f9" --description "Testing related issues"Edit the script to customize AI behavior for your project:
# Find this section in the script and modify:
"Suggest appropriate labels from: bug, enhancement, documentation, question, priority-high, priority-medium, priority-low, priority-critical, feature-request, ui-ux, performance, security, api, frontend, backend, mobile, testing"
# Example for web project:
"Suggest appropriate labels from: bug, enhancement, frontend, backend, api, database, security, ui-ux, performance, responsive-design, seo"
# Example for mobile app:
"Suggest appropriate labels from: bug, enhancement, ios, android, ui-ux, performance, crash, feature-request, accessibility, testing"For multiple projects, create project-specific versions:
# Copy script to each project
cp todo ~/project1/todo
cp todo ~/project2/todo
# Or create global installation
sudo cp todo /usr/local/bin/todo
# Then use from any git repositoryModify the script to support custom API key locations:
# Add custom location after line ~70:
elif [ -f "/path/to/your/custom/config" ]; then
API_KEY=$(cat "/path/to/your/custom/config" | tr -d '\n')Edit the API call to use different models:
# Find this line and change the model:
"model": "gpt-4o-mini",
# Options:
"model": "gpt-4o", # More powerful, more expensive
"model": "gpt-4o-mini", # Good balance (default)
"model": "gpt-3.5-turbo", # Faster, cheaperModify the AI prompt to change issue structure:
# Find the JSON format section and customize:
{
\"title\": \"Clear issue title\",
\"body\": \"## Problem\\n\\nWhat's wrong\\n\\n## Solution\\n\\nHow to fix\\n\\n## Acceptance Criteria\\n\\n- [ ] Criterion 1\\n- [ ] Criterion 2\",
\"labels\": [\"label1\", \"label2\"],
\"type\": \"bug|enhancement|documentation|question\",
\"priority\": \"low|medium|high|critical\"
}Error: Not in git repository
# Solution: Run from within a Git repository
cd /path/to/your/project
git init # if not a git repo yetError: GitHub CLI not installed
# macOS
brew install gh
# Ubuntu/Debian
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update && sudo apt install ghError: OpenAI API key not found
# Check your setup:
echo $OPENAI_API_KEY
cat .env | grep OPENAI
cat ~/.openai_api_key
# Verify API key format (should start with 'sk-')Error: Label not found
# Create missing labels manually:
gh label create "priority-high" --color "ff0000" --description "High priority"
# Or remove labels from the AI suggestion list in the scriptAdd debug output to the script:
# Add after line ~80:
echo "DEBUG: API Key length: ${#API_KEY}"
echo "DEBUG: User input: $USER_INPUT"
echo "DEBUG: API Response: $RESPONSE"# List all open issues
gh issue list
# Filter by labels
gh issue list --label bug
gh issue list --label priority-high
gh issue list --label enhancement
# View specific issue
gh issue view 42# Assign issue
gh issue edit 42 --add-assignee username
# Add labels
gh issue edit 42 --add-label "in-progress"
# Close issue
gh issue close 42 --comment "Fixed in commit abc123"
# Reopen issue
gh issue reopen 42Good Examples:
todo User authentication should support 2FA for better security
todo Performance issue: App becomes slow with 1000+ items
todo Export functionality needed for data backup purposes
todo Bug: Special characters break the search functionAvoid:
todo fix thing # Too vague
todo add stuff # Not descriptive
todo urgent!!! # No contextPriority System:
priority-critical: Security vulnerabilities, data loss, app crashespriority-high: Major features, significant bugs affecting many userspriority-medium: Minor features, small bugs, improvementspriority-low: Nice-to-have features, cosmetic issues
Type System:
bug: Something is brokenenhancement: Improve existing functionalityfeature-request: Completely new functionalitydocumentation: Docs relatedquestion: Need clarification
Link Issues to Code:
# In commit messages:
git commit -m "Fix login bug - fixes #42"
git commit -m "Add export feature - closes #38"
# In pull requests:
# "This PR implements the export feature requested in #38"Track your project's progress:
# Issue statistics
gh issue list --state all | wc -l # Total issues
gh issue list --state open | wc -l # Open issues
gh issue list --state closed | wc -l # Closed issues
# Label distribution
gh issue list --json labels --jq '.[].labels[].name' | sort | uniq -c | sort -nrFor team projects:
- Share the script with team members
- Standardize labels across the project
- Create issue templates for consistency
- Use milestones for sprint planning
- Set up notifications for new issues
MIT License - Feel free to modify and distribute.
- GitHub Issues: Use this script to create them! π
- OpenAI API Docs: https://platform.openai.com/docs
- GitHub CLI Docs: https://cli.github.com/manual/
Created with β€οΈ by the AI Chat Terminal Team