A simple Python tool to export issues from YouTrack and prepare them for import into Linear using CSV format.
This tool helps you migrate from YouTrack to Linear as your issue tracking system by:
- Exporting issues from YouTrack using their REST API
- Transforming data to Linear-compatible CSV format
- Importing CSV files using Linear's official import CLI tool
# Clone and setup
git clone https://github.com/source-ag/youtrack2linear.git
cd youtrack2linear
# Install Python dependencies
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Install Linear's official import tool
npm install --global @linear/importCreate a .env file with your credentials:
# YouTrack Configuration
YOUTRACK_URL=https://your-instance.myjetbrains.com/youtrack
YOUTRACK_TOKEN=your_youtrack_permanent_token
YOUTRACK_PROJECT_KEY=PROJECT_KEY
# Linear Configuration (optional)
LINEAR_DEFAULT_STATE=BacklogNote:
- If you don't specify a
YOUTRACK_PROJECT_KEYin your.envfile, you can still export issues by providing a query with the--queryparameter. - Set
LINEAR_DEFAULT_STATEto avoid issues being imported into Linear's "Triage" state (which has no bulk edit mode). Common values:Backlog,Todo,In Progress.
# Export issues from YouTrack
python migrate.py export --query "project: PROJECT_KEY"
# Transform to Linear CSV format
python transformer.pyNote: If you don't provide a --query parameter, the tool will export all issues from the project specified in your YOUTRACK_PROJECT_KEY environment variable.
Run Linear's import command and follow the wizard:
linear-importIn the wizard:
- Select "Linear CSV import"
- Follow the prompts to select your CSV file (
output/linear_issues.csv) - Map columns as needed (Title → Title, Description → Description)
- Complete the import
youtrack2linear/
├── README.md # This file
├── LICENSE # MIT License
├── requirements.txt # Python dependencies
├── migrate.py # YouTrack export tool
├── transformer.py # CSV generation tool
├── youtrack_client.py # YouTrack API client
├── config.py # Configuration classes
├── env_template # Environment variables template
└── output/ # Generated files
├── youtrack_issues.json # Raw export from YouTrack
└── linear_issues.csv # CSV for Linear import
output/youtrack_issues.json- Raw export from YouTrackoutput/linear_issues.csv- CSV for Linear import (title and description only)
# Test connections
python migrate.py test-connections
# Export from YouTrack
python migrate.py export --query "project: PROJECT_KEY"
# Transform to Linear CSV format
python transformer.py# 1. Test your connection
python migrate.py test-connections
# 2. Export issues (replace PROJECT_KEY with your actual project key)
python migrate.py export --query "project: MYPROJECT"
# 3. Transform to CSV
python transformer.py
# 4. Import to Linear using the CLI tool
linear-import
# Follow the wizard and select "Linear CSV import"- Go to YouTrack → Profile → Authentication
- Create a "Permanent Token"
- Copy the token
No API key needed! The CSV import uses Linear's official CLI tool:
- Install:
npm install --global @linear/import - Run:
linear-import - Follow the wizard and select "Linear CSV import"
- Select your CSV file and complete the import
The tool creates a simple CSV with all required columns for Linear import, but only populates:
| YouTrack | Linear CSV | Notes |
|---|---|---|
summary |
Title |
Issue title |
description |
Description |
Issue description |
| (empty) | Created At |
Empty for simple import |
| (empty) | Updated At |
Empty for simple import |
| (empty) | Identifier |
Empty for simple import |
| (empty) | Creator Email |
Empty for simple import |
| (empty) | Assignee Email |
Empty for simple import |
| (empty) | Priority |
Empty for simple import |
| (configured) | State |
Set via LINEAR_DEFAULT_STATE (e.g., backlog) |
| (empty) | Labels |
Empty for simple import |
Note:
- This approach focuses on importing just the essential issue information (title and description) while maintaining compatibility with Linear's import format.
- The
Statecolumn is populated with your configuredLINEAR_DEFAULT_STATEto avoid issues being imported into Linear's "Triage" state.
# All issues in a project
python migrate.py export --query "project: PROJECT_KEY"
# Open issues only
python migrate.py export --query "project: PROJECT_KEY State: Open"
# Issues from last month
python migrate.py export --query "project: PROJECT_KEY created: -1M .. today"
# High priority issues
python migrate.py export --query "project: PROJECT_KEY Priority: Major"- Verify your YouTrack URL is correct
- Check that your API token has sufficient permissions
- Ensure the YouTrack instance is accessible
- Make sure your CSV file has the correct format
- Verify that the Title and Description columns are properly mapped
- Check that the CSV file is not too large (Linear has import limits)
This tool uses Linear's official import CLI tool (@linear/import) for reliability and official support. The interactive wizard makes it easy to configure the import, and it's the officially supported method from Linear.
MIT License - see LICENSE file for details.