mi-lopez / jira-cli-wizard
A beautiful CLI wizard for creating Jira tickets with interactive prompts and smart defaults
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0
- symfony/console: ^6.0|^7.0
- symfony/process: ^6.0|^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^10.0
- symfony/var-dumper: ^6.0|^7.0
This package is auto-updated.
Last update: 2025-07-03 23:19:54 UTC
README
A beautiful, interactive CLI wizard for creating Jira tickets with smart defaults and an intuitive user experience. Skip the web interface hassle and create tickets directly from your terminal!
โจ Features
- ๐งโโ๏ธ Interactive Wizard: Step-by-step guided ticket creation
- ๐ฏ Smart Defaults: Suggests active sprints, recent epics, and assignees
- ๐ Quick Creation: Create tickets based on existing ones
- ๐ Template System: Copy settings from existing tickets
- ๐ Secure: API token-based authentication
- ๐จ Beautiful UI: Colorful, user-friendly terminal interface
- โก Fast Setup: One-command configuration
- ๐ Complete Support: Projects, issue types, priorities, assignees, sprints, and epics
- ๐ Epic Linking: Automatically link tickets to epics
- ๐ Sprint Integration: Add tickets to active sprints
- ๐ Status Monitoring: Check configuration and connection status
- ๐ Smart Search: Find projects, users, and issue types by name or partial match
๐ Quick Start
Installation
composer require mi-lopez/jira-cli-wizard --dev
Configuration
Configure your Jira credentials (one-time setup):
./vendor/bin/jira-wizard configure
You'll need:
- Your Jira instance URL (e.g.,
https://yourcompany.atlassian.net
) - Your email address
- An API token (generate here)
Create Your First Ticket
./vendor/bin/jira-wizard create
The wizard will guide you through:
- Project Selection - Choose from your accessible projects
- Issue Type - Select Story, Bug, Task, etc.
- Summary - Enter a descriptive title
- Description - Add details (optional)
- Priority - Set importance level
- Assignee - Assign to team members or leave unassigned
- Additional Options - Link to epics, add to active sprint
๐ฅ Power Features
Create from Existing Ticket
The fastest way to create similar tickets:
# Copy all settings from an existing ticket ./vendor/bin/jira-wizard create-from CAM-1106 # Copy to a different project ./vendor/bin/jira-wizard create-from CAM-1106 --project TRIGB2B
What gets copied:
- โ
Project (or override with
--project
) - โ Issue type
- โ Priority
- โ Assignee
- โ Epic (if linked)
- โ Sprint (current active sprint)
What you provide:
- โ New summary
- โ New description
- โ Optional: modify any copied settings
๐ Usage Examples
Standard Ticket Creation
$ ./vendor/bin/jira-wizard create ๐ฏ Jira CLI Wizard ================== โ Connected to Jira successfully! [1/7] Select Project -------------------- Available projects: [0] PROJ - My Project [1] DEV - Development Team [2] CAM - CAMEL NETWORKS - OroCommerce project > 2 [2/7] Select Issue Type ----------------------- Available issue types: [0] Tarea - Un trabajo pequeรฑo e independiente [1] Historia - Una funciรณn o funcionalidad expresada como objetivo del usuario [2] Error - Un problema o error > 1 [3/7] Enter Summary ------------------- Enter ticket summary: Implement user authentication system [4/7] Enter Description ----------------------- Enter description (optional): Add JWT-based authentication with login/logout functionality [5/7] Select Priority --------------------- Available priorities: [skip] Skip (use default) [0] Highest [1] High [2] Medium > 1 [6/7] Select Assignee -------------------- Available assignees: [unassigned] Unassigned [0] John Doe [1] Jane Smith [2] Miguel Lopez > 2 [7/7] Additional Options ----------------------- ๐ Sprint Options Add to active sprint 'Sprint 23'? (y/N): y โ Will add to sprint: Sprint 23 ๐ Epic Options Select epic (optional): [skip] Skip (no epic) [0] CAM-1037 - Oro 6.1 Upgrade [1] CAM-761 - MVP3 Distributor Quote > 0 ๐ Ticket Summary ================ ๐ Project: CAM - CAMEL NETWORKS - OroCommerce project ๐ฏ Type: Historia ๐ Summary: Implement user authentication system ๐ Description: Add JWT-based authentication with login/logout functionality โก Priority: High ๐ค Assignee: Miguel Lopez ๐ Sprint: Sprint 23 ๐ Epic: CAM-1037 ๐ค Create this ticket? (y/N): y ๐ Creating ticket... โ Ticket created successfully! ๐ Issue Key: CAM-1107 ๐ URL: https://yourcompany.atlassian.net/browse/CAM-1107 ๐ Adding to sprint... โ Added to sprint!
Quick Template Creation
$ ./vendor/bin/jira-wizard create-from CAM-1106 ๐ Original Ticket Template ============================ ๐ Project: CAM - CAMEL NETWORKS - OroCommerce project ๐ฏ Type: Tarea ๐ Summary: Test from API โก Priority: Medium ๐ค Assignee: Miguel Lopez ๐ Sprint: CAMEL Sprint 18 ๐ Epic: CAM-1037 - Oro 6.1 Upgrade ๐ฏ Create New Ticket ==================== ๐ Project: CAM - CAMEL NETWORKS - OroCommerce project ๐ Enter new ticket summary: Fix login validation bug ๐ Enter description (optional): Users cannot login with special characters in password ๐ง Do you want to modify the copied settings? (y/N): n ๐ New Ticket Summary ===================== ๐ Project: CAM - CAMEL NETWORKS - OroCommerce project ๐ฏ Type: Tarea ๐ Summary: Fix login validation bug ๐ Description: Users cannot login with special characters in password โก Priority: Medium ๐ค Assignee: Miguel Lopez ๐ Sprint: CAMEL Sprint 18 ๐ Epic: CAM-1037 ๐ค Create this ticket? (y/N): y ๐ Creating ticket... โ Ticket created successfully! ๐ Issue Key: CAM-1108 ๐ URL: https://yourcompany.atlassian.net/browse/CAM-1108 ๐ Adding to sprint... โ Added to sprint!
Cross-Project Template
$ ./vendor/bin/jira-wizard create-from CAM-1106 --project TRIGB2B ๐ Original Ticket Template ============================ ๐ Project: CAM - CAMEL NETWORKS - OroCommerce project ๐ฏ Type: Tarea ๐ Summary: Test from API โก Priority: Medium ๐ค Assignee: Miguel Lopez ๐ฏ Create New Ticket ==================== ๐ Project: TRIGB2B - TRIGANO - B2B - Projet OroCommerce ๐ Enter new ticket summary: Implement similar API feature ๐ Enter description (optional): Port the API functionality to TRIGB2B project ๐ง Do you want to modify the copied settings? (y/N): y โก Change priority? (y/N): y Available priorities: [skip] Skip (use default) [0] Highest [1] High [2] Medium > 1 ๐ค Change assignee? (y/N): n ๐ Creating ticket... โ Ticket created successfully! ๐ Issue Key: TRIGB2B-456
๐ ๏ธ Available Commands
Create Ticket (Interactive)
./vendor/bin/jira-wizard create
# or simply:
./vendor/bin/jira-wizard
Full interactive wizard for creating tickets from scratch.
Create from Template
./vendor/bin/jira-wizard create-from <ISSUE-KEY>
Create a new ticket using an existing ticket as a template.
Examples:
# Copy all settings from CAM-1106 ./vendor/bin/jira-wizard create-from CAM-1106 # Copy settings but create in different project ./vendor/bin/jira-wizard create-from CAM-1106 --project TRIGB2B # Quick bug fix based on existing bug ./vendor/bin/jira-wizard create-from PROJ-123
Configure Credentials
./vendor/bin/jira-wizard configure
Set up or update your Jira credentials and connection settings.
Check Status
./vendor/bin/jira-wizard status
Display current configuration and test connection to Jira.
Get Help
./vendor/bin/jira-wizard --help ./vendor/bin/jira-wizard create-from --help
โ๏ธ Configuration
Configuration is stored in ~/.jira-cli-config.json
. You can:
- View current config:
./vendor/bin/jira-wizard status
- Reconfigure:
./vendor/bin/jira-wizard configure
- Manual edit: Edit
~/.jira-cli-config.json
directly
Environment Variables
You can also set configuration via environment variables:
export JIRA_URL="https://yourcompany.atlassian.net" export JIRA_EMAIL="your.email@company.com" export JIRA_TOKEN="your-api-token"
๐ฏ Smart Features
Flexible Selection
All selection prompts support multiple input methods:
Projects:
- Number:
10
(from numbered list) - Project key:
CAM
(exact match) - Partial key:
CAM
(if unique) - Project name:
CAMEL
(partial match)
Issue Types:
- Number:
0
(from numbered list) - Type name:
Tarea
orHistoria
- Partial name:
Hist
(matches Historia)
Priorities:
- Number:
2
(from numbered list) - Priority name:
High
orMedium
- Skip:
skip
(use default)
Assignees:
- Number:
15
(from numbered list) - Full name:
Miguel Lopez
- Email:
miguel@company.com
- Partial name:
Miguel
- Unassigned:
unassigned
Smart Defaults
- Active Sprint: Automatically suggests current active sprint
- Recent Epics: Shows epics ordered by last updated
- Team Members: Lists assignable users for the project
- Cross-Project: Maintains settings when copying between projects
Error Handling
- Connection Testing: Validates credentials before use
- Graceful Fallbacks: Continues even if optional features fail
- Clear Messages: Descriptive error messages with solutions
- Multiple Matches: Shows options when partial matches are ambiguous
๐ง Requirements
- PHP: ^8.1
- Jira: Cloud or Server with REST API access
- Extensions:
curl
,json
๐จ Advanced Usage
Workflow Integration
Create tickets as part of your development workflow:
# Create a bug report for current issue ./vendor/bin/jira-wizard create-from PROJ-123 # Create feature ticket based on existing epic structure ./vendor/bin/jira-wizard create-from EPIC-456 --project NEWPROJ # Quick task creation for sprint ./vendor/bin/jira-wizard create-from SPRINT-TEMPLATE
Batch Operations
Use shell scripting for batch operations:
#!/bin/bash # Create multiple related tickets for feature in "login" "signup" "profile"; do echo "Creating ticket for $feature" ./vendor/bin/jira-wizard create-from TEMPLATE-123 \ --project MYPROJ \ --summary "Implement $feature feature" done
Team Productivity
Project Templates:
- Create a "template" ticket for each project type
- Use
create-from
to maintain consistency - Share template ticket keys with team
Sprint Planning:
- Clone user stories with
create-from
- Maintain epic linkage across related tickets
- Quickly create test tickets for each feature
Custom Fields Support
The wizard automatically handles:
- Standard Fields: Summary, Description, Priority, Assignee
- Project Fields: Issue Types, Components, Versions
- Agile Fields: Sprint, Epic, Story Points
- Custom Fields: (via template copying)
๐ Troubleshooting
Common Issues
Connection Failed
โ Connection failed: Unauthorized
Solution: Check your email and API token. Regenerate token if needed.
No Projects Found
No projects found or no access to projects.
Solution: Ensure your account has access to at least one Jira project.
Permission Denied
Failed to create issue: Forbidden
Solution: Verify you have permission to create issues in the selected project.
Template Ticket Not Found
โ Ticket CAM-1106 not found or no access.
Solution: Check the ticket key and ensure you have access to view it.
Invalid Project Override
Project INVALID not found or no access.
Solution: Verify the project key exists and you have access to it.
Debug Information
# Check current status and configuration ./vendor/bin/jira-wizard status # View detailed configuration cat ~/.jira-cli-config.json # Test connection manually curl -u "email@example.com:api-token" \ "https://yourcompany.atlassian.net/rest/api/3/myself" # Test specific ticket access curl -u "email@example.com:api-token" \ "https://yourcompany.atlassian.net/rest/api/3/issue/CAM-1106"
Performance Tips
- Connection Caching: The CLI tests connection once per session
- Project Caching: Project lists are cached during wizard execution
- API Optimization: Minimal API calls for better performance
- Batch Operations: Use templates for creating multiple similar tickets
Getting Help
- ๐ Documentation
- ๐ Report Issues
- ๐ฌ Discussions
- ๐ง Contact
๐งช Development
Setup Development Environment
# Clone the repository git clone https://github.com/mi-lopez/jira-cli-wizard.git cd jira-cli-wizard # Install dependencies composer install # Run tests composer test # Check code style composer cs-check # Fix code style composer cs-fix # Run static analysis composer phpstan
Project Structure
โโโ bin/
โ โโโ jira-wizard # CLI entry point
โโโ src/
โ โโโ Commands/
โ โ โโโ CreateTicketCommand.php # Main wizard command
โ โ โโโ CreateFromCommand.php # Template creation command
โ โ โโโ ConfigureCommand.php # Configuration command
โ โ โโโ StatusCommand.php # Status command
โ โโโ Helpers/
โ โ โโโ ConsoleHelper.php # Pretty console output
โ โโโ JiraApiClient.php # Jira API integration
โ โโโ ConfigManager.php # Configuration management
โ โโโ Installer.php # Post-install setup
โโโ tests/ # PHPUnit tests
โโโ .github/
โ โโโ workflows/ # GitHub Actions CI
โโโ composer.json # Package configuration
โโโ README.md # This file
Running Tests
# Run all tests composer test # Run tests with coverage composer test-coverage # Run specific test ./vendor/bin/phpunit tests/Unit/ConfigManagerTest.php
๐ค Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
composer test
) - Check code style (
composer cs-check
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Code Style
This project follows PSR-12 coding standards:
# Check code style composer cs-check # Auto-fix code style issues composer cs-fix
๐ Security
API Token Security
- API tokens are stored locally in
~/.jira-cli-config.json
- Tokens are never logged or transmitted except to Jira
- Use file permissions to protect your config:
chmod 600 ~/.jira-cli-config.json
Best Practices
- Generate dedicated tokens: Create a token specifically for CLI use
- Regular rotation: Rotate API tokens periodically
- Minimal permissions: Use accounts with minimal required permissions
- Secure storage: Keep your config file secure
๐ Roadmap
Version 1.1.0
- Bulk Operations: Create multiple tickets at once
- Custom Templates: Save and reuse ticket templates locally
- Custom Fields: Enhanced support for custom Jira fields
- Watchers: Add watchers to tickets during creation
- Project Shortcuts: Quick project selection via aliases
Version 1.2.0
- Comments: Add initial comments to tickets
- Attachments: Upload files to tickets
- Sub-tasks: Create sub-tasks automatically
- Time Tracking: Add time estimates and logging
- Workflows: Support for custom workflow transitions
Version 2.0.0
- Multiple Instances: Support multiple Jira instances
- Plugins: Plugin system for extensions
- GUI Mode: Optional web interface
- AI Integration: AI-powered descriptions and summaries
- Git Integration: Create tickets from git commits/branches
๐ Performance
- Cold start: ~200ms (first run after configuration)
- Warm start: ~100ms (subsequent runs)
- Template operations: ~150ms (including API calls)
- API calls: Optimized to minimize requests
- Memory usage: ~12MB typical usage
๐ Star History
If this tool saves you time, please consider giving it a star! โญ
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Atlassian: For providing the excellent Jira REST API
- Symfony Console: For the powerful CLI framework
- Guzzle HTTP: For reliable HTTP client functionality
- Contributors: All the amazing people who help improve this tool
๐ Changelog
[1.0.0] - 2025-07-03
- ๐ Initial release
- โจ Interactive ticket creation wizard
- ๐ง One-command configuration setup
- ๐ฏ Smart defaults for sprints and epics
- ๐จ Beautiful terminal interface
- ๐ Status and health checking
- ๐ Secure API token authentication
- ๐ NEW: Create from existing ticket templates
- ๐ NEW: Cross-project ticket copying
- ๐ NEW: Smart search and selection
- โก NEW: Quick ticket creation workflows
Made with โค๏ธ and PHP by mi-lopez