Open issues with custom scripts
Overview
While many coding tools are supported in coding tool preferences, you can also choose to open issues using local scripts.This is particularly useful if you want to connect Linear to tools not supported in preferences.
Custom scripts let you define precisely how an issue should be opened. You might choose to open issues through a CLI tool, internal script, or custom development workflow. Linear passes issue context into your command at runtime.
How it works
- Enable Custom script in coding tool preferences.
- Define a command in
~/.linear/coding-tools.json. - Select Work on issue → Custom script in Linear.
Linear will run your command locally and inject any variables you’ve configured.
The first time you use this feature, Linear will generate a starter config file. You can edit it to point to your executable and arguments.
Configuration
Each script is defined in coding-tools.json with the following fields:
- path: Absolute path to the executable
- args (optional): Command-line arguments; supports
{{variable}}templating - env (optional): List of
LINEAR_*environment variables to expose
Template variables
You can use variables in args:
promptissue.identifierissue.branchNameproject.namepullRequestComment.id
Environment variables
Expose these via the env array:
LINEAR_PROMPT: Full prompt textLINEAR_ISSUE_IDENTIFIER: Issue IDLINEAR_ISSUE_BRANCH_NAME: Suggested branch nameLINEAR_PROJECT_NAME: Project nameLINEAR_PULL_REQUEST_COMMENT_ID: PR comment ID (if available)
Example
{
"openIssue": {
"path": "/absolute/path/to/executable",
"args": [
"--issue",
"{{issue.identifier}}",
"--branch",
"{{issue.branchName}}",
"{{prompt}}"
],
"env": [
"LINEAR_PROMPT",
"LINEAR_WORK_DIR",
"LINEAR_PROJECT_NAME"
]
}
}