Skip to content

Add Local environment option to boxel profile add#4420

Merged
jurgenwerk merged 1 commit intomainfrom
cs-10803-boxel-cli-add-local-environment-option-to-profile-add
Apr 16, 2026
Merged

Add Local environment option to boxel profile add#4420
jurgenwerk merged 1 commit intomainfrom
cs-10803-boxel-cli-add-local-environment-option-to-profile-add

Conversation

@jurgenwerk
Copy link
Copy Markdown
Contributor

@jurgenwerk jurgenwerk commented Apr 16, 2026

When testing boxel-cli locally I needed an option to save a profile that works in a local setup. I think it would be beneficial to others too.

image

Add a third environment choice for local development (localhost:4201)
so developers don't need to manually configure Matrix and realm server URLs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jurgenwerk jurgenwerk changed the title CS-10803: Add Local environment option to boxel profile add Add Local environment option to boxel profile add Apr 16, 2026
@jurgenwerk jurgenwerk changed the title Add Local environment option to boxel profile add Add Local environment option to boxel profile add Apr 16, 2026
@jurgenwerk jurgenwerk marked this pull request as ready for review April 16, 2026 09:53
@jurgenwerk jurgenwerk requested a review from a team April 16, 2026 09:55
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c3e603e41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export function getEnvironmentFromMatrixId(matrixId: string): Environment {
if (matrixId.endsWith(':stack.cards')) return 'staging';
if (matrixId.endsWith(':boxel.ai')) return 'production';
if (matrixId.endsWith(':localhost')) return 'local';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve explicit URL handling for localhost profiles

Returning 'local' for :localhost makes ProfileManager.addProfile() treat @user:localhost as a known environment, so the non-interactive path (boxel profile add -u ... -p ...) no longer requires explicit URLs and silently falls back to the staging defaults (https://matrix-staging.stack.cards and https://realms-staging.stack.cards/). In practice, local profiles created this way point to staging endpoints and break local auth/workflows; addProfile needs a local default branch (or localhost should remain unknown until that branch exists).

Useful? React with 👍 / 👎.

@habdelra
Copy link
Copy Markdown
Contributor

Let's make sure to update the software-factory README.md to describe the end to end flow for running the factory. right now it's using env vars instead of relying on the boxel-cli profile

@jurgenwerk
Copy link
Copy Markdown
Contributor Author

@habdelra will add this in #4426

@jurgenwerk jurgenwerk merged commit eeb1d45 into main Apr 16, 2026
22 checks passed
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.

3 participants