A modern command-line interface for Linear that brings powerful issue management directly to your terminal.
Features: Advanced filtering with exclusions, smart sorting, native Linear colors, and an intuitive interface inspired by GitHub CLI.
- Features
- Prerequisites
- Installation
- Authentication
- Commands
- Advanced Usage
- Examples
- Configuration
- Development
- Troubleshooting
- List and view issues with rich, colorized output
- Advanced filtering by status, assignee, labels, and more
- Exclusion filters to remove unwanted results
- Smart sorting by updated date, created date, priority, or title
- Native Linear colors - status and labels use your workspace's configured colors
- Comment management - read and create issue comments
- Clean table layout with proper alignment and color support
- Node.js >= 18.0.0
- npm or yarn
- A Linear account with API access
Install globally via npm:
npm install -g @scmfury/linear-cliVerify installation:
linear --version
linear --helpFor development or contributing:
# Clone the repository
git clone https://github.com/otaviosoaresp/linear-cli.git
cd linear-cli
# Install dependencies
npm install
# Build the project
npm run build
# Link globally (makes 'linear' command available)
npm linkBefore using the CLI, you must authenticate with your Linear API key.
- Go to https://linear.app/settings/api
- Generate a new Personal API Key
- Copy the key (starts with
lin_api_)
linear auth loginYou'll be prompted to enter your API key. The key is stored securely in ~/.config/linear-cli/config.json.
export LINEAR_API_KEY="lin_api_your_key_here"Authenticate with your Linear API key.
linear auth loginList issues with optional filtering and sorting.
Options:
--status <status...> Filter by status (supports multiple values)
--assignee <email...> Filter by assignee email
--label <label...> Filter by label
--exclude-status <status...> Exclude issues with these statuses
--exclude-assignee <email...> Exclude issues assigned to these users
--exclude-label <label...> Exclude issues with these labels
--sort <field> Sort by: updated, created, priority, title (default: updated)
--order <order> Sort order: asc, desc (default: desc)
--limit <number> Limit number of results (default: 50)
Examples:
# List all issues
linear issue list
# List issues with limit
linear issue list --limit 20
# Filter by status
linear issue list --status "In Progress"
# Multiple statuses
linear issue list --status "In Progress" "Todo"
# Exclude completed issues
linear issue list --exclude-status "Done" "Canceled"
# Sort by priority
linear issue list --sort priority
# Filter and sort
linear issue list --status "In Progress" --sort created --limit 10View detailed information about a specific issue.
Example:
linear issue view LIN-123Output includes:
- Issue title and identifier
- Status (with color)
- Assignee
- Creator
- Team
- Priority (with color)
- Labels (with colors)
- Dates (created, updated, due)
- Estimate
- Description
- URL
List all comments on an issue.
linear issue comment list LIN-123Create a new comment on an issue.
linear issue comment create LIN-123 --body "This looks great!"Filter issues using --status, --assignee, or --label flags. All filters support multiple values.
# Single value
linear issue list --status "In Progress"
# Multiple values
linear issue list --status "In Progress" "Todo" "Backlog"
# Multiple filter types
linear issue list --status "In Progress" --label "bug" --assignee "user@example.com"Exclude specific issues using exclusion flags. This is perfect for filtering out completed or canceled work.
# Exclude by status
linear issue list --exclude-status "Done" "Canceled"
# Exclude by label
linear issue list --exclude-label "wont-fix" "duplicate"
# Exclude by assignee
linear issue list --exclude-assignee "bot@example.com"
# Combine inclusion and exclusion
linear issue list --status "In Progress" --exclude-label "blocked"Sort results using the --sort flag.
Available sort fields:
updated- Last updated date (default)created- Creation datepriority- Priority leveltitle- Alphabetical by title
Sort order:
desc- Descending (default)asc- Ascending
# Most recently updated (default)
linear issue list --sort updated
# Oldest first
linear issue list --sort created --order asc
# Highest priority first
linear issue list --sort priority
# Alphabetical
linear issue list --sort title --order ascCombine multiple filters, exclusions, and sorting for powerful queries.
# Active bugs, sorted by priority
linear issue list --label "bug" --exclude-status "Done" --sort priority
# My issues that aren't blocked
linear issue list --assignee "me@example.com" --exclude-label "blocked"
# Recent backlog items
linear issue list --status "Backlog" --sort created --limit 20
# Everything except done/canceled, sorted by update
linear issue list --exclude-status "Done" "Canceled" --sort updated# Check what's in progress
linear issue list --status "In Progress"
# See your assigned issues
linear issue list --assignee "your.email@company.com"
# Review backlog by priority
linear issue list --status "Backlog" --sort priority --limit 10# All open bugs
linear issue list --label "bug" --exclude-status "Done"
# High priority bugs
linear issue list --label "bug" --sort priority --limit 5
# Unassigned bugs
linear issue list --label "bug" --exclude-status "Done" --assignee "Unassigned"# Everything except done/canceled
linear issue list --exclude-status "Done" "Canceled" --limit 50
# Backlog sorted by priority
linear issue list --status "Backlog" --sort priority
# Recently updated issues
linear issue list --sort updated --limit 20# View issue details
linear issue view CAR-123
# Read comments
linear issue comment list CAR-123
# Add a comment
linear issue comment create CAR-123 --body "Investigating this issue"Configuration is stored in ~/.config/linear-cli/config.json
Structure:
{
"apiKey": "lin_api_..."
}You can also use the LINEAR_API_KEY environment variable, which takes precedence over the config file.
npm run buildnpm run devlinear-cli/
├── src/
│ ├── commands/
│ │ ├── auth/
│ │ │ └── login.ts # Authentication
│ │ └── issue/
│ │ ├── list.ts # List issues with filters
│ │ ├── view.ts # View issue details
│ │ └── comment.ts # Comment management
│ ├── core/
│ │ ├── config.ts # Config management
│ │ └── client.ts # Linear API client
│ ├── utils/
│ │ ├── colors.ts # Color conversion and badges
│ │ ├── display.ts # Table and output formatting
│ │ ├── errors.ts # Error handling
│ │ └── filters.ts # Filter parsing and building
│ └── index.ts # CLI entry point
├── dist/ # Compiled output
├── package.json
├── tsconfig.json
└── README.md
Make sure you ran npm link after building:
npm run build
npm linkVerify your API key is valid:
# Re-authenticate
linear auth login
# Or set environment variable
export LINEAR_API_KEY="lin_api_your_key_here"Colors should work automatically in most terminals. If colors aren't appearing, ensure your terminal supports ANSI colors.
Check your filters - you might be excluding everything:
# List without filters first
linear issue list --limit 5Make sure you have the correct Node.js version and all dependencies installed:
node --version # Should be >= 18.0.0
npm install
npm run build- TypeScript - Type-safe development
- Linear SDK - Official Linear GraphQL client
- Commander.js - CLI framework
- Picocolors - Terminal colors
MIT
Contributions are welcome! Please feel free to submit a Pull Request.