linear-cli icon indicating copy to clipboard operation
linear-cli copied to clipboard

Create issue doesn't respect workspace from .toml

Open kjj9 opened this issue 10 months ago • 3 comments

Hi there,

I'm in multiple organizations case scenario.

I have used command linear config for setting up linear cli on project.

It created proper file that includes workspace in it, command: linear issue list respects workspace from toml and shows issue only from that workspace but using: linear issue create creates issue in diffrent workspace.

kjj9 avatar Jan 08 '26 15:01 kjj9

@kjj9 hi! thanks for reporting. your linear api key is tied to a workspace. given this, i think what's going on is that you're using an api key from workspace A, and trying to create issues in workspace B. you'll need to create an api key for the different workspace.

it's a bit confusing that i store workspace at all in the linear config file, given the api keys are specific to a workspace.

the way i find it easiest to work in multiple orgs is to use https://direnv.net/ - i.e. i'll have

  • ~/org1/.envrc ← has export LINEAR_API_KEY=lin_api_org1apikey...
  • ~/org1/cool-project
  • ~/org2/.envrc ← has export LINEAR_API_KEY=lin_api_org2apikey...
  • ~/org2/other-project

let me know if that is what's going on, and if that solution works for you.

schpet avatar Jan 08 '26 16:01 schpet

hi, thanks for that you're totally right my bad, thought that api key is global :D

kjj9 avatar Jan 10 '26 15:01 kjj9

@kjj9 FYI latest version supports this a lot better, check out the new linear auth commands - mutli workspace keys etc

schpet avatar Feb 02 '26 21:02 schpet