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

nit: Give helpful error messages for commands (e.g. `linear issue list`) when `linear config` is not ran.

Open aderk opened this issue 11 months ago • 3 comments

Current behavior (before successful linear config):

[I] ad@Alans-MacBook-Pro ~/c/prophetic-alder (alder)> linear issue list
Sort must be provided via command line flag, configuration file, or LINEAR_ISSUE_SORT environment variable
[I] ad@Alans-MacBook-Pro ~/c/prophetic-alder (alder) [1]> linear issue start
Could not determine team ID

Desired behavior: A helpful error message including something like "Do you need to run linear config?"

aderk avatar Dec 16 '25 17:12 aderk

yes: thanks for pointing this out!

i'll note that this cli works unconfigured as well - which will require a --team flag IIRC) so message might need to cover that use case as well.

schpet avatar Dec 16 '25 22:12 schpet

I don't understand why it works outside my repos but doesn't inside one. It doesn't make any sense to me that this CLI requires a repo-specific config or doesn't run. Can we just make it optional?

(edit: FWIW I use dorkitude/linctl now and it suits my agents and me much better)

ramnes avatar May 21 '26 09:05 ramnes

Partly addressed: 7097624 ("Point config suggestions at the real linear config command") wired config suggestions to the real command, and the team-not-set path now suggests running linear config (src/utils/linear.ts:106).

Leaving open for the exact first symptom reported here — linear issue list's "Sort must be provided" error (src/utils/linear.ts:576) still doesn't mention linear config. The remaining work is to add the config hint to that (and the "Could not determine team ID") path.

schpetbot avatar Jul 17 '26 20:07 schpetbot