mcpField
L
linear-api

linear-api

github.com/nesszer开发138134 次安装6 周前更新
代码仓库

关于 linear-api

linear-api 通过 linear-cli 提供执行原始 GraphQL 查询和变更的能力,支持变量与 JSON 输出,适合需要直接调用 Linear API 的开发者。

主要功能

  1. 01执行 GraphQL 查询
  2. 02执行 GraphQL 变更
  3. 03传入查询变量
  4. 04输出 JSON
  5. 05提供明确退出码

适用场景

  1. 01查询 Linear 中的用户或团队信息
  2. 02使用变量运行 GraphQL 请求
  3. 03在脚本中处理 API 结果和错误

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/nesszer/linear-cli --skill linear-api

安装后在 Claude Code 中输入/linear-api确认已加载。

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

Raw GraphQL API

# Run a query
linear-cli api query '{ viewer { id name email } }'

# Query with variables
linear-cli api query -v teamId=abc '{ team(id: $teamId) { name } }'

# Run a mutation
linear-cli api mutate -v title="Bug" '
  mutation($title: String!) {
    issueCreate(input: { title: $title, teamId: "..." }) {
      issue { id identifier }
    }
  }
'

# Pipe query from file
cat query.graphql | linear-cli api query -

Flags

FlagPurpose
-v key=valGraphQL variables
--output jsonJSON output
--compactCompact JSON

Exit Codes

0=Success, 1=Error, 2=Not found, 3=Auth error

评论

支持 Markdown