345 lines
13 KiB
TypeScript
345 lines
13 KiB
TypeScript
import type { CommandSpec } from '../args'
|
|
import { GLOBAL_FLAGS } from '../args'
|
|
|
|
export const LINEAR_COMMAND_SPECS: CommandSpec[] = [
|
|
{
|
|
path: ['linear', 'save-issue'],
|
|
summary: 'Create or update a Linear issue',
|
|
usage:
|
|
'orca linear save-issue [<id>] [--current] [--team <key|id>] [--title <title>] [--description <text> | --body-file <path|->] [--state <state>] [--assignee me|<user>|null] [--priority none|low|medium|high|urgent] [--estimate <number>|null] [--due-date <yyyy-mm-dd>|null] [--label <label>...] [--project <project>|null] [--parent-id <issue>|null] [--write-id <uuid>] [--workspace <id>] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'current',
|
|
'team',
|
|
'title',
|
|
'description',
|
|
'body',
|
|
'body-file',
|
|
'state',
|
|
'assignee',
|
|
'priority',
|
|
'estimate',
|
|
'due-date',
|
|
'label',
|
|
'project',
|
|
'parent-id',
|
|
'write-id',
|
|
'workspace',
|
|
'id'
|
|
],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear save-issue --team ENG --title "Fix auth" --priority high --json',
|
|
'orca linear save-issue ENG-123 --title "Fix OAuth callback" --assignee me --json',
|
|
'orca linear save-issue --current --project null --due-date null --json'
|
|
],
|
|
notes: [
|
|
'Without <id> or --current, creates an issue and requires --team and --title.',
|
|
'Labels replace the complete label set, matching Linear MCP save_issue semantics.',
|
|
'Use the literal null to clear assignee, estimate, due date, project, or parent.'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'list-issues'],
|
|
summary: 'List Linear issues with MCP-compatible filters',
|
|
usage:
|
|
'orca linear list-issues [--team <team>] [--cycle <cycle>] [--label <label>] [--limit <n>] [--query <text>] [--state <state>] [--cursor <cursor>] [--order-by createdAt|updatedAt] [--project <project>] [--release <release>] [--assignee <user|me|null>] [--delegate <user|me|null>] [--parent-id <issue|null>] [--priority <0-4>] [--created-at <datetime|duration>] [--updated-at <datetime|duration>] [--include-archived] [--workspace <id>|all] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'team',
|
|
'cycle',
|
|
'label',
|
|
'limit',
|
|
'query',
|
|
'state',
|
|
'cursor',
|
|
'order-by',
|
|
'project',
|
|
'release',
|
|
'assignee',
|
|
'delegate',
|
|
'parent-id',
|
|
'priority',
|
|
'created-at',
|
|
'updated-at',
|
|
'include-archived',
|
|
'workspace'
|
|
],
|
|
examples: [
|
|
'orca linear list-issues --team ENG --state started --assignee me --json',
|
|
'orca linear list-issues --query auth --updated-at -P7D --limit 100 --json',
|
|
'orca linear list-issues --cursor <cursor> --workspace <id> --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'relation', 'add'],
|
|
summary: 'Add a Linear issue relation',
|
|
usage:
|
|
'orca linear relation add [<id>] [--current] --related <issue> --type blocks|blocked-by|related|duplicate-of [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'related', 'type', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear relation add ENG-1 --related ENG-2 --type blocks --json',
|
|
'orca linear relation add --current --related ENG-2 --type blocked-by --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'relation', 'remove'],
|
|
aliases: [['linear', 'relation', 'rm']],
|
|
summary: 'Remove a Linear issue relation',
|
|
usage:
|
|
'orca linear relation remove [<id>] [--current] --related <issue> --type blocks|blocked-by|related|duplicate-of [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'related', 'type', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear relation remove ENG-1 --related ENG-2 --type related --json']
|
|
},
|
|
{
|
|
path: ['linear', 'issue'],
|
|
summary: 'Read Linear issue context for agents',
|
|
usage:
|
|
'orca linear issue [<id>] [--current] [--comments] [--children] [--depth <n>] [--attachments] [--relations] [--activity] [--full] [--workspace <id>] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'current',
|
|
'comments',
|
|
'children',
|
|
'depth',
|
|
'attachments',
|
|
'relations',
|
|
'activity',
|
|
'full',
|
|
'workspace',
|
|
'id'
|
|
],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear issue ENG-123',
|
|
'orca linear issue --current --comments',
|
|
'orca linear issue https://linear.app/acme/issue/ENG-123 --full --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'search'],
|
|
summary: 'Search connected Linear workspaces',
|
|
usage: 'orca linear search <query> [--limit <n>] [--workspace <id>|all] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'limit', 'workspace', 'query'],
|
|
positionalArgs: ['query'],
|
|
examples: ['orca linear search "auth bug"', 'orca linear search ENG --workspace all --json']
|
|
},
|
|
{
|
|
path: ['linear', 'team', 'list'],
|
|
summary: 'List connected Linear teams',
|
|
usage: 'orca linear team list [--workspace <id>|all] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'workspace'],
|
|
examples: ['orca linear team list --workspace all --json']
|
|
},
|
|
{
|
|
path: ['linear', 'team', 'members'],
|
|
summary: 'List Linear team members',
|
|
usage: 'orca linear team members --team <key|id> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'team', 'workspace'],
|
|
examples: ['orca linear team members --team ENG --json']
|
|
},
|
|
{
|
|
path: ['linear', 'team', 'states'],
|
|
summary: 'List Linear team workflow states',
|
|
usage: 'orca linear team states --team <key|id> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'team', 'workspace'],
|
|
examples: ['orca linear team states --team ENG --json']
|
|
},
|
|
{
|
|
path: ['linear', 'team', 'labels'],
|
|
summary: 'List Linear team labels',
|
|
usage: 'orca linear team labels --team <key|id> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'team', 'workspace'],
|
|
examples: ['orca linear team labels --team ENG --json']
|
|
},
|
|
{
|
|
path: ['linear', 'project', 'list'],
|
|
summary: 'List connected Linear projects',
|
|
usage:
|
|
'orca linear project list [--query <text>] [--limit <n>] [--workspace <id>|all] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'query', 'limit', 'workspace'],
|
|
examples: [
|
|
'orca linear project list --query launch --json',
|
|
'orca linear project list --workspace all --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'list'],
|
|
summary: 'List Linear issues for task triage',
|
|
usage:
|
|
'orca linear list [--filter assigned|created|all|completed|open] [--team <key|id>] [--limit <n>] [--workspace <id>|all] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'filter', 'team', 'limit', 'workspace'],
|
|
examples: ['orca linear list --filter assigned --limit 10 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'status', 'set'],
|
|
summary: 'Set a Linear issue status',
|
|
usage: 'orca linear status set [<id>] [--current] --to <state> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'to', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear status set ENG-123 --to "In Review"',
|
|
'orca linear status set --current --to Done --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'assignee', 'set'],
|
|
summary: 'Assign a Linear issue',
|
|
usage:
|
|
'orca linear assignee set [<id>] [--current] (--me | --to-id <userId>) [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'me', 'to-id', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear assignee set --current --me --json']
|
|
},
|
|
{
|
|
path: ['linear', 'assignee', 'clear'],
|
|
summary: 'Clear a Linear issue assignee',
|
|
usage: 'orca linear assignee clear [<id>] [--current] [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear assignee clear ENG-123 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'priority', 'set'],
|
|
summary: 'Set a Linear issue priority',
|
|
usage:
|
|
'orca linear priority set [<id>] [--current] --to none|low|medium|high|urgent [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'to', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear priority set --current --to high --json']
|
|
},
|
|
{
|
|
path: ['linear', 'priority', 'clear'],
|
|
summary: 'Clear a Linear issue priority',
|
|
usage: 'orca linear priority clear [<id>] [--current] [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear priority clear ENG-123 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'estimate', 'set'],
|
|
summary: 'Set a Linear issue estimate',
|
|
usage: 'orca linear estimate set [<id>] [--current] --to <number> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'to', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear estimate set --current --to 3 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'estimate', 'clear'],
|
|
summary: 'Clear a Linear issue estimate',
|
|
usage: 'orca linear estimate clear [<id>] [--current] [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear estimate clear ENG-123 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'due-date', 'set'],
|
|
summary: 'Set a Linear issue due date',
|
|
usage:
|
|
'orca linear due-date set [<id>] [--current] --to <yyyy-mm-dd> [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'to', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear due-date set --current --to 2026-06-30 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'due-date', 'clear'],
|
|
summary: 'Clear a Linear issue due date',
|
|
usage: 'orca linear due-date clear [<id>] [--current] [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear due-date clear ENG-123 --json']
|
|
},
|
|
{
|
|
path: ['linear', 'label', 'add'],
|
|
summary: 'Add labels to a Linear issue',
|
|
usage:
|
|
'orca linear label add [<id>] [--current] --label <labelId-or-exact-name>... [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'label', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear label add --current --label Bug --json']
|
|
},
|
|
{
|
|
path: ['linear', 'label', 'remove'],
|
|
summary: 'Remove labels from a Linear issue',
|
|
usage:
|
|
'orca linear label remove [<id>] [--current] --label <labelId-or-exact-name>... [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'label', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear label remove --current --label Bug --json']
|
|
},
|
|
{
|
|
path: ['linear', 'label', 'set'],
|
|
summary: 'Replace labels on a Linear issue',
|
|
usage:
|
|
'orca linear label set [<id>] [--current] --label <labelId-or-exact-name>... [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'label', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: ['orca linear label set ENG-123 --label Bug --json']
|
|
},
|
|
{
|
|
path: ['linear', 'comment', 'add'],
|
|
summary: 'Add a comment to a Linear issue',
|
|
usage:
|
|
'orca linear comment add [<id>] [--current] (--body <text> | --body-file <path|->) [--reply-to <commentId>] [--write-id <uuid>] [--workspace <id>] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'current',
|
|
'body',
|
|
'body-file',
|
|
'reply-to',
|
|
'write-id',
|
|
'workspace',
|
|
'id'
|
|
],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear comment add ENG-123 --body "Implementation is ready for review."',
|
|
'orca linear comment add --current --body-file - --json'
|
|
],
|
|
notes: ['Use --body-file - to read multiline comment bodies from stdin.']
|
|
},
|
|
{
|
|
path: ['linear', 'attach'],
|
|
summary: 'Attach a link to a Linear issue',
|
|
usage:
|
|
'orca linear attach [<id>] [--current] --url <url> [--title <title>] [--write-id <uuid>] [--workspace <id>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, 'current', 'url', 'title', 'write-id', 'workspace', 'id'],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca linear attach ENG-123 --url https://example.com/review/123 --title "PR/MR link"',
|
|
'orca linear attach --current --url https://example.com/review/123 --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['linear', 'create'],
|
|
summary: 'Create a Linear issue',
|
|
usage:
|
|
'orca linear create --title <title> [--body <text> | --body-file <path|->] [--team <key|id>] [--project <projectId-or-exact-name>] [--state <stateId|exact-name>] [--assignee me|<userId>] [--priority none|low|medium|high|urgent] [--estimate <number>] [--due-date <yyyy-mm-dd>] [--label <labelId-or-exact-name>]... [--parent <id> | --parent-current] [--write-id <uuid>] [--workspace <id>] [--json]',
|
|
allowedFlags: [
|
|
...GLOBAL_FLAGS,
|
|
'title',
|
|
'body',
|
|
'body-file',
|
|
'team',
|
|
'project',
|
|
'state',
|
|
'assignee',
|
|
'priority',
|
|
'estimate',
|
|
'due-date',
|
|
'label',
|
|
'parent',
|
|
'parent-current',
|
|
'write-id',
|
|
'workspace'
|
|
],
|
|
examples: [
|
|
'orca linear create --title "Investigate flaky login" --team ENG --project "Launch"',
|
|
'orca linear create --title "Follow-up bug" --parent-current --body-file - --json'
|
|
],
|
|
notes: ['Use --body-file - to read multiline issue bodies from stdin.']
|
|
}
|
|
]
|