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
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
- wrap command actions in try-catch with `handleError(error, "Failed to <action>")`
- errors display clean messages to stderr with ✗ prefix, stack traces only shown when `LINEAR_DEBUG=1`

## cli flags

- never use the same short flag alias (e.g. `-w`) on both a global option and a command-level option — cliffy resolves global options first, so the command-level alias will be shadowed
- before adding a short flag, grep the codebase for that letter to ensure it's not already in use at a conflicting scope

## tests

- tests on commands should mirror the directory structure of the src, e.g.
Expand Down
3 changes: 2 additions & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
".github/workflows/release.yml",
".github/build-setup.yml",
"__generated__/",
"src/__codegen__/"
"src/__codegen__/",
"docs/*.svg"
],
"proseWrap": "never",
"semiColons": false
Expand Down
8 changes: 4 additions & 4 deletions docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ the CLI supports multiple authentication methods with the following precedence:
1. `--api-key` flag (explicit key for single command)
2. `LINEAR_API_KEY` environment variable
3. `api_key` in project `.linear.toml` config
4. `--workspace` / `-w` flag → stored credentials lookup
4. `--workspace` flag → stored credentials lookup
5. project's `workspace` config → stored credentials lookup
6. default workspace from stored credentials

Expand Down Expand Up @@ -61,9 +61,9 @@ the `*` indicates the default workspace.
# set a new default
linear auth default side-project

# or use -w flag for a single command
linear -w side-project issue list
linear -w acme issue create --title "Bug fix"
# or use --workspace flag for a single command
linear --workspace side-project issue list
linear --workspace acme issue create --title "Bug fix"
```

### credentials file format
Expand Down
2 changes: 1 addition & 1 deletion skills/linear-cli/references/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Description:
Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--workspace <slug> - Target workspace (uses credentials)
--variable <variable> - Variable in key=value format (coerces booleans, numbers, null; @file reads from
path)
--variables-json <json> - JSON object of variables (merged with --variable, which takes precedence)
Expand Down
38 changes: 19 additions & 19 deletions skills/linear-cli/references/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)

Commands:

Expand Down Expand Up @@ -42,10 +42,10 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-k, --key <key> - API key (prompted if not provided)
--plaintext - Store API key in credentials file instead of system keyring
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
-k, --key <key> - API key (prompted if not provided)
--plaintext - Store API key in credentials file instead of system keyring
```

### logout
Expand All @@ -61,9 +61,9 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-f, --force - Skip confirmation prompt
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
-f, --force - Skip confirmation prompt
```

### list
Expand All @@ -79,8 +79,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```

### default
Expand All @@ -96,8 +96,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```

### token
Expand All @@ -113,8 +113,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```

### whoami
Expand All @@ -130,8 +130,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```

### migrate
Expand All @@ -147,6 +147,6 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```
4 changes: 2 additions & 2 deletions skills/linear-cli/references/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
```
16 changes: 8 additions & 8 deletions skills/linear-cli/references/cycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)

Commands:

Expand All @@ -37,9 +37,9 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--team <team> - Team key (defaults to current team)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
--team <team> - Team key (defaults to current team)
```

### view
Expand All @@ -55,7 +55,7 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--team <team> - Team key (defaults to current team)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
--team <team> - Team key (defaults to current team)
```
42 changes: 21 additions & 21 deletions skills/linear-cli/references/document.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)

Commands:

Expand All @@ -40,12 +40,12 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--project <project> - Filter by project (slug or name)
--issue <issue> - Filter by issue (identifier like TC-123)
--json - Output as JSON
--limit <limit> - Limit results (Default: 50)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
--project <project> - Filter by project (slug or name)
--issue <issue> - Filter by issue (identifier like TC-123)
--json - Output as JSON
--limit <limit> - Limit results (Default: 50)
```

### view
Expand All @@ -61,11 +61,11 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--raw - Output raw markdown without rendering
-w, --web - Open document in browser
--json - Output full document as JSON
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
--raw - Output raw markdown without rendering
-w, --web - Open document in browser
--json - Output full document as JSON
```

### create
Expand All @@ -82,7 +82,7 @@ Description:
Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--workspace <slug> - Target workspace (uses credentials)
-t, --title <title> - Document title (required)
-c, --content <content> - Markdown content (inline)
-f, --content-file <path> - Read content from file
Expand All @@ -106,7 +106,7 @@ Description:
Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--workspace <slug> - Target workspace (uses credentials)
-t, --title <title> - New title for the document
-c, --content <content> - New markdown content (inline)
-f, --content-file <path> - Read new content from file
Expand All @@ -127,10 +127,10 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-y, --yes - Skip confirmation prompt
--bulk <ids...> - Delete multiple documents by slug or ID
--bulk-file <file> - Read document slugs/IDs from a file (one per line)
--bulk-stdin - Read document slugs/IDs from stdin
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
-y, --yes - Skip confirmation prompt
--bulk <ids...> - Delete multiple documents by slug or ID
--bulk-file <file> - Read document slugs/IDs from a file (one per line)
--bulk-stdin - Read document slugs/IDs from stdin
```
14 changes: 7 additions & 7 deletions skills/linear-cli/references/initiative-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)

Commands:

Expand All @@ -38,7 +38,7 @@ Description:
Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
--workspace <slug> - Target workspace (uses credentials)
--body <body> - Update content (markdown)
--body-file <path> - Read content from file
--health <health> - Health status (onTrack, atRisk, offTrack)
Expand All @@ -58,8 +58,8 @@ Description:

Options:

-h, --help - Show this help.
-w, --workspace <slug> - Target workspace (uses credentials)
-j, --json - Output as JSON
--limit <limit> - Limit results (Default: 10)
-h, --help - Show this help.
--workspace <slug> - Target workspace (uses credentials)
-j, --json - Output as JSON
--limit <limit> - Limit results (Default: 10)
```
Loading
Loading