Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,42 @@ linear milestone delete <milestoneId> # delete a milestone
linear m delete <milestoneId> --force # delete without confirmation
```

### document commands

manage Linear documents from the command line. documents can be attached to projects or issues, or exist at the workspace level.

```bash
# list documents
linear document list # list all accessible documents
linear docs list # alias for document
linear document list --project <projectId> # filter by project
linear document list --issue TC-123 # filter by issue
linear document list --json # output as JSON

# view a document
linear document view <slug> # view document rendered in terminal
linear document view <slug> --raw # output raw markdown (for piping)
linear document view <slug> --web # open in browser
linear document view <slug> --json # output as JSON

# create a document
linear document create --title "My Doc" --content "# Hello" # inline content
linear document create --title "Spec" --content-file ./spec.md # from file
linear document create --title "Doc" --project <projectId> # attach to project
linear document create --title "Notes" --issue TC-123 # attach to issue
cat spec.md | linear document create --title "Spec" # from stdin

# update a document
linear document update <slug> --title "New Title" # update title
linear document update <slug> --content-file ./updated.md # update content
linear document update <slug> --edit # open in $EDITOR

# delete a document
linear document delete <slug> # soft delete (move to trash)
linear document delete <slug> --permanent # permanent delete
linear document delete --bulk <slug1> <slug2> # bulk delete
```

### other commands

```bash
Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"check": "deno check src/main.ts",
"test": "deno test '--allow-env=GITHUB_*,GH_*,LINEAR_*,NODE_ENV,EDITOR,PAGER,SNAPSHOT_TEST_NAME,CLIFFY_SNAPSHOT_FAKE_TIME,NO_COLOR,TMPDIR,TMP,TEMP,XDG_CONFIG_HOME,HOME,APPDATA,PATH,SystemRoot' --allow-read --allow-write --allow-run --allow-net=api.linear.app,uploads.linear.app --allow-sys=hostname --quiet",
"snapshot": "deno test '--allow-env=GITHUB_*,GH_*,LINEAR_*,NODE_ENV,EDITOR,PAGER,SNAPSHOT_TEST_NAME,CLIFFY_SNAPSHOT_FAKE_TIME,NO_COLOR,TMPDIR,TMP,TEMP,XDG_CONFIG_HOME,HOME,APPDATA,PATH,SystemRoot' --allow-read --allow-write --allow-run --allow-net=api.linear.app,uploads.linear.app --allow-sys=hostname -- --update",
"lefthook-install": "deno run --allow-run --allow-read --allow-write --allow-env npm:lefthook install"
"lefthook-install": "deno run --allow-run --allow-read --allow-write --allow-env npm:lefthook install",
"validate": "deno task check && deno fmt && deno lint"
},
"imports": {
"@cliffy/ansi": "jsr:@cliffy/ansi@^1.0.0-rc.8",
Expand Down
97 changes: 91 additions & 6 deletions skills/linear-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,97 @@ https://github.com/schpet/linear-cli?tab=readme-ov-file#install
## Available Commands

```
linear issue # Manage issues (list, view, create, start, update, delete, comment)
linear team # Manage teams (list, members, create, autolinks)
linear project # Manage projects (list, view)
linear config # Configure the CLI for the current repo
linear auth # Manage authentication (token, whoami)
linear schema # Print the GraphQL schema (SDL or JSON)
linear issue # Manage issues (list, view, create, start, update, delete, comment)
linear team # Manage teams (list, members, create, delete, autolinks)
linear project # Manage projects (list, view, create)
linear initiative # Manage initiatives (list, view, create, archive, unarchive, update, delete, add-project, remove-project)
linear label # Manage labels (list, create, delete)
linear milestone # Manage project milestones
linear config # Configure the CLI for the current repo
linear auth # Manage authentication (token, whoami)
linear schema # Print the GraphQL schema (SDL or JSON)
```

## Initiative Management

```bash
# List initiatives (default: active only)
linear initiative list
linear initiative list --all-statuses
linear initiative list --status planned

# View initiative details
linear initiative view <id-or-slug>

# Create initiative
linear initiative create --name "Q1 Goals" --status active
linear initiative create -i # Interactive mode

# Archive/unarchive
linear initiative archive <id>
linear initiative unarchive <id>

# Link projects to initiatives
linear initiative add-project <initiative> <project>
linear initiative remove-project <initiative> <project>
```

## Label Management

```bash
# List labels (shows ID, name, color, team)
linear label list
linear label list --team DEV
linear label list --workspace # Workspace-level only

# Create label
linear label create --name "Bug" --color "#EB5757"
linear label create --name "Feature" --team DEV

# Delete label (by ID or name)
linear label delete <id>
linear label delete "Bug" --team DEV
```

## Project Management

```bash
# List projects
linear project list

# View project
linear project view <id>

# Create project
linear project create --name "New Feature" --team DEV
linear project create --name "Q1 Work" --team DEV --initiative "Q1 Goals"
linear project create -i # Interactive mode
```

## Bulk Operations

```bash
# Delete multiple issues
linear issue delete --bulk DEV-123 DEV-124 DEV-125

# Delete from file (one ID per line)
linear issue delete --bulk-file issues.txt

# Delete from stdin
echo -e "DEV-123\nDEV-124" | linear issue delete --bulk-stdin

# Archive multiple initiatives
linear initiative archive --bulk <id1> <id2>
```

## Adding Labels to Issues

```bash
# Add label to issue
linear issue update DEV-123 --label "Bug"

# Add multiple labels
linear issue update DEV-123 --label "Bug" --label "High Priority"
```

## Discovering Options
Expand Down
Loading
Loading