Skip to content

STX-211 Implement contexts support and a few minor changes (1) - #37

Open
valkovich-ds wants to merge 2 commits into
mainfrom
STX-211-cli-foundation
Open

STX-211 Implement contexts support and a few minor changes (1)#37
valkovich-ds wants to merge 2 commits into
mainfrom
STX-211-cli-foundation

Conversation

@valkovich-ds

@valkovich-ds valkovich-ds commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📋 Type of the Changes

  • Breaking change
  • Non-breaking change
  • Bug fix / minor change

🛠 Changes being made

NOTE: Native image build temporary disabled. I'd propose to fix it after Kamil's build improvements will be merged, as well as other PRs from this series.

  • ⚠️⚠️⚠️ Before merge ⚠️⚠️⚠️ - decide what we set for these application properties:
streamx.defaults.auth.server-url=...
streamx.defaults.platform.url=...

Currently it point to a temporary dev server. It should point to default streamx.com prod URLs.

Contexts feature

CLI user can have multiple StreamX contexts on a single machine and switch between them.

All the settings, event templates, login credentials, etc., are stored per context.

Stored in ~/.streamx/contexts/<context_name>/.

The default context file structure is created on first use.

The current context is stored in ~/.streamx/current-context

Selection precedence: -C/--context flag > STREAMX_CONTEXT env > current-context pointer file > default.

Screenshot 2026-07-28 at 9 16 00 AM

For context management, these commands are implemented: streamx context create|list|use|current|delete

Other changes

  • Introduced reusable TextTable renderer is used for all list commands to guarantee consistent formatting.
  • Introduced DeleteConfirmation renderer for destructive operations.
  • Improved zsh autocompletion generation to support contexts.

✅ Checklist

  • My code follows the code standards of this project
  • Changed code is covered with unit tests
  • I have updated READMEs and java docs (if applicable)

@valkovich-ds
valkovich-ds marked this pull request as ready for review July 28, 2026 06:22
@valkovich-ds
valkovich-ds requested review from a team as code owners July 28, 2026 06:22
@valkovich-ds valkovich-ds changed the title STX-211 Implement contexts support and a few minor changes STX-211 Implement contexts support and a few minor changes (1) Jul 28, 2026
@valkovich-ds
valkovich-ds force-pushed the STX-211-cli-foundation branch 3 times, most recently from a76ca31 to 528fd27 Compare July 29, 2026 10:33
@valkovich-ds
valkovich-ds force-pushed the STX-211-cli-foundation branch from 528fd27 to 12340b9 Compare July 29, 2026 11:46
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.

1 participant