diff --git a/AGENTS.md b/AGENTS.md index 879db829..7bbe9ace 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -28,6 +28,11 @@ - wrap command actions in try-catch with `handleError(error, "Failed to ")` - 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. diff --git a/deno.json b/deno.json index fa63109a..16454ff0 100644 --- a/deno.json +++ b/deno.json @@ -64,7 +64,8 @@ ".github/workflows/release.yml", ".github/build-setup.yml", "__generated__/", - "src/__codegen__/" + "src/__codegen__/", + "docs/*.svg" ], "proseWrap": "never", "semiColons": false diff --git a/docs/authentication.md b/docs/authentication.md index 3ce82f2a..c5869a7d 100644 --- a/docs/authentication.md +++ b/docs/authentication.md @@ -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 @@ -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 diff --git a/skills/linear-cli/references/api.md b/skills/linear-cli/references/api.md index 317a1d8d..3b308aff 100644 --- a/skills/linear-cli/references/api.md +++ b/skills/linear-cli/references/api.md @@ -14,7 +14,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + --workspace - Target workspace (uses credentials) --variable - Variable in key=value format (coerces booleans, numbers, null; @file reads from path) --variables-json - JSON object of variables (merged with --variable, which takes precedence) diff --git a/skills/linear-cli/references/auth.md b/skills/linear-cli/references/auth.md index 9ac6f52e..b7b9c569 100644 --- a/skills/linear-cli/references/auth.md +++ b/skills/linear-cli/references/auth.md @@ -13,8 +13,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) Commands: @@ -42,10 +42,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) - -k, --key - API key (prompted if not provided) - --plaintext - Store API key in credentials file instead of system keyring + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) + -k, --key - API key (prompted if not provided) + --plaintext - Store API key in credentials file instead of system keyring ``` ### logout @@ -61,9 +61,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) - -f, --force - Skip confirmation prompt + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) + -f, --force - Skip confirmation prompt ``` ### list @@ -79,8 +79,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` ### default @@ -96,8 +96,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` ### token @@ -113,8 +113,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` ### whoami @@ -130,8 +130,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` ### migrate @@ -147,6 +147,6 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` diff --git a/skills/linear-cli/references/config.md b/skills/linear-cli/references/config.md index d60e9b71..9b96dbb6 100644 --- a/skills/linear-cli/references/config.md +++ b/skills/linear-cli/references/config.md @@ -13,6 +13,6 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) ``` diff --git a/skills/linear-cli/references/cycle.md b/skills/linear-cli/references/cycle.md index c536c9ec..61e2a1de 100644 --- a/skills/linear-cli/references/cycle.md +++ b/skills/linear-cli/references/cycle.md @@ -13,8 +13,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) Commands: @@ -37,9 +37,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) - --team - Team key (defaults to current team) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) + --team - Team key (defaults to current team) ``` ### view @@ -55,7 +55,7 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) - --team - Team key (defaults to current team) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) + --team - Team key (defaults to current team) ``` diff --git a/skills/linear-cli/references/document.md b/skills/linear-cli/references/document.md index a4c04ea3..6d6c7e08 100644 --- a/skills/linear-cli/references/document.md +++ b/skills/linear-cli/references/document.md @@ -13,8 +13,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) Commands: @@ -40,12 +40,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) - --project - Filter by project (slug or name) - --issue - Filter by issue (identifier like TC-123) - --json - Output as JSON - --limit - Limit results (Default: 50) + -h, --help - Show this help. + --workspace - Target workspace (uses credentials) + --project - Filter by project (slug or name) + --issue - Filter by issue (identifier like TC-123) + --json - Output as JSON + --limit - Limit results (Default: 50) ``` ### view @@ -61,11 +61,11 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace - 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 - Target workspace (uses credentials) + --raw - Output raw markdown without rendering + -w, --web - Open document in browser + --json - Output full document as JSON ``` ### create @@ -82,7 +82,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace - Target workspace (uses credentials) + --workspace - Target workspace (uses credentials) -t, --title - Document title (required) -c, --content <content> - Markdown content (inline) -f, --content-file <path> - Read content from file @@ -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 @@ -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 ``` diff --git a/skills/linear-cli/references/initiative-update.md b/skills/linear-cli/references/initiative-update.md index 5810f318..9d84f761 100644 --- a/skills/linear-cli/references/initiative-update.md +++ b/skills/linear-cli/references/initiative-update.md @@ -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: @@ -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) @@ -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) ``` diff --git a/skills/linear-cli/references/initiative.md b/skills/linear-cli/references/initiative.md index 8d61330b..79f69d7c 100644 --- a/skills/linear-cli/references/initiative.md +++ b/skills/linear-cli/references/initiative.md @@ -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: @@ -44,15 +44,15 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -s, --status <status> - Filter by status (active, planned, completed) - --all-statuses - Show all statuses (default: active only) - -o, --owner <owner> - Filter by owner (username or email) - -w, --web - Open initiatives page in web browser - -a, --app - Open initiatives page in Linear.app - -j, --json - Output as JSON - --archived - Include archived initiatives + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -s, --status <status> - Filter by status (active, planned, completed) + --all-statuses - Show all statuses (default: active only) + -o, --owner <owner> - Filter by owner (username or email) + -w, --web - Open initiatives page in web browser + -a, --app - Open initiatives page in Linear.app + -j, --json - Output as JSON + --archived - Include archived initiatives ``` ### view @@ -68,11 +68,11 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -w, --web - Open in web browser - -a, --app - Open in Linear.app - -j, --json - Output as JSON + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -w, --web - Open in web browser + -a, --app - Open in Linear.app + -j, --json - Output as JSON ``` ### create @@ -89,7 +89,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - Initiative name (required) -d, --description <description> - Initiative description -s, --status <status> - Status: planned, active, completed (default: planned) @@ -113,12 +113,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -y, --force - Skip confirmation prompt - --bulk <ids...> - Archive multiple initiatives by ID, slug, or name - --bulk-file <file> - Read initiative IDs from a file (one per line) - --bulk-stdin - Read initiative IDs from stdin + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -y, --force - Skip confirmation prompt + --bulk <ids...> - Archive multiple initiatives by ID, slug, or name + --bulk-file <file> - Read initiative IDs from a file (one per line) + --bulk-stdin - Read initiative IDs from stdin ``` ### update @@ -135,7 +135,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - New name for the initiative -d, --description <description> - New description --status <status> - New status (planned, active, completed, paused) @@ -159,9 +159,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -y, --force - Skip confirmation prompt + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -y, --force - Skip confirmation prompt ``` ### delete @@ -177,12 +177,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -y, --force - Skip confirmation prompt - --bulk <ids...> - Delete multiple initiatives by ID, slug, or name - --bulk-file <file> - Read initiative IDs from a file (one per line) - --bulk-stdin - Read initiative IDs from stdin + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -y, --force - Skip confirmation prompt + --bulk <ids...> - Delete multiple initiatives by ID, slug, or name + --bulk-file <file> - Read initiative IDs from a file (one per line) + --bulk-stdin - Read initiative IDs from stdin ``` ### add-project @@ -198,9 +198,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --sort-order <sortOrder> - Sort order within initiative + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --sort-order <sortOrder> - Sort order within initiative ``` ### remove-project @@ -216,7 +216,7 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -y, --force - Skip confirmation prompt + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -y, --force - Skip confirmation prompt ``` diff --git a/skills/linear-cli/references/issue.md b/skills/linear-cli/references/issue.md index 4c7a5d87..4214e112 100644 --- a/skills/linear-cli/references/issue.md +++ b/skills/linear-cli/references/issue.md @@ -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: @@ -51,8 +51,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) ``` ### list @@ -68,26 +68,26 @@ 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) -s, --state <state> - Filter by issue state (can be repeated for multiple states) (Default: [ "unstarted" ], Values: "triage", "backlog", - "unstarted", "started", "completed", "canceled") - --all-states - Show issues from all states - --assignee <assignee> - Filter by assignee (username) - -A, --all-assignees - Show issues for all assignees - -U, --unassigned - Show only unassigned issues - --sort <sort> - Sort order (can also be set via LINEAR_ISSUE_SORT) (Values: "manual", "priority") - --team <team> - Team to list issues for (if not your default team) - --project <project> - Filter by project name - --project-label <projectLabel> - Filter by project label name (shows issues from all projects with this label) - --cycle <cycle> - Filter by cycle name, number, or 'active' - --milestone <milestone> - Filter by project milestone name (requires --project) - -l, --label <label> - Filter by label name (can be repeated for multiple labels) - --limit <limit> - Maximum number of issues to fetch (default: 50, use 0 for unlimited) (Default: 50) - --created-after <date> - Filter issues created after this date (ISO 8601 or YYYY-MM-DD) - --updated-after <date> - Filter issues updated after this date (ISO 8601 or YYYY-MM-DD) - -w, --web - Open in web browser - -a, --app - Open in Linear.app + "unstarted", "started", "completed", "canceled") + --all-states - Show issues from all states + --assignee <assignee> - Filter by assignee (username) + -A, --all-assignees - Show issues for all assignees + -U, --unassigned - Show only unassigned issues + --sort <sort> - Sort order (can also be set via LINEAR_ISSUE_SORT) (Values: "manual", "priority") + --team <team> - Team to list issues for (if not your default team) + --project <project> - Filter by project name + --project-label <projectLabel> - Filter by project label name (shows issues from all projects with this label) + --cycle <cycle> - Filter by cycle name, number, or 'active' + --milestone <milestone> - Filter by project milestone name (requires --project) + -l, --label <label> - Filter by label name (can be repeated for multiple labels) + --limit <limit> - Maximum number of issues to fetch (default: 50, use 0 for unlimited) (Default: 50) + --created-after <date> - Filter issues created after this date (ISO 8601 or YYYY-MM-DD) + --updated-after <date> - Filter issues updated after this date (ISO 8601 or YYYY-MM-DD) + -w, --web - Open in web browser + -a, --app - Open in Linear.app --no-pager - Disable automatic paging for long output ``` @@ -104,8 +104,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) ``` ### start @@ -122,7 +122,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -A, --all-assignees - Show issues for all assignees -U, --unassigned - Show only unassigned issues -f, --from-ref <fromRef> - Git ref to create new branch from @@ -142,14 +142,14 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -w, --web - Open in web browser - -a, --app - Open in Linear.app - --no-comments - Exclude comments from the output - --no-pager - Disable automatic paging for long output - -j, --json - Output issue data as JSON - --no-download - Keep remote URLs instead of downloading files + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -w, --web - Open in web browser + -a, --app - Open in Linear.app + --no-comments - Exclude comments from the output + --no-pager - Disable automatic paging for long output + -j, --json - Output issue data as JSON + --no-download - Keep remote URLs instead of downloading files ``` ### url @@ -165,8 +165,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) ``` ### describe @@ -183,7 +183,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -r, --references, --ref - Use 'References' instead of 'Fixes' for the Linear issue link ``` @@ -200,8 +200,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) ``` ### pull-request @@ -217,13 +217,13 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --base <branch> - The branch into which you want your code merged - --draft - Create the pull request as a draft - -t, --title <title> - Optional title for the pull request (Linear issue ID will be prefixed) - --web - Open the pull request in the browser after creating it - --head <branch> - The branch that contains commits for your pull request + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --base <branch> - The branch into which you want your code merged + --draft - Create the pull request as a draft + -t, --title <title> - Optional title for the pull request (Linear issue ID will be prefixed) + --web - Open the pull request in the browser after creating it + --head <branch> - The branch that contains commits for your pull request ``` ### delete @@ -239,12 +239,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -y, --confirm - Skip confirmation prompt - --bulk <ids...> - Delete multiple issues by identifier (e.g., TC-123 TC-124) - --bulk-file <file> - Read issue identifiers from a file (one per line) - --bulk-stdin - Read issue identifiers from stdin + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -y, --confirm - Skip confirmation prompt + --bulk <ids...> - Delete multiple issues by identifier (e.g., TC-123 TC-124) + --bulk-file <file> - Read issue identifiers from a file (one per line) + --bulk-stdin - Read issue identifiers from stdin ``` ### create @@ -261,7 +261,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) --start - Start the issue after creation -a, --assignee <assignee> - Assign the issue to 'self' or someone (by username or name) --due-date <dueDate> - Due date of the issue @@ -295,7 +295,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -a, --assignee <assignee> - Assign the issue to 'self' or someone (by username or name) --due-date <dueDate> - Due date of the issue --parent <parent> - Parent issue (if any) as a team_number code @@ -325,8 +325,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: @@ -349,12 +349,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -b, --body <text> - Comment body text - --body-file <path> - Read comment body from a file (preferred for markdown content) - -p, --parent <id> - Parent comment ID for replies - -a, --attach <filepath> - Attach a file to the comment (can be used multiple times) + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -b, --body <text> - Comment body text + --body-file <path> - Read comment body from a file (preferred for markdown content) + -p, --parent <id> - Parent comment ID for replies + -a, --attach <filepath> - Attach a file to the comment (can be used multiple times) ``` ##### delete @@ -368,8 +368,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) ``` ##### update @@ -383,10 +383,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -b, --body <text> - New comment body text - --body-file <path> - Read comment body from a file (preferred for markdown content) + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -b, --body <text> - New comment body text + --body-file <path> - Read comment body from a file (preferred for markdown content) ``` ##### list @@ -400,9 +400,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -j, --json - Output as JSON + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -j, --json - Output as JSON ``` ### attach @@ -418,10 +418,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -t, --title <title> - Custom title for the attachment - -c, --comment <body> - Add a comment body linked to the attachment + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -t, --title <title> - Custom title for the attachment + -c, --comment <body> - Add a comment body linked to the attachment ``` ### link @@ -437,9 +437,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -t, --title <title> - Custom title for the link + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -t, --title <title> - Custom title for the link Examples: @@ -461,8 +461,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: @@ -484,8 +484,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) Examples: @@ -506,8 +506,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) ``` ##### list @@ -521,6 +521,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) ``` diff --git a/skills/linear-cli/references/label.md b/skills/linear-cli/references/label.md index 0b0cccd3..cc6329de 100644 --- a/skills/linear-cli/references/label.md +++ b/skills/linear-cli/references/label.md @@ -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: @@ -59,7 +59,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - Label name (required) -c, --color <color> - Color hex code (e.g., #EB5757) -d, --description <description> - Label description @@ -80,8 +80,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -t, --team <teamKey> - Team key to disambiguate labels with same name - -f, --force - Skip confirmation prompt + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -t, --team <teamKey> - Team key to disambiguate labels with same name + -f, --force - Skip confirmation prompt ``` diff --git a/skills/linear-cli/references/milestone.md b/skills/linear-cli/references/milestone.md index a48e4af6..f7ff2bc1 100644 --- a/skills/linear-cli/references/milestone.md +++ b/skills/linear-cli/references/milestone.md @@ -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: @@ -40,9 +40,9 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --project <projectId> - Project ID (required) + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --project <projectId> - Project ID (required) ``` ### view @@ -58,8 +58,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) ``` ### create @@ -75,12 +75,12 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --project <projectId> - Project ID (required) - --name <name> - Milestone name (required) - --description <description> - Milestone description - --target-date <date> - Target date (YYYY-MM-DD) + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --project <projectId> - Project ID (required) + --name <name> - Milestone name (required) + --description <description> - Milestone description + --target-date <date> - Target date (YYYY-MM-DD) ``` ### update @@ -96,13 +96,13 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --name <name> - Milestone name - --description <description> - Milestone description - --target-date <date> - Target date (YYYY-MM-DD) - --sort-order <value> - Sort order relative to other milestones - --project <projectId> - Move to a different project + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --name <name> - Milestone name + --description <description> - Milestone description + --target-date <date> - Target date (YYYY-MM-DD) + --sort-order <value> - Sort order relative to other milestones + --project <projectId> - Move to a different project ``` ### delete @@ -118,7 +118,7 @@ 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 ``` diff --git a/skills/linear-cli/references/project-update.md b/skills/linear-cli/references/project-update.md index b93de914..a23f9873 100644 --- a/skills/linear-cli/references/project-update.md +++ b/skills/linear-cli/references/project-update.md @@ -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: @@ -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 (inline) --body-file <path> - Read content from file --health <health> - Project health status (onTrack, atRisk, offTrack) @@ -58,8 +58,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --json - Output as JSON - --limit <limit> - Limit results (Default: 10) + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --json - Output as JSON + --limit <limit> - Limit results (Default: 10) ``` diff --git a/skills/linear-cli/references/project.md b/skills/linear-cli/references/project.md index 1d03964f..8f338839 100644 --- a/skills/linear-cli/references/project.md +++ b/skills/linear-cli/references/project.md @@ -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: @@ -40,14 +40,14 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --team <team> - Filter by team key - --all-teams - Show projects from all teams - --status <status> - Filter by status name - -w, --web - Open in web browser - -a, --app - Open in Linear.app - -j, --json - Output as JSON + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --team <team> - Filter by team key + --all-teams - Show projects from all teams + --status <status> - Filter by status name + -w, --web - Open in web browser + -a, --app - Open in Linear.app + -j, --json - Output as JSON ``` ### view @@ -63,10 +63,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -w, --web - Open in web browser - -a, --app - Open in Linear.app + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -w, --web - Open in web browser + -a, --app - Open in Linear.app ``` ### create @@ -83,7 +83,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - Project name (required) -d, --description <description> - Project description -t, --team <team> - Team key (required, can be repeated for multiple teams) @@ -110,7 +110,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - Project name -d, --description <description> - Project description -s, --status <status> - Status (planned, started, paused, completed, canceled, backlog) @@ -133,7 +133,7 @@ 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 ``` diff --git a/skills/linear-cli/references/schema.md b/skills/linear-cli/references/schema.md index bac98c39..7fdfb2ba 100644 --- a/skills/linear-cli/references/schema.md +++ b/skills/linear-cli/references/schema.md @@ -13,8 +13,8 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --json - Output as JSON introspection result instead of SDL - -o, --output <file> - Write schema to file instead of stdout + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --json - Output as JSON introspection result instead of SDL + -o, --output <file> - Write schema to file instead of stdout ``` diff --git a/skills/linear-cli/references/team.md b/skills/linear-cli/references/team.md index fdae3d71..acc4a9b2 100644 --- a/skills/linear-cli/references/team.md +++ b/skills/linear-cli/references/team.md @@ -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: @@ -42,7 +42,7 @@ Description: Options: -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) + --workspace <slug> - Target workspace (uses credentials) -n, --name <name> - Name of the team -d, --description <description> - Description of the team -k, --key <key> - Team key (if not provided, will be generated from name) @@ -63,10 +63,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - --move-issues <targetTeam> - Move all issues to another team before deletion - -y, --force - Skip confirmation prompt + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + --move-issues <targetTeam> - Move all issues to another team before deletion + -y, --force - Skip confirmation prompt ``` ### list @@ -82,10 +82,10 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -w, --web - Open in web browser - -a, --app - Open in Linear.app + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -w, --web - Open in web browser + -a, --app - Open in Linear.app ``` ### id @@ -101,8 +101,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) ``` ### autolinks @@ -118,8 +118,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) ``` ### members @@ -135,7 +135,7 @@ Description: Options: - -h, --help - Show this help. - -w, --workspace <slug> - Target workspace (uses credentials) - -a, --all - Include inactive members + -h, --help - Show this help. + --workspace <slug> - Target workspace (uses credentials) + -a, --all - Include inactive members ``` diff --git a/src/main.ts b/src/main.ts index ecb9d13c..2167f24d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -31,7 +31,7 @@ Environment Variables: LINEAR_DEBUG=1 Show full error details including stack traces`, ) .globalOption( - "-w, --workspace <slug:string>", + "--workspace <slug:string>", "Target workspace (uses credentials)", ) .globalAction((options) => { diff --git a/test/keyring.integration.test.ts b/test/keyring.integration.test.ts index ad6f072d..25d18660 100644 --- a/test/keyring.integration.test.ts +++ b/test/keyring.integration.test.ts @@ -5,11 +5,31 @@ import { setPassword, } from "../src/keyring/index.ts" +async function isKeyringAvailable(): Promise<boolean> { + if (Deno.build.os === "linux") { + try { + const cmd = new Deno.Command("secret-tool", { + args: ["lookup", "service", "linear-cli-probe"], + stdout: "null", + stderr: "piped", + }) + const { code, stderr } = await cmd.output() + const err = new TextDecoder().decode(stderr) + if (err.includes("was not provided by any .service files")) return false + return code === 0 || code === 1 + } catch { + return false + } + } + return true +} + const TEST_ACCOUNT = `linear-cli-integration-test-${Date.now()}` Deno.test({ name: "keyring integration - set, get, and delete round-trip", sanitizeResources: Deno.build.os !== "windows", + ignore: !(await isKeyringAvailable()), fn: async () => { try { assertEquals(await getPassword(TEST_ACCOUNT), null)