@ruminaider/linear-cli
v0.2.2
Published
JSON-first CLI for Linear. Wraps every authenticated Linear MCP tool: projects, issues, comments, attachments, cycles, documents, milestones, teams, users, labels, statuses, images, and docs search.
Downloads
257
Maintainers
Readme
@ruminaider/linear-cli
JSON-first CLI access to Linear through its authenticated remote MCP server. Every command maps 1:1 to a Linear MCP tool.
Command surface
linear-cli auth login|logout|status(with optional--api-key <key>)linear-cli mcp discoverlinear-cli project list|get|savelinear-cli project-label listlinear-cli issue list|get|savelinear-cli issue-label list|createlinear-cli status list|getlinear-cli comment list|save|deletelinear-cli attachment get|create|deletelinear-cli cycle listlinear-cli document list|get|create|updatelinear-cli milestone list|get|savelinear-cli team list|getlinear-cli user list|getlinear-cli image extractlinear-cli docs search
Run linear-cli help for the full flag reference.
Install from repo
bash linear/install.shAuth precedence
- Explicit
--api-key LINEAR_API_KEY- Persisted credentials in
~/.config/linear-cli/credentials.json
Team defaults resolve separately:
- Explicit
--team LINEAR_DEFAULT_TEAM- Persisted defaults in
~/.config/linear-cli/config.json
Write commands
project save→save_project(create or update a project)issue save→save_issue(create or update an issue, plus relation append and removal)issue-label create→create_issue_labelcomment save/comment delete→save_comment/delete_commentattachment create/attachment delete→create_attachment/delete_attachmentdocument create/document update→create_document/update_documentmilestone save→save_milestone
See the package README for examples and the per-flag reference for each command.
End-to-end regression test
cli/scripts/e2e.sh exercises the full skill workflow against a real Linear workspace (create issue, assign and clear, add/delete comment, attach/delete file, filter by unassigned, cancel the issue). Run it before each release:
LINEAR_DEFAULT_TEAM=<team> npm run e2e
# or: bash cli/scripts/e2e.sh --team <team>
# add --keep to skip the Canceled state cleanup when debugging a failureThe script requires a usable auth credential (OAuth or LINEAR_API_KEY) and writes only to a disposable test issue clearly titled "linear-cli e2e ... (safe to delete)".
Notes
- Output is JSON-first. Tool-level errors returned by the server (for example, "Entity not found") surface under
resultwithok: true; always inspect the body. - The current Linear MCP session negotiates protocol
2024-11-05. - Null-to-remove semantics on
save_issueandsave_projectare not reachable through the CLI. Use the Linear UI for explicit clears. - Milestone status (
done,next,overdue,unstarted) is read-only in Linear's API.save_milestoneaccepts onlyname,description, andtargetDate; the platform derives status from the milestone's target date and the completion state of its issues. To mark a milestone done, complete its issues; to clear an overdue status, adjust--target-dateor finish the work.
