Commit Graph

81 Commits

Author SHA1 Message Date
Peter Schilling 26c418f4b8 feat: split issue list into mine and query commands
Introduce 'issue mine' for personal work queue and 'issue query' for
structured retrieval with optional full-text search via --search.
Keep 'issue list' as a separate backwards-compatible command.
Remove standalone 'issue search' registration in favor of query --search.

query supports multi-team filtering, --all-teams, --json output,
--search-comments, and verifies GraphQL variables in tests.
2026-04-03 18:22:51 +00:00
Peter Schilling b4aea366f6 feat: add issue search command 2026-04-02 04:58:17 +00:00
Peter Schilling ab21736a1c docs: add npm install instructions to README 2026-03-07 17:59:28 +00:00
Jeffrey Holm 6f4d6e7530 feat: add milestone filter to issue list command
Adds --milestone flag to `linear issue list` to filter issues by project
milestone name. Requires --project since milestones belong to projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-05 07:26:51 -08:00
Jeffrey Holm b65ba20565 feat: add milestone support to issue commands (#149)
## Summary

- Adds `--milestone` flag to `issue create` and `issue update` commands
- Resolves milestones by name (case-insensitive) within the specified
project
- For `issue update`, automatically falls back to the issue's existing
project if `--project` is not explicitly provided
- Validates that a project context exists before attempting milestone
lookup, with helpful error messages
- Shows **project** and **milestone** in `issue view` output (displayed
below the title when present)

## Example usage

```sh
# Create an issue with a milestone
linear issue create --title "Implement feature" --team ENG --project "My Project" --milestone "Phase 1"

# Update an issue's milestone (project inferred from issue)
linear issue update ENG-123 --milestone "Phase 2"

# View an issue — now shows project and milestone
linear issue view ENG-123
# => Project: My Project | Milestone: Phase 1
```

## Test plan

- [x] Happy path tests for create and update with milestone
- [x] Snapshot test for `issue view` with project and milestone
displayed
- [x] All 205 tests pass
- [x] `deno check` and `deno lint` pass
- [x] GraphQL codegen regenerated
- [x] Verified end-to-end against Linear API

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

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-24 08:57:39 -08:00
Peter Schilling 1a6dcb0fb4 Add CI check for skill docs and update documentation
- Add CI workflow step to verify generated skill docs are up-to-date
- Add development section to README with instructions for:
  - Updating skill documentation with deno task generate-skill-docs
  - Running code formatting with deno fmt
- Update generate-docs.ts to automatically format generated files
- Regenerate skill docs to ensure they match current CLI version

Fixes #135
2026-02-12 08:03:29 -08:00
Peter Schilling aff8f82e8f chore: remove auth login warning and sync plugin versions to 1.9.1
The auth login command is now stable, so remove the warning from README.
Regenerated skill docs and updated marketplace.json and plugin.json
versions to match deno.json.
2026-01-30 07:10:46 +00:00
Peter Schilling 923a63cb85 note installation of skills for other agents 2026-01-29 21:55:21 -08:00
Peter Schilling df59898938 docs: add warning about new auth login command in README
Add a warning callout in the setup section noting that `linear auth login` is new and may have issues, with a link to the v1.8.1 README for stable setup instructions.
2026-01-23 14:37:31 -08:00
Peter Schilling 540818c0b1 feat: add multi-workspace authentication support
Add built-in credential storage for managing multiple Linear workspaces:
- ~/.config/linear/credentials.toml stores API keys by workspace slug
- auth login: add credentials (auto-detects workspace from API)
- auth logout: remove credentials
- auth list: show configured workspaces with org/user info  
- auth default: set the default workspace
- global -w/--workspace flag to target specific workspace

API key precedence: CLI flag > env var > config > workspace flag > project workspace > default
2026-01-23 14:28:45 -08:00
Peter Schilling 72cc3634fb docs: add plugin update instructions and move why section to bottom 2026-01-22 12:10:37 -08:00
Peter Schilling 2dc1d14684 docs: add AI agent emphasis to README intro 2026-01-22 11:11:30 -08:00
Sam Gbafa cd45a8a6aa Add initiative, label, and bulk operation support (#95)
This PR adds several major features to linear-cli:

- **Initiative management**: Full CRUD support for initiatives including
list, view, create, archive, unarchive, update, and delete commands
- **Initiative-project linking**: Commands to add and remove projects
from initiatives
- **Label management**: List, create, and delete commands for labels
with team filtering
- **Project creation**: New `project create` command with interactive
mode and initiative linking
- **Team deletion**: New `team delete` command with confirmation
- **Bulk operations**: New utility supporting bulk operations across
commands (issue delete now supports multiple IDs)

## New Commands

### Initiatives
- `linear initiative list` - List all initiatives with filtering options
- `linear initiative view <id>` - View initiative details including
linked projects
- `linear initiative create` - Create new initiative (interactive or via
flags)
- `linear initiative archive <id>` - Archive an initiative
- `linear initiative unarchive <id>` - Unarchive an initiative  
- `linear initiative update <id>` - Update initiative properties
- `linear initiative delete <id>` - Delete an initiative (with
confirmation)
- `linear initiative add-project` - Link a project to an initiative
- `linear initiative remove-project` - Remove project from initiative

### Labels
- `linear label list` - List labels with optional team filter
- `linear label create` - Create a new label
- `linear label delete <id>` - Delete a label

### Projects
- `linear project create` - Create a new project with team, lead, dates,
status, and optional initiative linking

### Teams
- `linear team delete <id>` - Delete a team (with confirmation)
2026-01-21 08:45:54 -08:00
Kirt Lillywhite 1268b667fb feat: support loading config from user home directory
Add support for loading `.linear.toml` from user's home directory as a
fallback when no project-level config exists:
- Unix: `~/.config/linear/linear.toml` or `$XDG_CONFIG_HOME/linear/linear.toml`
- Windows: `%APPDATA%\linear\linear.toml`

Config precedence (highest to lowest):
1. CLI flags
2. Environment variables
3. Project config (`.linear.toml` in cwd or repo root)
4. User home config

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:28:32 -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
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 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 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 bf25a6966b add jj links 2025-12-04 20:40:27 -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 57f13bf93f finesse readme 2025-12-01 21:21:50 -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 57f5ffabcd chore: fmt 2025-10-21 11:57:38 -07:00
Peter Schilling 4c65d6977e Add jj-vcs support to issue start command
Refactor issue start workflow to support both git and jj version control
systems via a new LINEAR_VCS configuration option (defaults to git).

- Create vcs.ts abstraction layer handling git and jj workflows
- Create jj.ts utility module for shared jj operations and formatting
- Add LINEAR_VCS config option to select between "git" and "jj"
- Use exhaustive switch with satisfies never for type safety
- Refactor issue-describe to reuse issue description formatting
- Extract git branch operations into vcs.ts for VCS abstraction

Claude-session-id: 3a93e6b3-7ede-4bc6-b6e3-cb6b2f08682a
2025-10-21 11:55:05 -07:00
Peter Schilling 4bb3bef0c7 change formatting rules: no prose wrap, no semi colons 2025-09-02 22:13:34 -07:00
Peter Schilling fef3ed456f improve README 2025-08-21 11:56:11 -07:00
Peter Schilling 729a24e5ef update README 2025-08-20 21:45:02 -07:00
Peter Schilling ce05c15bd0 Update README with linear issue start command and footnote 2025-08-20 21:42:08 -07:00
Peter Schilling 6f865a0ea7 add a --team flag to linear issue list
and simplify team stuff to only support id/key
2025-08-14 07:52:02 -07:00
Peter Schilling bb9d32d048 CLI-26 Allow creating sub-issues (#43)
https://linear.app/schpet/issue/CLI-26/allow-creating-sub-issues
2025-08-13 21:11:44 -07:00
Peter Schilling e0978f1132 CLI-11 Create a screen recording of linear issue create and put it in the readme (#42)
https://linear.app/schpet/issue/CLI-11/create-a-screen-recording-of-linear-issue-create-and-put-it-in-the
2025-08-13 08:39:44 -07:00
Peter Schilling 26eeb20a22 note linear list -A in readme 2025-08-12 22:08:03 -07:00
Peter Schilling 4ab63f226c improve readme 2025-08-12 20:38:48 -07:00
Peter Schilling 91fb7ee3cf update README 2025-08-12 14:40:45 -07:00
Peter Schilling c1fc5ae8c4 update README 2025-08-12 09:43:09 -07:00
Peter Schilling 442a7bc3c0 chore: Improve README 2025-06-16 07:31:16 -07:00
Peter Schilling 3eee80d2f5 chore: Update copy 2025-02-14 21:02:41 -08:00
Peter Schilling 7880da275d chore: readme 2025-02-12 16:32:03 -08:00
Peter Schilling 0c49412288 chore: copy update 2025-02-12 15:20:18 -08:00
Peter Schilling e60c06b6ca chore: update README 2025-02-12 15:13:45 -08:00
Peter Schilling 2107db9f4e chore: fmt 2025-02-12 13:20:33 -08:00
Peter Schilling (aider) 85505c164f chore: Add Linear API key creation URL to config command error message 2025-02-12 13:08:07 -08:00
Peter Schilling ea57c18c2a chore: fmt 2025-02-12 12:06:00 -08:00
Peter Schilling 9dada723c6 chore: update readme, releaser 2025-02-12 12:02:22 -08:00
Peter Schilling (aider) 75f31cd052 aider: docs: Add linear issue start command to README 2025-02-12 11:48:54 -08:00
Peter Schilling ac1caed5b7 chore: README 2025-02-12 11:48:06 -08:00
Peter Schilling 918cf0b691 update README 2025-02-12 11:47:33 -08:00
Peter Schilling (aider) 17cb8d0077 aider: docs: Update README with recommended Linear CLI commands 2025-02-12 11:45:24 -08:00
Peter Schilling (aider) b6c5072027 aider: docs: Mark linear issue open as deprecated in command descriptions 2025-02-12 11:22:51 -08:00