Alias Command Group
The yt alias command group provides command alias management capabilities for YouTrack CLI. This feature allows you to create custom shortcuts for frequently used commands, improving your productivity by reducing repetitive typing.
Overview
The alias command group offers complete alias lifecycle management including:
Creating custom command shortcuts for frequently used operations
Deleting user-defined aliases when no longer needed
Listing all available aliases (both built-in and user-defined)
Showing what command an alias maps to for verification
Base Command
yt alias [OPTIONS] COMMAND [ARGS]...
Alias Management Commands
Create Aliases
Create a new user-defined alias for a command.
yt alias create NAME COMMAND
- Arguments:
NAME- The name of the alias to createCOMMAND- The full command that the alias should execute
Examples:
# Create an alias for listing your assigned issues
yt alias create myissues "issues list --assignee me"
# Create an alias for creating bugs quickly
yt alias create bug "issues create --type Bug"
# Create a shorter alias for listing issues
yt alias create il "issues list"
# Create complex aliases with multiple options
yt alias create openbugs "issues list --type Bug --state Open --format table"
List Aliases
List all available command aliases, including both built-in and user-defined aliases.
yt alias list [OPTIONS]
Examples:
# List all available aliases
yt alias list
Show Alias Definition
Show what command an alias maps to for verification purposes.
yt alias show ALIAS_NAME
- Arguments:
ALIAS_NAME- The name of the alias to inspect
Examples:
# Show what the 'myissues' alias does
yt alias show myissues
# Verify a built-in alias
yt alias show i
Delete Aliases
Delete a user-defined alias that is no longer needed.
yt alias delete ALIAS_NAME
- Arguments:
ALIAS_NAME- The name of the user-defined alias to delete
Examples:
# Delete a user-defined alias
yt alias delete myissues
# Remove an outdated alias
yt alias delete oldshortcut
Note
You can only delete user-defined aliases. Built-in aliases cannot be removed.
Built-in Aliases
YouTrack CLI comes with several built-in aliases for common operations:
Alias |
Full Command |
Description |
|---|---|---|
|
|
Issue management commands |
|
|
Project management commands |
|
|
User management commands |
|
|
Time tracking commands |
|
|
Article management commands |
|
|
Board management commands |
Best Practices
- Alias Naming:
Use short, memorable names that are easy to type
Choose names that clearly indicate the command’s purpose
Avoid names that conflict with built-in commands or aliases
- Command Construction:
Include commonly used options in your aliases to save time
Use descriptive option values that match your typical workflow
Test aliases thoroughly before relying on them in automation
- Organization:
Create aliases for your most frequently used command combinations
Group related aliases with consistent naming patterns
Document your aliases for team sharing and knowledge transfer
Common Use Cases
Daily Workflow Shortcuts:
# Personal issue management
yt alias create my "issues list --assignee me --state Open"
yt alias create done "issues list --assignee me --state Done"
# Quick issue creation
yt alias create newbug "issues create --type Bug --priority High"
yt alias create task "issues create --type Task"
Team Workflow Shortcuts:
# Project-specific shortcuts
yt alias create webissues "issues list --project WEB --format table"
yt alias create apibugs "issues list --project API --type Bug --state Open"
Reporting Shortcuts:
# Time tracking shortcuts
yt alias create timetoday "time list --date today --format table"
yt alias create mystats "time report --assignee me --format json"
Advanced Usage
Complex Command Aliases:
You can create aliases for complex command combinations:
# Multi-option filtering
yt alias create criticalbugs "issues list --type Bug --priority Critical --state Open --assignee me"
# Reporting with specific formatting
yt alias create weekreport "time report --from -7days --format csv --output weekly.csv"
Integration with Automation:
Use aliases in scripts and automation workflows:
# In shell scripts
#!/bin/bash
eval "yt my" # Use the 'my' alias
eval "yt newbug PROJECT-123 'Critical issue found'"
Authentication
All alias commands work with your existing authentication. Make sure you’re logged in:
yt auth login
Error Handling
The CLI provides detailed error messages for common alias issues:
Duplicate alias names - Cannot create aliases with names that already exist
Invalid command syntax - The command portion of an alias must be valid CLI syntax
Permission errors - Some commands in aliases may require specific permissions
Alias not found - Attempting to show or delete non-existent aliases
See Also
Configuration Command Group - CLI configuration and settings
Authentication Command Group - Authentication management
Issues Command Group - Issue management commands
Projects Command Group - Project management commands