KosmoKrator

productivity

Linear CLI for AI Agents

Use the Linear CLI from KosmoKrator to call Linear tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

20 functions 11 read 9 write API key auth

Linear CLI Setup

Linear can be configured headlessly with `kosmokrator integrations:configure linear`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure linear --set api_key="$LINEAR_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor linear --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key LINEAR_API_KEY Secret secret yes API Key

Call Linear Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call linear.linear_create_issue '{
  "team_id": "example_team_id",
  "title": "example_title",
  "description": "example_description",
  "priority": 1,
  "assignee_id": "example_assignee_id",
  "label_ids": "example_label_ids",
  "state_id": "example_state_id"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:linear linear_create_issue '{
  "team_id": "example_team_id",
  "title": "example_title",
  "description": "example_description",
  "priority": 1,
  "assignee_id": "example_assignee_id",
  "label_ids": "example_label_ids",
  "state_id": "example_state_id"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs linear --json
kosmo integrations:docs linear.linear_create_issue --json
kosmo integrations:schema linear.linear_create_issue --json
kosmo integrations:search "Linear" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Linear.

linear.linear_create_issue

Write write

Create a new issue in Linear. Requires a team ID and title. Optionally set description, priority (0=none, 1=urgent, 2=high, 3=medium, 4=low), assignee, labels, and initial state. Use linear_get_teams to find team IDs.

Parameters
team_id, title, description, priority, assignee_id, label_ids, state_id

Generic CLI call

kosmo integrations:call linear.linear_create_issue '{"team_id":"example_team_id","title":"example_title","description":"example_description","priority":1,"assignee_id":"example_assignee_id","label_ids":"example_label_ids","state_id":"example_state_id"}' --json

Provider shortcut

kosmo integrations:linear linear_create_issue '{"team_id":"example_team_id","title":"example_title","description":"example_description","priority":1,"assignee_id":"example_assignee_id","label_ids":"example_label_ids","state_id":"example_state_id"}' --json

linear.linear_get_issue

Read read

Get a single Linear issue by ID or identifier (e.g., "TEAM-123"). Returns full details including description, state, assignee, labels, team info, and comments.

Parameters
id

Generic CLI call

kosmo integrations:call linear.linear_get_issue '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:linear linear_get_issue '{"id":"example_id"}' --json

linear.linear_update_issue

Write write

Update an existing Linear issue. Provide the issue ID or identifier and any fields to change. Only specified fields will be updated. Priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low.

Parameters
id, title, description, priority, assignee_id, state_id, label_ids

Generic CLI call

kosmo integrations:call linear.linear_update_issue '{"id":"example_id","title":"example_title","description":"example_description","priority":1,"assignee_id":"example_assignee_id","state_id":"example_state_id","label_ids":"example_label_ids"}' --json

Provider shortcut

kosmo integrations:linear linear_update_issue '{"id":"example_id","title":"example_title","description":"example_description","priority":1,"assignee_id":"example_assignee_id","state_id":"example_state_id","label_ids":"example_label_ids"}' --json

linear.linear_search_issues

Read read

Search Linear issues using filter criteria. Supports filtering by text query, team, state name, assignee, and priority. Returns matching issues with pagination info.

Parameters
query, team_id, state, assignee_id, priority, limit

Generic CLI call

kosmo integrations:call linear.linear_search_issues '{"query":"example_query","team_id":"example_team_id","state":"example_state","assignee_id":"example_assignee_id","priority":1,"limit":1}' --json

Provider shortcut

kosmo integrations:linear linear_search_issues '{"query":"example_query","team_id":"example_team_id","state":"example_state","assignee_id":"example_assignee_id","priority":1,"limit":1}' --json

linear.linear_list_issues

Read read

List issues for a specific Linear team. Supports filtering by status, assignee, and cursor-based pagination. Use linear_get_teams to find team IDs.

Parameters
team_id, status, assignee_id, limit, after

Generic CLI call

kosmo integrations:call linear.linear_list_issues '{"team_id":"example_team_id","status":"example_status","assignee_id":"example_assignee_id","limit":1,"after":"example_after"}' --json

Provider shortcut

kosmo integrations:linear linear_list_issues '{"team_id":"example_team_id","status":"example_status","assignee_id":"example_assignee_id","limit":1,"after":"example_after"}' --json

linear.linear_delete_issue

Write write

Delete a Linear issue by ID or identifier. This action is irreversible.

Parameters
id

Generic CLI call

kosmo integrations:call linear.linear_delete_issue '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:linear linear_delete_issue '{"id":"example_id"}' --json

linear.linear_create_comment

Write write

Add a comment to a Linear issue. Supports markdown formatting. Provide the issue ID or identifier and the comment body.

Parameters
issue_id, body

Generic CLI call

kosmo integrations:call linear.linear_create_comment '{"issue_id":"example_issue_id","body":"example_body"}' --json

Provider shortcut

kosmo integrations:linear linear_create_comment '{"issue_id":"example_issue_id","body":"example_body"}' --json

linear.linear_list_comments

Read read

List all comments on a Linear issue, ordered chronologically. Provide the issue ID or identifier.

Parameters
issue_id

Generic CLI call

kosmo integrations:call linear.linear_list_comments '{"issue_id":"example_issue_id"}' --json

Provider shortcut

kosmo integrations:linear linear_list_comments '{"issue_id":"example_issue_id"}' --json

linear.linear_get_teams

Read read

Get all Linear teams the authenticated user has access to, including team name, key, description, and member list. Use this to discover team IDs needed for other tools.

Parameters
none

Generic CLI call

kosmo integrations:call linear.linear_get_teams '{}' --json

Provider shortcut

kosmo integrations:linear linear_get_teams '{}' --json

linear.linear_list_projects

Read read

List Linear projects with optional cursor-based pagination. Returns project details including state, dates, lead, and associated teams.

Parameters
limit, after

Generic CLI call

kosmo integrations:call linear.linear_list_projects '{"limit":1,"after":"example_after"}' --json

Provider shortcut

kosmo integrations:linear linear_list_projects '{"limit":1,"after":"example_after"}' --json

linear.linear_create_project

Write write

Create a new Linear project. Requires a name and at least one team ID. Optionally set description, lead, and target dates. Use linear_get_teams to find team IDs.

Parameters
name, description, team_ids, lead_id

Generic CLI call

kosmo integrations:call linear.linear_create_project '{"name":"example_name","description":"example_description","team_ids":"example_team_ids","lead_id":"example_lead_id"}' --json

Provider shortcut

kosmo integrations:linear linear_create_project '{"name":"example_name","description":"example_description","team_ids":"example_team_ids","lead_id":"example_lead_id"}' --json

linear.linear_update_project

Write write

Update a Linear project. Provide the project ID and any fields to change. Only specified fields will be updated.

Parameters
id, name, description, state

Generic CLI call

kosmo integrations:call linear.linear_update_project '{"id":"example_id","name":"example_name","description":"example_description","state":"example_state"}' --json

Provider shortcut

kosmo integrations:linear linear_update_project '{"id":"example_id","name":"example_name","description":"example_description","state":"example_state"}' --json

linear.linear_list_initiatives

Read read

List Linear initiatives with optional limit. Returns initiative details including state, dates, and associated projects.

Parameters
limit

Generic CLI call

kosmo integrations:call linear.linear_list_initiatives '{"limit":1}' --json

Provider shortcut

kosmo integrations:linear linear_list_initiatives '{"limit":1}' --json

linear.linear_create_initiative

Write write

Create a new Linear initiative. Initiatives group related projects together. Requires a name. Optionally include a description.

Parameters
name, description

Generic CLI call

kosmo integrations:call linear.linear_create_initiative '{"name":"example_name","description":"example_description"}' --json

Provider shortcut

kosmo integrations:linear linear_create_initiative '{"name":"example_name","description":"example_description"}' --json

linear.linear_list_labels

Read read

List issue labels in Linear. Optionally filter by team. Returns label ID, name, color, and description.

Parameters
team_id

Generic CLI call

kosmo integrations:call linear.linear_list_labels '{"team_id":"example_team_id"}' --json

Provider shortcut

kosmo integrations:linear linear_list_labels '{"team_id":"example_team_id"}' --json

linear.linear_add_label

Write write

Add a label to a Linear issue. Provide the issue ID or identifier and the label ID to add. The label will be appended to existing labels. Use linear_list_labels to find label IDs.

Parameters
issue_id, label_id

Generic CLI call

kosmo integrations:call linear.linear_add_label '{"issue_id":"example_issue_id","label_id":"example_label_id"}' --json

Provider shortcut

kosmo integrations:linear linear_add_label '{"issue_id":"example_issue_id","label_id":"example_label_id"}' --json

linear.linear_remove_label

Write write

Remove a label from a Linear issue. Provide the issue ID or identifier and the label ID to remove. Other labels on the issue are preserved.

Parameters
issue_id, label_id

Generic CLI call

kosmo integrations:call linear.linear_remove_label '{"issue_id":"example_issue_id","label_id":"example_label_id"}' --json

Provider shortcut

kosmo integrations:linear linear_remove_label '{"issue_id":"example_issue_id","label_id":"example_label_id"}' --json

linear.linear_get_current_user

Read read

Get the currently authenticated Linear user's profile, including ID, name, email, and avatar URL.

Parameters
none

Generic CLI call

kosmo integrations:call linear.linear_get_current_user '{}' --json

Provider shortcut

kosmo integrations:linear linear_get_current_user '{}' --json

linear.linear_list_workflows

Read read

List workflow states for a Linear team. Shows all available statuses (e.g., Backlog, Todo, In Progress, Done) with their IDs, types, and colors. Optionally filter by team ID.

Parameters
team_id

Generic CLI call

kosmo integrations:call linear.linear_list_workflows '{"team_id":"example_team_id"}' --json

Provider shortcut

kosmo integrations:linear linear_list_workflows '{"team_id":"example_team_id"}' --json

linear.linear_raw_query

Read read

Execute an arbitrary GraphQL query or mutation against the Linear API. Provide a GraphQL document and optional variables as JSON. Use this for advanced operations not covered by other tools.

Parameters
query, variables

Generic CLI call

kosmo integrations:call linear.linear_raw_query '{"query":"example_query","variables":"example_variables"}' --json

Provider shortcut

kosmo integrations:linear linear_raw_query '{"query":"example_query","variables":"example_variables"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

linear.linear_create_issue

Create a new issue in Linear. Requires a team ID and title. Optionally set description, priority (0=none, 1=urgent, 2=high, 3=medium, 4=low), assignee, labels, and initial state. Use linear_get_teams to find team IDs.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_create_issue --json
ParameterTypeRequiredDescription
team_id string yes Team ID to create the issue in.
title string yes Issue title.
description string no Issue description (markdown supported).
priority integer no Priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low.
assignee_id string no User ID to assign the issue to.
label_ids string no Comma-separated label IDs to apply.
state_id string no Workflow state ID for the initial status.

linear.linear_get_issue

Get a single Linear issue by ID or identifier (e.g., "TEAM-123"). Returns full details including description, state, assignee, labels, team info, and comments.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_get_issue --json
ParameterTypeRequiredDescription
id string yes Issue ID or identifier (e.g., "TEAM-123").

linear.linear_update_issue

Update an existing Linear issue. Provide the issue ID or identifier and any fields to change. Only specified fields will be updated. Priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_update_issue --json
ParameterTypeRequiredDescription
id string yes Issue ID or identifier to update.
title string no New title.
description string no New description (markdown).
priority integer no Priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low.
assignee_id string no User ID to assign.
state_id string no Workflow state ID to set.
label_ids string no Comma-separated label IDs to set (replaces existing labels).

linear.linear_search_issues

Search Linear issues using filter criteria. Supports filtering by text query, team, state name, assignee, and priority. Returns matching issues with pagination info.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_search_issues --json
ParameterTypeRequiredDescription
query string no Text to search in issue titles and descriptions.
team_id string no Filter by team ID.
state string no Filter by state name (e.g., "In Progress", "Done").
assignee_id string no Filter by assignee user ID.
priority integer no Filter by priority: 0=none, 1=urgent, 2=high, 3=medium, 4=low.
limit integer no Max results to return. Default: 20.

linear.linear_list_issues

List issues for a specific Linear team. Supports filtering by status, assignee, and cursor-based pagination. Use linear_get_teams to find team IDs.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_issues --json
ParameterTypeRequiredDescription
team_id string yes Team ID to list issues for.
status string no Filter by state name (e.g., "In Progress", "Backlog").
assignee_id string no Filter by assignee user ID.
limit integer no Results per page. Default: 25.
after string no Cursor for next page (from previous response endCursor).

linear.linear_delete_issue

Delete a Linear issue by ID or identifier. This action is irreversible.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_delete_issue --json
ParameterTypeRequiredDescription
id string yes Issue ID or identifier to delete (e.g., "TEAM-123").

linear.linear_create_comment

Add a comment to a Linear issue. Supports markdown formatting. Provide the issue ID or identifier and the comment body.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_create_comment --json
ParameterTypeRequiredDescription
issue_id string yes Issue ID or identifier to comment on.
body string yes Comment body text (markdown supported).

linear.linear_list_comments

List all comments on a Linear issue, ordered chronologically. Provide the issue ID or identifier.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_comments --json
ParameterTypeRequiredDescription
issue_id string yes Issue ID or identifier to list comments for.

linear.linear_get_teams

Get all Linear teams the authenticated user has access to, including team name, key, description, and member list. Use this to discover team IDs needed for other tools.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_get_teams --json
ParameterTypeRequiredDescription
No parameters.

linear.linear_list_projects

List Linear projects with optional cursor-based pagination. Returns project details including state, dates, lead, and associated teams.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_projects --json
ParameterTypeRequiredDescription
limit integer no Results per page. Default: 25.
after string no Cursor for next page (from previous response endCursor).

linear.linear_create_project

Create a new Linear project. Requires a name and at least one team ID. Optionally set description, lead, and target dates. Use linear_get_teams to find team IDs.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_create_project --json
ParameterTypeRequiredDescription
name string yes Project name.
description string no Project description.
team_ids string yes Comma-separated team IDs to associate.
lead_id string no User ID of the project lead.

linear.linear_update_project

Update a Linear project. Provide the project ID and any fields to change. Only specified fields will be updated.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_update_project --json
ParameterTypeRequiredDescription
id string yes Project ID to update.
name string no New project name.
description string no New description.
state string no New project state (e.g., "planned", "active", "paused", "completed", "canceled").

linear.linear_list_initiatives

List Linear initiatives with optional limit. Returns initiative details including state, dates, and associated projects.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_initiatives --json
ParameterTypeRequiredDescription
limit integer no Max results to return. Default: 25.

linear.linear_create_initiative

Create a new Linear initiative. Initiatives group related projects together. Requires a name. Optionally include a description.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_create_initiative --json
ParameterTypeRequiredDescription
name string yes Initiative name.
description string no Initiative description.

linear.linear_list_labels

List issue labels in Linear. Optionally filter by team. Returns label ID, name, color, and description.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_labels --json
ParameterTypeRequiredDescription
team_id string no Team ID to filter labels by.

linear.linear_add_label

Add a label to a Linear issue. Provide the issue ID or identifier and the label ID to add. The label will be appended to existing labels. Use linear_list_labels to find label IDs.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_add_label --json
ParameterTypeRequiredDescription
issue_id string yes Issue ID or identifier.
label_id string yes Label ID to add.

linear.linear_remove_label

Remove a label from a Linear issue. Provide the issue ID or identifier and the label ID to remove. Other labels on the issue are preserved.

Operation
Write write
Schema command
kosmo integrations:schema linear.linear_remove_label --json
ParameterTypeRequiredDescription
issue_id string yes Issue ID or identifier.
label_id string yes Label ID to remove.

linear.linear_get_current_user

Get the currently authenticated Linear user's profile, including ID, name, email, and avatar URL.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

linear.linear_list_workflows

List workflow states for a Linear team. Shows all available statuses (e.g., Backlog, Todo, In Progress, Done) with their IDs, types, and colors. Optionally filter by team ID.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_list_workflows --json
ParameterTypeRequiredDescription
team_id string no Team ID to filter workflow states by.

linear.linear_raw_query

Execute an arbitrary GraphQL query or mutation against the Linear API. Provide a GraphQL document and optional variables as JSON. Use this for advanced operations not covered by other tools.

Operation
Read read
Schema command
kosmo integrations:schema linear.linear_raw_query --json
ParameterTypeRequiredDescription
query string yes GraphQL query or mutation document.
variables string no Variables as a JSON object string.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.