Skip to content
Closed
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
22 changes: 22 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: "deps"
groups:
cargo-minor-patch:
update-types:
- minor
- patch

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
commit-message:
prefix: "ci"
28 changes: 25 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,35 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Run tests
run: cargo test --verbose
run: cargo test --locked --verbose

- name: Run tests (all features)
run: cargo test --locked --all-features --verbose

- name: Check formatting
run: cargo fmt --check

- name: Run clippy
run: cargo clippy -- -D warnings
run: cargo clippy --locked -- -D warnings

- name: Run clippy (all features)
run: cargo clippy --locked --all-features -- -D warnings

msrv:
name: MSRV (1.83.0)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@1.83.0

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Build on MSRV
run: cargo build --locked --all-features

build:
name: Build
Expand All @@ -49,4 +71,4 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Build release
run: cargo build --release
run: cargo build --release --locked
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ jobs:
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Publish to crates.io
run: cargo publish --allow-dirty
run: cargo publish --locked
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
77 changes: 77 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Contributing to linear-cli

Thanks for your interest in improving `linear-cli`! This guide covers local
setup and the checks that CI runs so you can reproduce them before opening a PR.

## Prerequisites

- Rust toolchain (latest stable is recommended). The minimum supported Rust
version (MSRV) is declared as `rust-version` in `Cargo.toml`.
- `git`, and optionally `gh` (GitHub CLI) for PR-related commands.

## Build

```bash
# Default features
cargo build

# With OS keyring support (Keychain, Credential Manager, Secret Service)
cargo build --features secure-storage

# All features (what CI builds on the MSRV lane)
cargo build --all-features
```

## Run the checks CI runs

CI (`.github/workflows/ci.yml`) runs the following on Linux, macOS, and Windows.
Run them locally before pushing:

```bash
# Format
cargo fmt --check

# Lint (warnings are denied in CI)
cargo clippy --locked -- -D warnings
cargo clippy --locked --all-features -- -D warnings

# Tests
cargo test --locked
cargo test --locked --all-features
```

CI also builds on the MSRV toolchain to ensure the declared `rust-version` keeps
working:

```bash
cargo build --locked --all-features
```

## Tests

- Unit tests live alongside the code under `src/` (`#[cfg(test)]` modules).
- Integration tests that shell out to the built binary live in
`tests/cli_tests.rs`.

When adding or changing a command, please keep the relevant `--help` assertions
in `tests/cli_tests.rs` up to date.

## Documentation

If your change alters CLI behavior or flags, update the matching docs:

- `README.md` — command reference and examples
- `docs/examples.md` — usage examples
- `docs/skills.md` / `docs/ai-agents.md` — agent-facing guidance
- `SECURITY.md` supported-versions table on each release

## Releases

Release automation is documented in `docs/manual-release.md`. Bump the version
in `Cargo.toml` and the supported-versions table in `SECURITY.md` together.

## Pull requests

- Keep PRs focused; one logical change per PR where practical.
- Make sure `fmt`, `clippy`, and `test` all pass locally.
- Describe what changed and why in the PR description.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "linear-cli"
version = "0.3.25"
edition = "2021"
rust-version = "1.83"
description = "A powerful CLI for Linear.app - manage issues, projects, cycles, and more from your terminal"
authors = ["scwrcd"]
license = "MIT"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Crates.io](https://img.shields.io/crates/v/linear-cli)](https://crates.io/crates/linear-cli)
[![CI](https://github.com/Finesssee/linear-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/Finesssee/linear-cli/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Rust](https://img.shields.io/badge/rust-1.70%2B-orange.svg)](https://www.rust-lang.org/)
[![Rust](https://img.shields.io/badge/rust-1.83%2B-orange.svg)](https://www.rust-lang.org/)

A fast, comprehensive command-line interface for [Linear](https://linear.app) built in Rust. Manage issues, projects, cycles, sprints, documents, and more -- entirely from your terminal.

Expand Down Expand Up @@ -329,8 +329,8 @@ Poll for real-time changes to issues, projects, or teams.

```bash
linear-cli watch issue LIN-123 # Watch an issue
linear-cli w project PROJECT_ID # Watch a project
linear-cli w team ENG # Watch a team
linear-cli watch project PROJECT_ID # Watch a project
linear-cli watch team ENG # Watch a team
```

### Triage
Expand Down Expand Up @@ -385,8 +385,8 @@ linear-cli export projects-csv -f projects.csv # Export projects to CSV
linear-cli search issues "auth bug" # Search issues
linear-cli s projects "platform" # Search projects
linear-cli context # Issue from current git branch
linear-cli history LIN-123 # Activity timeline
linear-cli metrics -t ENG # Team velocity and stats
linear-cli history issue LIN-123 # Activity timeline
linear-cli metrics velocity ENG # Team velocity and stats
```

### Raw GraphQL
Expand Down Expand Up @@ -449,8 +449,8 @@ Config is stored at `~/.config/linear-cli/config.toml` (Linux/macOS) or `%APPDAT

```bash
linear-cli config show # Show current config
linear-cli config get default_team # Get a value
linear-cli config set default_team ENG # Set a value
linear-cli config get api-key # Get a value (api-key, profile)
linear-cli config set profile work # Set the active profile

# Multiple workspaces
linear-cli config workspace-add work # Add workspace profile
Expand Down
6 changes: 3 additions & 3 deletions docs/ai-agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The easiest way to integrate linear-cli with your AI agent:
npx skills add Finesssee/linear-cli
```

This installs **27 Agent Skills** covering all CLI features. Your agent automatically loads the right skill based on the task.
This installs **38 Agent Skills** covering all CLI features. Your agent automatically loads the right skill based on the task.

See [skills.md](skills.md) for the full list of available skills.

Expand All @@ -22,7 +22,7 @@ See [skills.md](skills.md) for the full list of available skills.
| Latency | Single CLI execution | Multiple MCP round-trips |
| Feature coverage | Full API | Limited subset |
| Offline caching | Supported | Not available |
| Agent Skills | 27 skills included | Not available |
| Agent Skills | 38 skills included | Not available |

## Ready-to-Copy Agent Rules

Expand Down Expand Up @@ -104,7 +104,7 @@ SCHEMAS: JSON samples in docs/json/
| Create branch | `g checkout` | `linear-cli g checkout LIN-123` |
| Create PR | `g pr` | `linear-cli g pr LIN-123 --draft` |
| Search | `s issues` | `linear-cli s issues "auth bug"` |
| Bulk ops | `b update` | `linear-cli b update -s Done LIN-1 LIN-2` |
| Bulk ops | `b update-state` | `linear-cli b update-state Done -i LIN-1,LIN-2` |
| Fetch upload | `up fetch` | `linear-cli up fetch URL -f image.png` |

## One-Liner Setup
Expand Down
41 changes: 22 additions & 19 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,14 @@ linear-cli g pr LIN-123 --base main # Specify base branch

## jj (Jujutsu) Integration

The git subcommands auto-detect Jujutsu repositories. Pass `--vcs jj` to force it.

```bash
linear-cli j checkout LIN-123 # Create bookmark for issue
linear-cli j bookmark LIN-123 # Show bookmark name for issue
linear-cli j create LIN-123 # Create bookmark without checkout
linear-cli j pr LIN-123 # Create PR using jj git push
linear-cli g checkout LIN-123 --vcs jj # Create bookmark for issue
linear-cli g branch LIN-123 --vcs jj # Show bookmark name for issue
linear-cli g create LIN-123 --vcs jj # Create bookmark without checkout
linear-cli g commits --vcs jj # Show commits with Linear trailers
linear-cli g pr LIN-123 --vcs jj # Create PR using jj git push
```

## Sync Local Folders
Expand Down Expand Up @@ -143,31 +146,31 @@ linear-cli config show
## Interactive Mode

```bash
linear-cli ui # Launch interactive TUI
linear-cli ui --team ENG # Launch with preselected team
linear-cli ui issues # Browse issues interactively
linear-cli ui projects # Browse projects interactively
linear-cli interactive --team Engineering # Filter by team
linear-cli interactive # Launch interactive TUI
linear-cli int --team ENG # Launch with preselected team (alias: int)
```

## Multiple Workspaces

Workspaces are managed through `config workspace-*` subcommands.

```bash
linear-cli ws list # List configured workspaces
linear-cli ws add personal # Add a new workspace
linear-cli ws switch personal # Switch active workspace
linear-cli ws current # Show current workspace
linear-cli ws remove personal # Remove a workspace
linear-cli config workspace-list # List configured workspaces
printf '%s\n' "$LINEAR_API_KEY" | linear-cli config workspace-add personal # Add a workspace
linear-cli config workspace-switch personal # Switch active workspace
linear-cli config workspace-current # Show current workspace
linear-cli config workspace-remove personal # Remove a workspace
```

## Bulk Operations

Issues are passed with `-i` as a comma-separated list.

```bash
linear-cli b update -s Done LIN-1 LIN-2 LIN-3 # Update multiple issues
linear-cli b assign --user me LIN-1 LIN-2 # Assign multiple issues
linear-cli b label --add bug LIN-1 LIN-2 # Add label to multiple issues
linear-cli b move --project "Q1" LIN-1 LIN-2 # Move issues to project
linear-cli b delete --force LIN-1 LIN-2 LIN-3 # Delete multiple issues
linear-cli b update-state Done -i LIN-1,LIN-2,LIN-3 # Update status for multiple issues
linear-cli b assign me -i LIN-1,LIN-2 # Assign multiple issues
linear-cli b label bug -i LIN-1,LIN-2 # Add label to multiple issues
linear-cli b unassign -i LIN-1,LIN-2 # Unassign multiple issues
```

## JSON Output
Expand Down
9 changes: 8 additions & 1 deletion docs/manual-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

Use this guide when GitHub Actions is unavailable or when release assets need to be backfilled by hand.

> Automated releases differ slightly: the `Release` workflow triggers on GitHub
> release creation, so it builds and attaches binaries first and then runs
> `cargo publish` as the final step. The crate is published from a clean checkout
> of the tag (no `--allow-dirty`). The manual order below ("publish first") applies
> to hand-run backfills, where the GitHub release may not exist yet.

## Rules

1. Publish the crate to crates.io before creating or updating the matching GitHub release.
1. For manual backfills, publish the crate to crates.io before creating or updating the matching GitHub release.
2. Only attach binaries built from the exact source for that version tag.
3. Keep Windows release assets on `x86_64-pc-windows-msvc` so `cargo-binstall` metadata stays correct.
4. Publish from a clean checkout of the tagged commit; never use `cargo publish --allow-dirty`.

## Version Order

Expand Down
Loading
Loading