325 Commits

Author SHA1 Message Date
Peter Schilling ae523e550c chore: Release linear-cli version 1.7.0 v1.7.0 2026-01-09 12:44:54 -08:00
Jeffrey Holm 77aa22b9d9 feat: add milestone management commands (#92)
## Summary

Adds comprehensive milestone management functionality to linear-cli,
enabling full CRUD operations for Linear project milestones.

## Motivation

The Linear API supports project milestones, but the CLI didn't expose
this functionality. This PR adds milestone management commands to
complement the existing project and issue commands.

## Changes

### New Commands

- `linear milestone list --project <id>` - List milestones for a project
- `linear milestone create` - Create new project milestones  
- `linear milestone update <id>` - Update existing milestones
- `linear milestone delete <id>` - Delete milestones with confirmation
- Short alias: `linear m` for all milestone commands

### Features

- Full CRUD operations for project milestones
- Table-formatted output for list command
- Interactive confirmation prompts for deletion (with `--force` option
to skip)
- Support for milestone name, description, and target date
- Follows existing CLI patterns and conventions

### Implementation

- Uses GraphQL Code Generator for type-safe queries/mutations
- Built with Cliffy for command structure and prompts
- Leverages existing graphql client utilities
- Includes spinner for loading states
- Updated README with usage examples

## Testing

All commands have been tested with the Linear API:

- ✅ List milestones for a project (empty and populated)
- ✅ Create milestones with name, description, target date
- ✅ Update milestone properties
- ✅ Delete milestones with confirmation prompt
- ✅ Delete with `--force` flag (skip confirmation)

## Documentation

Updated README.md with:
- Milestone commands section
- Usage examples for all operations
- Command aliases

## Example Usage

```bash
# List milestones
linear milestone list --project abc123
linear m list --project abc123  # alias

# Create a milestone
linear milestone create --project abc123 --name "Q1 Goals" --target-date "2026-03-31"
linear m create --project abc123  # interactive mode

# Update a milestone  
linear milestone update xyz789 --name "Q1 Objectives"
linear m update xyz789 --target-date "2026-04-15"

# Delete a milestone
linear milestone delete xyz789
linear m delete xyz789 --force  # skip confirmation
```
2026-01-09 12:41:19 -08:00
Kirt Lillywhite 0a732c3838 fix: environment variables now correctly take precedence over config file values
The README documented that environment variables take precedence over
config file values, but the code had the opposite behavior. This fix
corrects the precedence order in getRawOption to match the documentation:

1. CLI flags (highest priority)
2. Environment variables
3. Config file (lowest priority)

Also adds subprocess-based tests that verify:
- Env vars win when both env var and config file are present
- Config file is used as fallback when no env var is set

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 09:34:34 -08:00
Peter Schilling 80dc1be2ff chore: Release linear-cli version 1.6.0 v1.6.0 2026-01-05 22:35:19 -08:00
Peter Schilling 009a0f5490 update changelog 2026-01-05 16:09:00 -08:00
Peter Schilling 87a442a0a7 Prefix issue title with identifier in issue view
Add the issue identifier (e.g., TEST-123) before the title in the
issue view command output. The title now displays as "TEST-123: Fix
authentication bug" instead of just "Fix authentication bug".

- Add identifier field to fetchIssueDetails return type
- Include identifier in both GraphQL queries
- Update issue-view.ts to prefix title with identifier
- Update all test mocks to include identifier field

Claude-session-id: a1d9f23b-b88b-4571-b44a-37003734e4a1
2026-01-05 16:07:29 -08:00
Paymahn Moghadasian f3e9b9f348 feat: add parent and sub-issues to issue view output (#86)
## Summary

- Add parent issue display to `linear issue view` output (when the issue
has a parent)
- Add sub-issues list to `linear issue view` output (when the issue has
children)
- Enables agents and users to easily navigate up and down the issue
hierarchy

Closes #84

## Example Output

```
# Implement user authentication

Add user authentication to the application.

Parent:
  TEST-100: Epic: Security Improvements [In Progress]

Sub-issues:
  TEST-457: Add login form [Done]
  TEST-458: Add password reset flow [Todo]
  TEST-459: Add OAuth support [In Progress]
```

## Test plan

- [x] Added new test case "With Parent And Sub-issues" to verify
hierarchy display
- [x] Updated existing tests to include parent/children fields in mock
data
- [x] All snapshot tests updated and passing
- [x] `deno check` passes
- [x] `deno lint` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 11:25:03 -08:00
Peter Schilling 86a580948c chore: Release linear-cli version 1.5.0 v1.5.0 2025-12-16 07:50:11 -08:00
Peter Schilling a7e1137704 add x86_64-apple-darwin to ci builds 2025-12-16 07:47:48 -08:00
peter schilling 51ff1b2db6 Add 'issue commits' command (jj-vcs only) (#79)
use case: 

- you are addressing feedback on an issue ABC-123
- run `linear issue start 123` to re-start that issue
- fire up claude code
- run `! linear issue view` to drop the issue, and comments into context
- run `! linear issue commits` to dump the diff of previous work into
context
- ask claude to address the feedback (it will have a much better shot of
knowing what you are talking about)
2025-12-14 08:33:34 -08:00
Peter Schilling 60ed8d7e0e chore: Release linear-cli version 1.4.0 v1.4.0 2025-12-08 22:11:11 -08:00
Peter Schilling dabed08301 revise skill stuff in readme, add scripts to install skill 2025-12-08 22:10:07 -08:00
Peter Schilling 0ae5e60bef update changelog 2025-12-08 21:55:15 -08:00
Peter Schilling 80a81bc08d Use linear schema command instead of npm package
Replace the get-graphql-schema npm package with the built-in
'linear schema' command, using the -o flag to write output to file
instead of stdout redirection.

Claude-session-id: c951003d-76bb-446c-9c38-d448f2f768af
2025-12-08 21:55:15 -08:00
Peter Schilling d3355fa548 update schema 2025-12-08 21:55:15 -08:00
Peter Schilling 5b3544a9ff Add linear-cli skill plugin
Create Claude Code skill plugin for linear-cli with marketplace and
plugin metadata. Includes SKILL.md documentation that explains how to
use the linear-cli CLI tool for managing Linear issues from the
command line.

- Add marketplace.json with plugin configuration
- Add plugin.json with plugin metadata  
- Add skills/linear-cli/SKILL.md with usage documentation

Claude-session-id: 60a47cf8-9f8d-46a9-bbde-6097eafd8584
2025-12-08 21:55:15 -08:00
Peter Schilling 0eacbe45cf Add schema command to print GraphQL schema
Implement a new top-level command that fetches the GraphQL schema from
Linear's API via introspection and prints it to stdout. Supports SDL
format by default and JSON output with --json flag.

Claude-session-id: 84fcd993-f47a-44d2-b173-69f9415ed989
2025-12-08 21:55:15 -08:00
Peter Schilling bb026222b6 Add ISC license
Copyright Peter Schilling and contributors.

Claude-session-id: 93345ea6-d466-4f6e-a95f-6757c600c025
2025-12-08 21:55:15 -08:00
Peter Schilling bf25a6966b add jj links 2025-12-04 20:40:27 -08:00
Peter Schilling 543fbbf430 remove beads 2025-12-04 20:33:46 -08:00
Peter Schilling 70951d0acf Add configuration options documentation
Document all supported configuration options in the README with a
table showing environment variable names, TOML config keys, example
values, and descriptions. Include information about valid config file
locations and precedence rules.

Claude-session-id: 0effccb0-b575-4bf8-b1c7-5b850894d475
2025-12-03 22:51:59 -08:00
Peter Schilling cf0d28a720 Add OSC-8 hyperlink support for images in comments
Extend hyperlink support to work consistently for both issue descriptions
and comments by using charmd markdown rendering with OSC-8 extensions.

- Use renderMarkdown with extensions for comment body rendering
- Remove formatWrappedText function, replaced by markdown rendering
- Pass extensions array through captureCommentsForTerminal function
- Apply proper indentation to rendered reply comments

Claude-session-id: 49101792-03cc-423f-8162-4e8fd125d1b4
2025-12-03 22:51:49 -08:00
Peter Schilling b47f95e7fb Add image download functionality to issue view
Implement local image caching for issue view command to avoid
exposing authenticated Linear URLs. Images are downloaded to a
temporary directory and cached for reuse.

- Add image download and caching system
- Update deno.json permissions for temporary directories and
  uploads.linear.app domain access
- Add dependencies: remark, unified, mdast, valibot, sanitize-filename
- Add LINEAR_DOWNLOAD_IMAGES env var and download_images config option
  (enabled by default, disable with --no-download flag)

Claude-session-id: 626af003-386f-486b-8357-db352b0b5766
2025-12-03 22:45:28 -08:00
Peter Schilling 14064b6fc3 Add manual sort as secondary priority sort
When sorting issues by priority, apply manual sort order (drag
position) as a tertiary sort after priority, matching the behavior
of the Linear app. This ensures issues within each priority group
maintain their manual ordering.

Claude-session-id: f15ec08b-4174-460c-a3bd-b00629eb708e
2025-12-03 21:21:03 -08:00
Peter Schilling 1219af79a6 improve release script 2025-12-02 22:57:08 -08:00
Peter Schilling 772fd2688f chore: Release linear-cli version 1.3.1 v1.3.1 2025-12-02 22:56:19 -08:00
Peter Schilling 8a42357827 Make issue-view test deterministic
Fix flaky test that was failing due to non-deterministic port numbers
in error messages and Docker listening on the hardcoded test port.

- Change test endpoint from port 3000 to 59123 to avoid Docker
  conflicts that caused timeouts
- Normalize ephemeral port numbers in error messages to a stable
  placeholder (127.0.0.1:PORT)

Claude-session-id: a1a55e89-c333-41b3-8034-b9cbe6514ad3
2025-12-02 22:56:00 -08:00
Peter Schilling fe469cc6d5 upgrade cargo dist to latest 2025-12-02 22:38:06 -08:00
Peter Schilling c0d5b3909d drop x86_64-apple-darwin since github is not going to provide runners 2025-12-02 22:38:06 -08:00
Peter Schilling 85591f8c2c Cache Rust build in release workflow to speed builds and reuse artifacts
Claude-session-id: b7feff7e-b2b9-4051-bbcc-98b5323cc412
2025-12-02 22:38:06 -08:00
Peter Schilling 871463d4a3 Fix cross-compilation for aarch64 builds
Pass CARGO_DIST_TARGET to deno compile to ensure correct architecture
binaries are produced for each target. Without --target, deno defaults to
the host architecture, causing aarch64 release assets to contain x86_64
binaries when built on x86_64 GitHub runners.

Claude-session-id: c7276b7f-5177-42e7-86c0-dcda770612bf
2025-12-02 22:38:06 -08:00
Peter Schilling 8952726213 fix release script 2025-12-01 21:42:05 -08:00
Peter Schilling 1867c1315c chore: Release linear-cli version 1.3.0 v1.3.0 2025-12-01 21:23:36 -08:00
Peter Schilling 57f13bf93f finesse readme 2025-12-01 21:21:50 -08:00
Peter Schilling 801c71ae35 switch to jj commands for releases 2025-12-01 21:21:09 -08:00
Peter Schilling b180452c5c update snapshots 2025-12-01 21:20:46 -08:00
Peter Schilling 37bd1d8140 Document issue comment commands in README
Add documentation for the new comment management commands:
- linear issue comment list: view all comments on an issue
- linear issue comment add: add a new comment or reply
- linear issue comment update: modify an existing comment

Claude-session-id: d5069805-c5b7-479c-bc65-f7d20f7c39d7
2025-12-01 21:11:17 -08:00
Peter Schilling f94b9bac6f update changelog 2025-12-01 21:08:46 -08:00
Peter Schilling 52171194ae Capture jj command output and only print on error
Update prepareJjWorkingState, setJjDescription, and
createJjNewChange to capture stdout and stderr instead of
inheriting them. Only print errors to the console if the
command fails.

Claude-session-id: ae02c694-fdfb-4a59-b56a-72b3761afb1a
2025-12-01 21:01:49 -08:00
Peter Schilling 69b0758a3d update changelog 2025-12-01 13:09:28 -08:00
Peter Schilling 239549bcee Disable VCS inference in issue start command
Skip looking up the issue ID from the current git branch or jj
description when no ID is provided. This ensures the command always
prompts the user to select from a list of unstarted issues rather
than automatically continuing work on the current issue.

Claude-session-id: bef23d17-e070-4dc2-a228-23d536c40cb9
2025-12-01 13:02:29 -08:00
Peter Schilling d6d0e21d09 Create new jj change after setting issue description
When starting work on an issue with jj, the workflow now creates a
new empty change after setting the description. This allows the issue
metadata to be in a parent commit while having a fresh change to work
on, matching typical development workflows.

- Add createJjNewChange function to jj.ts
- Call createJjNewChange after setJjDescription in startVcsWork
- Import new function in vcs.ts

Claude-session-id: d386df16-73ae-46eb-b7d6-bcc3d6d74df3
2025-12-01 11:02:02 -08:00
Peter Schilling 76f5ab45bc update changelog 2025-12-01 10:58:23 -08:00
Peter Schilling 77dd899d47 change format of issue describe output (jj-vcs)
this also adds --references flag for non-closing linear magic words (jj-vcs)

Claude-session-id: 7d48da37-dc2f-4c72-9570-f4500f227643
2025-12-01 09:24:02 -08:00
peter schilling 0965332b27 Merge pull request #70 from tallesborges/feat/add-custom-branch-option-to-issue-start
feat: add --branch option to issue start command
2025-12-01 09:23:19 -08:00
Talles Borges eda513a4f6 style: format code with deno fmt 2025-11-25 17:21:27 -03:00
Talles Borges 5126e00a76 feat: add --branch option to issue start command
- Add  option to customize branch name
- Allows overriding the auto-generated branch name based on issue identifier
- Follows project naming conventions (consistent with --base/--head in pull-request)
- Maintains backward compatibility - existing behavior unchanged when option not provided
2025-11-25 17:19:18 -03:00
peter schilling 5b6b17e759 Merge pull request #69 from tallesborges/feat/add-limit-parameter-to-issue-list
feat: add --limit parameter to issue list command for pagination control
2025-11-24 23:25:34 -08:00
Talles Borges 70f7b1c3f6 fix: add type annotation to fetchIssuesForState result
- Add GetIssuesForStateQuery type import
- Add explicit type annotation for result variable in pagination loop
- Update snapshot tests to reflect new --limit option in help text
- Fixes TypeScript type checking error (TS7022)
2025-11-24 10:49:06 -03:00
Talles Borges 5629a78761 style: remove comment 2025-11-24 10:34:00 -03:00