-
Notifications
You must be signed in to change notification settings - Fork 21
Add initiative, label, and bulk operation support #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
skgbafa
wants to merge
6
commits into
schpet:main
Choose a base branch
from
skgbafa:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,526
−63
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* TC-522: Add team delete and initiative update/unarchive/delete commands - team delete: with --move-issues option to migrate issues before deletion - initiative update: update name, description, status, owner, target date, color, icon - initiative unarchive: restore archived initiatives with confirmation - initiative delete: permanent deletion with typed name confirmation for safety All commands include proper safety confirmations for destructive operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-521: Add bulk operation support across commands - Add shared bulk utilities (src/utils/bulk.ts): - collectBulkIds: supports --bulk, --bulk-file, --bulk-stdin - executeBulkOperations: concurrent execution with progress - printBulkSummary: formatted output with success/failure details - Add initiative-archive command with bulk support: - Single and bulk archive operations - Progress reporting during bulk operations - Update initiative-delete with bulk support: - Add --bulk, --bulk-file, --bulk-stdin flags - Refactor into handleSingleDelete/handleBulkDelete - Update issue-delete with bulk support: - Add --bulk, --bulk-file, --bulk-stdin flags - Refactor into handleSingleDelete/handleBulkDelete Example usage: linear init archive --bulk id1 id2 id3 linear issue delete --bulk TC-100 TC-101 TC-102 linear init archive --bulk-file initiatives-to-archive.txt linear issue list --state canceled --output-ids | linear issue delete --bulk-stdin 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-520: Add project create command - Add project-create.ts with: - GraphQL mutations for CreateProject and AddProjectToInitiative - Interactive mode with prompts for name, team, status, lead, dates - CLI flags: --name, --team, --description, --lead, --status, --start-date, --target-date, --initiative - Team lookup/validation via getTeamIdByKey - Status lookup from actual project statuses in org - Optional initiative linking at creation time - Register create command in project.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-519: Add label list, create, and delete commands - Add label command with list, create, delete subcommands - label list: workspace/team filtering, JSON output - label create: name, color, description, team; interactive mode - label delete: by name or ID with team disambiguation - Register label command in main.ts with alias "l" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-518: Add initiative add-project and remove-project commands Adds two new subcommands for linking projects to initiatives: - `linear init add-project <initiative> <project>`: Link a project to an initiative - `linear init remove-project <initiative> <project>`: Unlink a project from an initiative Features: - Resolve initiatives/projects by UUID, slug, or name (case-insensitive) - Optional --sort-order for add-project to set position - Confirmation prompt for remove-project (skip with -y/--force) - Proper error handling for already-linked or not-linked cases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-517: Add initiative create command - New initiative-create.ts with name, description, status, owner, target-date, color, and icon options - Supports both interactive mode (prompts) and flag-based creation - Status options: planned, active, paused, completed, canceled - Owner lookup via username, email, or @me - Registered create subcommand in initiative.ts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * TC-516: Implement initiative list and view commands - Add initiative-list.ts: - Lists initiatives with filtering by status, owner, archived - Default: active only, use --all-statuses for all - Table output with SLUG, NAME, STATUS, HEALTH, OWNER, PROJ, TARGET - Color-coded status display - Supports --json, --web, --app options - Add initiative-view.ts: - View initiative details by UUID, slug, or name - Shows info, description, and linked projects grouped by status - Supports --json, --web, --app options - Update initiative.ts to register list (alias: ls) and view commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * build fixes * Fix GraphQL schema issues for initiative commands - Rename duplicate GetInitiativeDetails to GetInitiativeForUpdate - Fix initiativeToProjects query (API doesn't support filter, use client-side filtering) - Fix initiativeUnarchive return type (use 'entity' not 'initiative') - Fix initiative status enum values (Planned, Active, Completed - capitalized) - Fix initiative list archivedAt filter (use includeArchived query param instead) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Fix label commands - Add label ID column to label list output - Fix label delete error handling for invalid input - Fix initiative unarchive to query with includeArchived Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * update skill --------- Co-authored-by: Claude <noreply@anthropic.com>
Add { collect: true } to the --label option to allow repeated flags:
linear issue create --label Feature --label AI --label Bug
Changes:
- Use Cliffy collect option for repeatable --label flag
- Simplify null checks (labels != null instead of !== true)
- Update help text snapshots
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been using this CLI as my primary driver for using linear with Claude + other agentic tools and we use initiatives + labels heavily in our workflow. This is usually done by making direct GraphQL queries, which includes mistakes, retries and clutters up the context window compared to an ivocation of the CLI. I've added our commonly used methods and tested them.
This was created based on GraphQL calls I have used and some delete methods have been included. They require confirmation, but could be removed from here. They make it possible to do more complex refactors with an LLM. They have been tested as well.
Would love to have this merge to make it easy to install this update in various configurations. Happy to answer any questions
Summary
This PR adds several major features to linear-cli:
project createcommand with interactive mode and initiative linkingteam deletecommand with confirmationNew Commands
Initiatives
linear initiative list- List all initiatives with filtering optionslinear initiative view <id>- View initiative details including linked projectslinear initiative create- Create new initiative (interactive or via flags)linear initiative archive <id>- Archive an initiativelinear initiative unarchive <id>- Unarchive an initiativelinear initiative update <id>- Update initiative propertieslinear initiative delete <id>- Delete an initiative (with confirmation)linear initiative add-project- Link a project to an initiativelinear initiative remove-project- Remove project from initiativeLabels
linear label list- List labels with optional team filterlinear label create- Create a new labellinear label delete <id>- Delete a labelProjects
linear project create- Create a new project with team, lead, dates, status, and optional initiative linkingTeams
linear team delete <id>- Delete a team (with confirmation)Test plan
linear initiative listshows initiativeslinear initiative view <id>displays initiative detailslinear initiative createworks in both interactive and CLI modeslinear label listandlinear label createworklinear project createcreates projects correctlylinear issue delete --bulk ID1 ID2 ID3