Agent skill
linear-cli
This skill should be used when users need to manage Linear issues, tasks, or projects via command line. Triggers on requests mentioning Linear issues, issue tracking, creating issues, updating issue status, managing Linear projects, or Linear CLI operations.
Install this agent skill to your Project
npx add-skill https://github.com/oldwinter/skills/tree/main/lenny-skills/product-skills/linear-cli
SKILL.md
Linear CLI Skill
This skill provides instructions for managing Linear issues, tasks, and projects using the linear-cli command-line tool. Linear is a modern issue tracker designed for software teams, and the CLI enables workflow management directly from the terminal.
Installation
First, install the linear-cli tool:
# Using Homebrew
brew install schpet/tap/linear
# Or using Deno
deno install -A --reload -f -g -n linear jsr:@schpet/linear-cli
Setup
-
Create an API key at https://linear.app/settings/account/security (requires member access)
-
Add the API key to shell environment:
bash# In ~/.bashrc or ~/.zshrc: export LINEAR_API_KEY="lin_api_..." # Or in fish: set -Ux LINEAR_API_KEY="lin_api_..." -
Run the configuration wizard in your project repository:
bashcd my-project-repo linear configThis creates a
.linear.tomlconfig file with workspace and team settings.
Issue Management
View Issues
View the current issue (determined from git branch name or jj commit trailer):
linear issue view # View current issue in terminal
linear issue view ABC-123 # View specific issue
linear issue view -w # Open issue in web browser
linear issue view -a # Open issue in Linear.app
linear issue id # Print issue ID from current branch
linear issue title # Print issue title
linear issue url # Print Linear.app URL
List Issues
List issues with filtering and sorting options:
linear issue list # List unstarted issues assigned to you
linear issue list -A # List unstarted issues assigned to anyone
linear issue list -s "In Progress" # Filter by state
linear issue list -w # Open in web browser
linear issue list -a # Open in Linear.app
Start Working on an Issue
Create or switch to an issue branch and mark as started:
linear issue start # Choose an issue interactively
linear issue start ABC-123 # Start specific issue
The CLI creates a git branch with the issue ID and updates the issue status.
Create Issues
Create new issues interactively or with flags:
linear issue create # Interactive prompts
linear issue create -t "title" -d "description"
Update Issues
Update existing issue details:
linear issue update # Interactive prompts for current issue
Delete Issues
Remove an issue from Linear:
linear issue delete
Create Pull Requests
Generate a GitHub PR with issue details via gh pr create:
linear issue pr
Issue Comments
Manage comments on issues:
linear issue comment list # List comments
linear issue comment add # Add comment
linear issue comment add -p <id> # Reply to specific comment
linear issue comment update <id> # Update comment
Team Management
linear team list # List teams
linear team id # Print team ID
linear team members # List team members
linear team create # Create a new team
linear team autolinks # Configure GitHub autolinks
Project Management
linear project list # List projects
linear project view # View project details
Milestone Management
linear milestone list --project <projectId> # List milestones
linear m list --project <projectId> # Alias
linear milestone view <milestoneId> # View details
linear m view <milestoneId> # Alias
linear milestone create --project <projectId> --name "Q1 Goals" --target-date "2026-03-31"
linear m create --project <projectId> # Interactive
linear milestone update <milestoneId> --name "New Name"
linear m update <milestoneId> --target-date "2026-04-15"
linear milestone delete <milestoneId>
linear m delete <milestoneId> --force
Document Management
Manage Linear documents (can be attached to projects or issues):
# List documents
linear document list
linear docs list # Alias
linear document list --project <projectId>
linear document list --issue TC-123
linear document list --json
# View documents
linear document view <slug>
linear document view <slug> --raw
linear document view <slug> --web
linear document view <slug> --json
# Create documents
linear document create --title "My Doc" --content "# Hello"
linear document create --title "Spec" --content-file ./spec.md
linear document create --title "Doc" --project <projectId>
linear document create --title "Notes" --issue TC-123
cat spec.md | linear document create --title "Spec"
# Update documents
linear document update <slug> --title "New Title"
linear document update <slug> --content-file ./updated.md
linear document update <slug> --edit
# Delete documents
linear document delete <slug>
linear document delete <slug> --permanent
linear document delete --bulk <slug1> <slug2>
Configuration Options
Configure Linear CLI via environment variables or .linear.toml:
| Option | Environment Variable | TOML Key | Example |
|---|---|---|---|
| API key | LINEAR_API_KEY |
api_key |
"lin_api_..." |
| Team ID | LINEAR_TEAM_ID |
team_id |
"TEAM_abc123" |
| Workspace | LINEAR_WORKSPACE |
workspace |
"mycompany" |
| Issue sort | LINEAR_ISSUE_SORT |
issue_sort |
"priority" or "manual" |
| VCS | LINEAR_VCS |
vcs |
"git" or "jj" |
| Download images | LINEAR_DOWNLOAD_IMAGES |
download_images |
true or false |
Version Control Integration
The CLI works with both git and jj (jujutsu):
- git: Works best when branches include Linear issue IDs (e.g.,
eng-123-my-feature). Uselinear issue startor copy branch names from Linear UI. - jj: Detects issues from
Linear-issuetrailers in commit descriptions. Uselinear issue startto add the trailer automatically.
Common Workflows
Daily Workflow
- List assigned issues:
linear issue list - Start working:
linear issue start(choose interactively) - View details:
linear issue view - When done: create PR with
linear issue pr
Creating a Task
- Create issue:
linear issue create -t "Task title" -d "Description" - Start working:
linear issue start <issue-id> - Track progress in the branch
Reviewing Issues
- List all unstarted issues:
linear issue list -A - View specific issue:
linear issue view <issue-id> - Check comments:
linear issue comment list
Tips
- Use
linear issue viewto quickly see the current branch's issue - Use
linear issue prwhen ready to create a pull request - it pre-fills title and description from Linear - The CLI keeps you in the right views in Linear, avoiding context switching
- Git branches with issue IDs are automatically detected by the CLI
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
fundraising
Plan and run an early-stage fundraising process and produce a Fundraising Pack (raise decision memo, round design brief, pitch narrative + deck outline, investor pipeline + tracker, outreach/follow-up scripts, diligence checklist). Use for fundraising, raising capital, venture capital, pitch deck, investor outreach, pre-seed, seed. Category: Career.
ai-evaluation-evals
Create AI evaluation plans with benchmarks, rubrics, and error analysis workflows.
giving-presentations
Plan and deliver persuasive, confident presentations and produce a Presentation Pack (brief, narrative, slide outline, Q&A bank, pre-brief plan, rehearsal plan, delivery checklist). Use for presentation, deck, keynote, all-hands, exec review, demo talk track. Category: Communication.
personal-productivity
Build a Personal Productivity System Pack (weekly timebox plan, capture+to-do system, daily/weekly review rituals, and a 7-day rollout). Use for timeboxing, calendar blocking, and staying on top of high-volume leadership work. Category: Career.
ai-product-strategy
Create an AI Product Strategy Pack (thesis, prioritized use cases, system plan, eval + learning plan, agentic safety plan, roadmap). Use for AI product strategy, LLM/agent strategy, AI roadmap, AI-first product direction.
career-transitions
Plan and execute a career transition and produce a Career Transition Pack (progress metric + push/pull map, target archetypes, option scorecard, opportunity pipeline + outreach scripts, skills plan, 4–12 week experiment plan). Use for career change, career pivot, career transition, switching roles. Category: Career.
Didn't find tool you were looking for?