Skip to content

Add lstk inspect to turn App Inspector on or off - #545

Draft
anisaoshafi wants to merge 3 commits into
mainfrom
devx-1151-add-an-lstk-cli-command-to-enable-app-inspector
Draft

anisaoshafi wants to merge 3 commits into
mainfrom
devx-1151-add-an-lstk-cli-command-to-enable-app-inspector

Conversation

@anisaoshafi

@anisaoshafi anisaoshafi commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Today, users can only turn on App Inspector with a button in the Web App. This PR adds a CLI command, so users can turn it on from the terminal, in CI, or in setup scripts. It is the CLI replacement for the enable step of localstack aws iam stream.

Solution

  • New command: lstk inspect enable | disable | status. AWS emulator only.
  • It changes App Inspector on the running emulator. The change ends when the emulator restarts.
  • --persist also saves the setting to config.toml, so it stays on after restarts. It works while the emulator is stopped too.
  • The saved setting is an [env.app-inspector] profile with APP_INSPECTOR = "1" or "0". lstk keeps your comments and formatting. If the change would not take effect, lstk puts the file back as it was.
  • Works with --endpoint-url, but --persist is not allowed there.
  • Supports --json.

Screenshots

Taken against a real emulator (localstack-pro:latest).

Turn App Inspector on or off for the running emulator

Keep it on after restarts with --persist

JSON output

When the emulator is not running

Help

Docs

New command: lstk inspect (AWS emulator only)

  • lstk inspect enable turns on App Inspector.
  • lstk inspect disable turns off App Inspector.
  • lstk inspect status shows if App Inspector is on or off.

By default, the change only lasts until the emulator restarts, and the emulator must be running.

New flag: --persist (for enable and disable)

Add --persist to keep the setting after restarts. lstk saves it in the config file. This also works when the emulator is stopped; the setting then applies on the next start.

lstk inspect enable --persist

Limits:

  • --persist needs a config file. On a fresh install, run lstk start once first.
  • --persist cannot be used with --endpoint-url.

JSON output

All three commands support --json. See docs/structured-output.md for the shape and error codes.

lstk inspect status --json

Review

Human review advised: a new user-facing command that edits the user's config file.

Closes DEVX-1151

@anisaoshafi anisaoshafi added semver: minor docs: needed Pull request requires documentation updates labels Oct 13, 2026
@anisaoshafi
anisaoshafi force-pushed the devx-1151-add-an-lstk-cli-command-to-enable-app-inspector branch from 7f340a5 to 0c624dc Compare October 14, 2026 07:47
@anisaoshafi
anisaoshafi force-pushed the devx-1151-add-an-lstk-cli-command-to-enable-app-inspector branch from 0c624dc to 841bd93 Compare October 27, 2026 13:54
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