productivity
Linear CLI for CI
Use the Linear CLI for CI with headless JSON commands, schema discovery, credentials, and permission controls.
20 functions 11 read 9 write API key auth
Linear CLI for CI
Run integration calls from CI jobs with JSON output, explicit credentials, and predictable exit status.
Use this shape when a pipeline needs to read or update an external service. The Linear CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Linear CLI for CI
kosmokrator integrations:configure linear --set api_key="$LINEAR_API_KEY" --enable --read allow --write ask --json
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 Discovery Before Execution
Agents and scripts can inspect Linear docs and schemas 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 Useful Linear CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
linear.linear_create_issue | Write | team_id, title, description, priority, assignee_id, label_ids, state_id | 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. |
linear.linear_get_issue | Read | id | 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. |
linear.linear_update_issue | Write | id, title, description, priority, assignee_id, state_id, label_ids | 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. |
linear.linear_search_issues | Read | query, team_id, state, assignee_id, priority, limit | Search Linear issues using filter criteria. Supports filtering by text query, team, state name, assignee, and priority. Returns matching issues with pagination info. |
linear.linear_list_issues | Read | team_id, status, assignee_id, limit, after | List issues for a specific Linear team. Supports filtering by status, assignee, and cursor-based pagination. Use linear_get_teams to find team IDs. |
linear.linear_delete_issue | Write | id | Delete a Linear issue by ID or identifier. This action is irreversible. |
linear.linear_create_comment | Write | issue_id, body | Add a comment to a Linear issue. Supports markdown formatting. Provide the issue ID or identifier and the comment body. |
linear.linear_list_comments | Read | issue_id | List all comments on a Linear issue, ordered chronologically. Provide the issue ID or identifier. |
linear.linear_get_teams | Read | none | 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. |
linear.linear_list_projects | Read | limit, after | List Linear projects with optional cursor-based pagination. Returns project details including state, dates, lead, and associated teams. |
linear.linear_create_project | Write | name, description, team_ids, lead_id | 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. |
linear.linear_update_project | Write | id, name, description, state | Update a Linear project. Provide the project ID and any fields to change. Only specified fields will be updated. |
linear.linear_list_initiatives | Read | limit | List Linear initiatives with optional limit. Returns initiative details including state, dates, and associated projects. |
linear.linear_create_initiative | Write | name, description | Create a new Linear initiative. Initiatives group related projects together. Requires a name. Optionally include a description. |
linear.linear_list_labels | Read | team_id | List issue labels in Linear. Optionally filter by team. Returns label ID, name, color, and description. |
linear.linear_add_label | Write | issue_id, label_id | 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. |
linear.linear_remove_label | Write | issue_id, label_id | 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. |
linear.linear_get_current_user | Read | none | Get the currently authenticated Linear user's profile, including ID, name, email, and avatar URL. |
linear.linear_list_workflows | Read | team_id | 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. |
linear.linear_raw_query | Read | query, variables | 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. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.