linear-cli by schpet/linear-cli
npx skills add https://github.com/schpet/linear-cli --skill linear-cli一个用于从命令行管理 Linear 问题的 CLI,集成了 git 和 jj。
linear 命令必须在 PATH 环境变量中可用。检查方法:
linear --version
如果未安装,请按照以下说明操作:
https://github.com/schpet/linear-cli?tab=readme-ov-file#install
当处理包含 markdown 的问题描述或评论正文时,应始终优先使用基于文件的标志,而不是将内容作为命令行参数传递:
issue create 和 issue update 命令,使用 --description-filecomment add 和 comment update 命令,使用 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
--body-file为什么使用基于文件的标志:
\n 序列出现在 markdown 中示例工作流程:
# 将 markdown 写入临时文件
cat > /tmp/description.md <<'EOF'
## 摘要
- 第一项
- 第二项
## 详情
这是一个格式正确的详细描述。
EOF
# 使用文件创建问题
linear issue create --title "我的问题" --description-file /tmp/description.md
# 或者对于评论
linear issue comment add ENG-123 --body-file /tmp/comment.md
仅对简单的单行内容使用内联标志(--description, --body)。
linear auth # 管理 Linear 身份验证
linear issue # 管理 Linear 问题
linear team # 管理 Linear 团队
linear project # 管理 Linear 项目
linear project-update # 管理项目状态更新
linear cycle # 管理 Linear 团队周期
linear milestone # 管理 Linear 项目里程碑
linear initiative # 管理 Linear 计划
linear initiative-update # 管理计划状态更新(时间线帖子)
linear label # 管理 Linear 问题标签
linear document # 管理 Linear 文档
linear config # 交互式生成 .linear.toml 配置
linear schema # 将 GraphQL 模式打印到 stdout
linear api # 发起原始 GraphQL API 请求
有关组织功能(计划、标签、项目、批量操作)的精选示例,请参阅 organization-features。
要查看可用的子命令和标志,请在任意命令上运行 --help:
linear --help
linear issue --help
linear issue list --help
linear issue create --help
每个命令都有详细的帮助输出,描述了所有可用的标志和选项。
对于所有支持的操作,请优先使用 CLI。 api 命令应仅作为 CLI 未涵盖的查询的备用方案。
将模式写入临时文件,然后搜索它:
linear schema -o "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -i "cycle" "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -A 30 "^type Issue " "${TMPDIR:-/tmp}/linear-schema.graphql"
重要提示: 包含非空类型标记(例如 String 后跟感叹号)的 GraphQL 查询必须通过 heredoc stdin 传递,以避免转义问题。没有这些标记的简单查询可以内联传递。
# 简单查询(无类型标记,因此内联即可)
linear api '{ viewer { id name email } }'
# 带变量的查询 — 使用 heredoc 以避免转义问题
linear api --variable teamId=abc123 <<'GRAPHQL'
query($teamId: String!) { team(id: $teamId) { name } }
GRAPHQL
# 按文本搜索问题
linear api --variable term=onboarding <<'GRAPHQL'
query($term: String!) { searchIssues(term: $term, first: 20) { nodes { identifier title state { name } } } }
GRAPHQL
# 数字和布尔变量
linear api --variable first=5 <<'GRAPHQL'
query($first: Int!) { issues(first: $first) { nodes { title } } }
GRAPHQL
# 通过 JSON 传递复杂变量
linear api --variables-json '{"filter": {"state": {"name": {"eq": "In Progress"}}}}' <<'GRAPHQL'
query($filter: IssueFilter!) { issues(filter: $filter) { nodes { title } } }
GRAPHQL
# 通过管道传递给 jq 进行过滤
linear api '{ issues(first: 5) { nodes { identifier title } } }' | jq '.data.issues.nodes[].title'
对于需要完全 HTTP 控制的情况,使用 linear auth token:
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $(linear auth token)" \
-d '{"query": "{ viewer { id } }"}'
每周安装量
2.2K
仓库
GitHub 星标数
506
首次出现
2026年1月23日
安全审计
安装于
opencode2.0K
codex1.9K
gemini-cli1.9K
github-copilot1.9K
amp1.9K
kimi-cli1.9K
A CLI to manage Linear issues from the command line, with git and jj integration.
The linear command must be available on PATH. To check:
linear --version
If not installed, follow the instructions at:
https://github.com/schpet/linear-cli?tab=readme-ov-file#install
When working with issue descriptions or comment bodies that contain markdown, always prefer using file-based flags instead of passing content as command-line arguments:
--description-file for issue create and issue update commands--body-file for comment add and comment update commandsWhy use file-based flags:
\n sequences from appearing in markdownExample workflow:
# Write markdown to a temporary file
cat > /tmp/description.md <<'EOF'
## Summary
- First item
- Second item
## Details
This is a detailed description with proper formatting.
EOF
# Create issue using the file
linear issue create --title "My Issue" --description-file /tmp/description.md
# Or for comments
linear issue comment add ENG-123 --body-file /tmp/comment.md
Only use inline flags (--description, --body) for simple, single-line content.
linear auth # Manage Linear authentication
linear issue # Manage Linear issues
linear team # Manage Linear teams
linear project # Manage Linear projects
linear project-update # Manage project status updates
linear cycle # Manage Linear team cycles
linear milestone # Manage Linear project milestones
linear initiative # Manage Linear initiatives
linear initiative-update # Manage initiative status updates (timeline posts)
linear label # Manage Linear issue labels
linear document # Manage Linear documents
linear config # Interactively generate .linear.toml configuration
linear schema # Print the GraphQL schema to stdout
linear api # Make a raw GraphQL API request
For curated examples of organization features (initiatives, labels, projects, bulk operations), see organization-features.
To see available subcommands and flags, run --help on any command:
linear --help
linear issue --help
linear issue list --help
linear issue create --help
Each command has detailed help output describing all available flags and options.
Prefer the CLI for all supported operations. The api command should only be used as a fallback for queries not covered by the CLI.
Write the schema to a tempfile, then search it:
linear schema -o "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -i "cycle" "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -A 30 "^type Issue " "${TMPDIR:-/tmp}/linear-schema.graphql"
Important: GraphQL queries containing non-null type markers (e.g. String followed by an exclamation mark) must be passed via heredoc stdin to avoid escaping issues. Simple queries without those markers can be passed inline.
# Simple query (no type markers, so inline is fine)
linear api '{ viewer { id name email } }'
# Query with variables — use heredoc to avoid escaping issues
linear api --variable teamId=abc123 <<'GRAPHQL'
query($teamId: String!) { team(id: $teamId) { name } }
GRAPHQL
# Search issues by text
linear api --variable term=onboarding <<'GRAPHQL'
query($term: String!) { searchIssues(term: $term, first: 20) { nodes { identifier title state { name } } } }
GRAPHQL
# Numeric and boolean variables
linear api --variable first=5 <<'GRAPHQL'
query($first: Int!) { issues(first: $first) { nodes { title } } }
GRAPHQL
# Complex variables via JSON
linear api --variables-json '{"filter": {"state": {"name": {"eq": "In Progress"}}}}' <<'GRAPHQL'
query($filter: IssueFilter!) { issues(filter: $filter) { nodes { title } } }
GRAPHQL
# Pipe to jq for filtering
linear api '{ issues(first: 5) { nodes { identifier title } } }' | jq '.data.issues.nodes[].title'
For cases where you need full HTTP control, use linear auth token:
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $(linear auth token)" \
-d '{"query": "{ viewer { id } }"}'
Weekly Installs
2.2K
Repository
GitHub Stars
506
First Seen
Jan 23, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
opencode2.0K
codex1.9K
gemini-cli1.9K
github-copilot1.9K
amp1.9K
kimi-cli1.9K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装