linear-cmd
Version:
A GitHub CLI-like tool for Linear - manage issues, accounts, and more
143 lines (105 loc) • 4.17 kB
Markdown
<div align="center">
<a href="https://linear.app" target="_blank" rel="noopener noreferrer">
<img width="64" src="https://raw.githubusercontent.com/linear/linear/master/docs/logo.svg" alt="Linear logo">
</a>
<h2>Linear cmd</h2>
</div>
A GitHub CLI-like tool for Linear - manage issues, accounts, and more from your terminal.
- **Multi-account support** - Manage multiple Linear accounts with per-command selection
- **Complete issue management** - Create, list, update, comment, and view detailed issue information
- **Smart account discovery** - Automatically finds the right account for issue operations
- **Advanced filtering** - Filter issues by assignee, state, labels, projects, and teams
- **Self-updating** - Built-in update mechanism that detects your package manager
Why build this when we already have [Linear MCP](https://linear.app/docs/mcp)?
Because I want to be able to just paste a Linear issue link into my [Claude code](https://www.anthropic.com/claude-code) and have it solve the problem. Currently, the Linear MCP server does not support using multiple Linear accounts (I use one for work and one for my personal projects).
1. **Get your Linear API Key** from [Linear Settings](https://linear.app/settings) > Security & Access > Personal API keys
2. **Add your account**: `linear account add` (Then you need to set a name and paste your API_KEY)
3. **View an issue**: `linear issue show WORK-123`
```bash
npm install linear-cmd -g
```
```bash
linear update
linear --help
linear <command> --help
```
```bash
linear account add
linear account list
linear account remove [NAME]
linear account test
```
```bash
linear issue show <linear-url>
linear issue show WORK-123
linear issue show WORK-123 --account work
linear issue list --account work
```
```bash
linear issue create --account work
linear issue create --account work \
--title "Issue title" \
--description "Issue description" \
--priority 2 \
--label "bug" \
--team "TEAM" \
--project "Project Name" \
--assignee "user@example.com"
```
```bash
linear issue update WORK-123
linear issue update WORK-123 \
--title "New title" \
--description "New description" \
--state "In Progress" \
--assignee "user@example.com" \
--priority 1 \
--add-label "urgent" \
--remove-label "low-priority"
```
```bash
linear issue comment WORK-123
linear issue comment WORK-123 "This is my comment"
```
Enable autocompletion for commands and subcommands in your shell:
```bash
linear completion install
```
After installation, restart your shell or source your shell config file:
```bash
source ~/.zshrc
source ~/.bashrc
```
Now you can use tab completion:
- `linear <TAB>` → shows: account, issue, update, completion
- `linear account <TAB>` → shows: add, list, remove, test
- `linear issue <TAB>` → shows: show, create, list, update, comment
```bash
pnpm run dev
pnpm run build
pnpm run test
```
MIT License - see [LICENSE](LICENSE) file for details.