Skip to content

Point config suggestions at the real linear config command#246

Merged
schpetbot merged 1 commit into
mainfrom
schpet/push-prqqoowpvplz
Jul 17, 2026
Merged

Point config suggestions at the real linear config command#246
schpetbot merged 1 commit into
mainfrom
schpet/push-prqqoowpvplz

Conversation

@schpetbot

Copy link
Copy Markdown
Collaborator

Several user-facing suggestions told users to run linear configure, which doesn't exist — the interactive setup command is registered as config, so linear configure failed with "Unknown command". The reporter hit this via linear team id with no team configured.

Changes

  • Correct all three suggestion strings (src/utils/linear.ts, src/commands/team/team-id.ts, src/commands/team/team-autolinks.ts) to name the canonical linear config.
  • Add configure as an alias for config so the natural command people (and the CLI's own help text) reach for just works instead of erroring. config stays canonical in every string and doc; the alias is purely additive tolerance — it matches the exact instinct that produced the bug.
  • Upgrade the bare Error thrown for an integer id with no team to a ValidationError, so it renders with the standard ✗ + suggestion treatment.
  • Move the root command from src/main.ts into src/cli.ts so tests can import it (to assert the alias resolves) without its complex inferred cliffy type entering the published public API and tripping no-slow-types. main.ts remains the entry point and runs it under import.meta.main.

Tests

  • Unit test: integer id with no team throws ValidationError pointing at linear config, never configure.
  • Snapshot tests reproducing the reporter's exact team id / autolinks errors.
  • Alias resolution test: configure resolves to the config command.

Fixes #245

Three user-facing strings advertised a `linear configure` command that does
not exist — the interactive setup command is registered as `config`, so
`linear configure` failed with "Unknown command". The reporter hit this via
`linear team id` with no team configured.

Fix all three suggestions to name the canonical `config` command, and add
`configure` as an alias so the natural command people (and the CLI's own help
text) reach for just works instead of erroring. Keeping `config` canonical in
every string and doc while tolerating `configure` is more robust than a bare
text swap: the alias matches the exact instinct that produced the bug.

Also upgrade the bare `Error` thrown for an integer id with no team to a
`ValidationError` so it renders with the standard ✗ + suggestion treatment.

The root command moves from src/main.ts into src/cli.ts so it can be imported
by tests (to assert the alias resolves) without its complex inferred cliffy
type entering the published public API and tripping no-slow-types; main.ts
stays the entry point and only runs it under import.meta.main.
@schpetbot
schpetbot merged commit 7097624 into main Jul 17, 2026
15 checks passed
@schpetbot
schpetbot deleted the schpet/push-prqqoowpvplz branch July 17, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong commands mentioned in help output

2 participants