linear's UI is incredibly good but it slows me down. i find the following pretty grating to experience frequently:
- switching context from my repo to linear
- not being on the right view when i open linear
- linear suggests a git branch, but i have to do the work of creating or switching to that branch
- linear's suggested git branch doesn't account for it already existing or having a merged pull request
this cli solves this. it knows what you're working on, does the work of managing branches, and will write your pull request details for you.
here's how it works:
it's pretty dialed to my own use cases, but i want to support more people than myself with this so lmk what it can do for you.
https://github.com/schpet/linear-cli/releases/latest
-
create an API key at https://linear.app/settings/account/security (requires member access, not available for guest accounts)
-
add the API key to your shell environment:
# in ~/.bashrc or ~/.zshrc: export LINEAR_API_KEY="lin_api_..." # or in fish: set -Ux LINEAR_API_KEY "lin_api_..." -
run the configuration wizard:
this will create a .linear.toml config file in your repository with your workspace and team settings.
the CLI works best when your git branches include Linear issue IDs (e.g. eng-123-my-feature). use linear issue start or linear UI's 'copy git branch name' button and related automations.
the current issue is determined by the issue id in the current git branch name. note that Linear's GitHub integration will suggest these branch names.