Skip to content

Add a setting to disable lstk update checks - #465

Draft
anisaoshafi wants to merge 4 commits into
mainfrom
devx-1029-allow-permanently-disabling-lstk-update-checks
Draft

Add a setting to disable lstk update checks#465
anisaoshafi wants to merge 4 commits into
mainfrom
devx-1029-allow-permanently-disabling-lstk-update-checks

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Motivation

lstk asks you to update on every start, with no way to turn it off. With weekly releases, "skip this version" just delays the prompt by a few days.

It is also wrong when another tool installed lstk. mise, Nix, asdf, Scoop and Chocolatey own the binary, so lstk should not replace it. On Nix it cannot: the store is read-only.

Solution

A new [cli] update_check setting, also available as LSTK_UPDATE_CHECK:

  • prompt: ask before updating (today's behaviour, still the default)
  • notify: print one line and carry on, no waiting for input
  • off: no check at all, no output, no network request

Installs owned by another package manager get notify automatically, pointing at that tool instead of lstk update:

> Note: Update available: 0.20.1 → 0.21.0 (installed with mise — run mise upgrade lstk)

lstk update now refuses on those installs and says how to update instead. lstk update --check still works, and running lstk update yourself always checks, whatever the setting says.

The prompt also gained a [N] Don't ask again option, which saves notify to your config. No docs needed to find it.

A bad value is reported and ignored, so a typo cannot stop lstk start.

Also fixes a bug: the non-interactive path built its own options and ignored update_skipped_version. Both paths now share one policy.

Docs

User-facing, needs documenting:

  • New config key [cli] update_check (prompt / notify / off, default prompt), and new env var LSTK_UPDATE_CHECK which overrides it.
  • lstk update now exits non-zero on installs owned by mise, asdf, Nix, Scoop or Chocolatey, with a new JSON error code UPDATE_EXTERNALLY_MANAGED.
  • Those installs see a one-line note instead of the prompt.
  • The prompt has a new "Don't ask again" option.

Already updated here: default_config.toml (which had no [cli] section before), docs/structured-output.md, README.md, lstk update --help.

Review

Human review advised. Changes default behaviour for some installs, and adds a public config key, env var, and JSON error code.

Closes DEVX-1029

Co-authored-by: Claude <noreply@anthropic.com>
@anisaoshafi anisaoshafi added semver: minor docs: needed Pull request requires documentation updates labels Aug 19, 2026
anisaoshafi and others added 3 commits August 19, 2026 15:37
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs: needed Pull request requires documentation updates semver: minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant