PHP code example of visualbuilder / youtrack-cli

1. Go to this page and download the library: Download visualbuilder/youtrack-cli library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

visualbuilder / youtrack-cli example snippets


// config/youtrack.php
'connections' => [
    'default' => [
        'base_url' => env('YOUTRACK_BASE_URL'),
        'token' => env('YOUTRACK_TOKEN'),
        'default_project' => 'NB',
    ],
    'support' => [
        'base_url' => env('YOUTRACK_SUPPORT_BASE_URL'),
        'token' => env('YOUTRACK_SUPPORT_TOKEN'),
        'default_project' => 'SUPP',
    ],
],

use Visualbuilder\YoutrackCli\Services\IssueService;

class DispatchTickets
{
    public function __construct(private IssueService $issues) {}

    public function handle(): void
    {
        $this->issues->createIssue(
            project: 'NB',
            summary: 'Performance regression on /reports',
            description: 'Median page load 1.8s → 4.2s after merge of NB-980.',
            type: 'Bug',
            priority: 'P1',
        );
    }
}
bash
php artisan vendor:publish --tag=youtrack-cli-config
bash
php artisan vendor:publish --tag=youtrack-cli-claude-skills
bash
php artisan youtrack:check-project --project=NB
bash
php artisan youtrack:list-ready --project=NB
php artisan youtrack:list-blocked --project=NB
php artisan youtrack:list-approved --project=NB
php artisan youtrack:list-ready-for-staging --project=NB
php artisan youtrack:list-ready-for-production --project=NB
bash
php artisan youtrack:get-issue NB-123
bash
php artisan youtrack:search "session reminder" --project=NB
bash
php artisan youtrack:create-issue NB \
    "Mobile dashboard wraps awkwardly under 375px" \
    "## Steps to reproduce
    
    1. ..." \
    --type=Bug \
    --priority=P3
bash
php artisan youtrack:bulk-search-fingerprints '["abc123","def456","ghi789"]' --project=NB
bash
php artisan youtrack:check-project --project=NB