Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "linear",
|
||||
"description": "Work with Linear issues, teams, projects, and users via CLI",
|
||||
"version": "0.0.0-2025.11.28",
|
||||
"author": {
|
||||
"name": "Jakub Skalecki",
|
||||
"email": "jakub@mindnexus.dev"
|
||||
},
|
||||
"skills": [
|
||||
"./skills/linear"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# linear
|
||||
|
||||
Work with Linear issues, teams, projects, and users via CLI
|
||||
64
plugin.lock.json
Normal file
64
plugin.lock.json
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:Valian/linear-cli-skill:linear",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "b1b06147d868365cd207daff72aed5d44614c7a2",
|
||||
"treeHash": "22bff98a11b255f546bf85fc3c296c8b1ced88bfa95bb50b15a77d78e82c042c",
|
||||
"generatedAt": "2025-11-28T10:12:55.981877Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "linear",
|
||||
"description": "Work with Linear issues, teams, projects, and users via CLI"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "ade1027fb5dc6e8743439a95b6839c67e7d3ad8ee0583baec182068665ba67e1"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "d1a83684049bdd91d6718b5dd267b16fae7b676f4746f4f601208abdde86f209"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/linear",
|
||||
"sha256": "d81a54c257b574dc5bb97c6aa6f72eda7d78798e8de81b9f19eab4bd09574a8c"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/.gitignore",
|
||||
"sha256": "79061dfd351c1dd159ebaf984782da5a08115a3b38b5ad23cb352a1dfec9b12a"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/package.json",
|
||||
"sha256": "94d13e2645c3cf77fc14913a4f838f63308b2c7bf62e0f415689722dda4bc588"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/SKILL.md",
|
||||
"sha256": "25f3f07a33fa3735a49c0b760f4e4929a64f0b0142b67210da6137ca448183ca"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/.env.example",
|
||||
"sha256": "39446fbfffd9d547be39c61bf500fe32d414b222f72adfe905e8274ff315de86"
|
||||
},
|
||||
{
|
||||
"path": "skills/linear/scripts/linear-cli.js",
|
||||
"sha256": "6f8252f1850b432b6b27fa50f57282330f08b892f6fa5ebb6723e4acc565a252"
|
||||
}
|
||||
],
|
||||
"dirSha256": "22bff98a11b255f546bf85fc3c296c8b1ced88bfa95bb50b15a77d78e82c042c"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
4
skills/linear/.env.example
Normal file
4
skills/linear/.env.example
Normal file
@@ -0,0 +1,4 @@
|
||||
# Linear API Key
|
||||
# Get your API key from: https://linear.app/settings/api
|
||||
# Navigate to Settings > API > Personal API keys > Create key
|
||||
LINEAR_API_KEY=your-api-key-here
|
||||
4
skills/linear/.gitignore
vendored
Normal file
4
skills/linear/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
node_modules/
|
||||
.env
|
||||
*.log
|
||||
dist/
|
||||
128
skills/linear/SKILL.md
Normal file
128
skills/linear/SKILL.md
Normal file
@@ -0,0 +1,128 @@
|
||||
---
|
||||
name: linear
|
||||
description: Work with Linear issues via CLI - use this skill whenever the user asks about Linear issues, creating, updating, commenting on, or deleting issues, or checking issue status and details
|
||||
version: 0.1.0
|
||||
---
|
||||
|
||||
# Linear Issue Management
|
||||
|
||||
**Use this skill whenever the user mentions Linear or asks to work with issues.**
|
||||
|
||||
Lightweight CLI to interact with Linear's issue tracking system. All commands run from the skill directory using `./linear`.
|
||||
|
||||
## Setup
|
||||
|
||||
Dependencies install automatically on first run. API key errors are self-explanatory.
|
||||
|
||||
## Command Pattern
|
||||
|
||||
```bash
|
||||
./linear <resource> <action> [arguments] [options]
|
||||
```
|
||||
|
||||
Resources: `issue`, `user`, `team`, `project`
|
||||
|
||||
## Commands
|
||||
|
||||
### List Users
|
||||
```bash
|
||||
./linear user list
|
||||
```
|
||||
Returns: `#<user-id> <name> <email>`
|
||||
|
||||
### List Teams
|
||||
```bash
|
||||
./linear team list
|
||||
```
|
||||
Returns: `#<team-id> <name> <key>`
|
||||
|
||||
### List Projects
|
||||
```bash
|
||||
./linear project list
|
||||
```
|
||||
Returns: `#<project-id> <name> <state>`
|
||||
|
||||
### List Issues
|
||||
```bash
|
||||
./linear issue list [options]
|
||||
```
|
||||
**Options:**
|
||||
- `--team <id>` - Filter by team ID
|
||||
- `--assignee <id>` - Filter by user ID
|
||||
- `--status <name>` - Filter by status name (case-sensitive)
|
||||
- `--limit <n>` - Limit results (default: 50)
|
||||
|
||||
Returns: `#<identifier> <title> <status> <assignee>`
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
./linear issue list --team abc123 --limit 10
|
||||
./linear issue list --assignee def456 --status "In Progress"
|
||||
```
|
||||
|
||||
### View Issue
|
||||
```bash
|
||||
./linear issue view <id-or-key>
|
||||
```
|
||||
**Arguments:**
|
||||
- `<id-or-key>` - Issue identifier (e.g., `ENG-123`) or UUID
|
||||
|
||||
Returns full issue details including title, status, assignee, team, priority, labels, dates, description, and comments.
|
||||
|
||||
### Create Issue
|
||||
```bash
|
||||
./linear issue create <title> [options]
|
||||
```
|
||||
**Arguments:**
|
||||
- `<title>` - Issue title (multi-word titles auto-combined)
|
||||
|
||||
**Options:**
|
||||
- `--team <id>` - Team ID (required)
|
||||
- `--description <text>` - Issue description
|
||||
- `--assignee <id>` - User ID
|
||||
- `--priority <n>` - Priority (0=None, 1=Urgent, 2=High, 3=Medium, 4=Low)
|
||||
- `--status <name>` - Initial status
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
./linear issue create "Fix login bug" --team abc123 --priority 2
|
||||
```
|
||||
|
||||
### Add Comment
|
||||
```bash
|
||||
./linear issue comment <id-or-key> <text>
|
||||
```
|
||||
Multi-word text auto-combined. No quotes needed.
|
||||
|
||||
### Update Issue
|
||||
```bash
|
||||
./linear issue update <id-or-key> [options]
|
||||
```
|
||||
**Options:**
|
||||
- `--status <name>` - Update status
|
||||
- `--assignee <id>` - Update assignee
|
||||
- `--priority <n>` - Update priority
|
||||
- `--title <text>` - Update title
|
||||
- `--description <text>` - Update description
|
||||
|
||||
Can update multiple fields in one command.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
./linear issue update ENG-123 --status "In Progress" --assignee abc123
|
||||
```
|
||||
|
||||
### Delete Issue
|
||||
```bash
|
||||
./linear issue delete <id-or-key>
|
||||
```
|
||||
Soft delete (moves to trash, recoverable).
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Issue identifiers are case-insensitive (`ENG-123` = `eng-123`)
|
||||
- Status names are case-sensitive ("In Progress" ≠ "in progress")
|
||||
- User/team IDs are UUIDs (get from list commands)
|
||||
- Issue keys format: `<TEAM_KEY>-<NUMBER>` (e.g., ENG-123)
|
||||
- All commands support `--json` flag for machine-readable output
|
||||
- Use `--help` on any command for details
|
||||
22
skills/linear/linear
Executable file
22
skills/linear/linear
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Linear CLI wrapper script
|
||||
# Runs the JavaScript CLI using node
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# Check if node_modules exists, if not install automatically
|
||||
if [ ! -d "$SCRIPT_DIR/node_modules" ]; then
|
||||
echo "Dependencies not installed. Installing..."
|
||||
echo ""
|
||||
cd "$SCRIPT_DIR" && npm install
|
||||
if [ $? -ne 0 ]; then
|
||||
echo ""
|
||||
echo "Error: Failed to install dependencies"
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Run the CLI with node
|
||||
exec node "$SCRIPT_DIR/scripts/linear-cli.js" "$@"
|
||||
13
skills/linear/package.json
Normal file
13
skills/linear/package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "linear-cli",
|
||||
"version": "0.1.0",
|
||||
"description": "CLI for working with Linear issues",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"cli": "node scripts/linear-cli.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@linear/sdk": "^62.0.0",
|
||||
"dotenv": "^16.4.5"
|
||||
}
|
||||
}
|
||||
1123
skills/linear/scripts/linear-cli.js
Normal file
1123
skills/linear/scripts/linear-cli.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user