Skip to content

Support sandbox branch targeting by name - #616

Closed
theunreal wants to merge 5 commits into
base44:mainfrom
theunreal:codex/sandbox-branch-support
Closed

theunreal wants to merge 5 commits into
base44:mainfrom
theunreal:codex/sandbox-branch-support

Conversation

@theunreal

@theunreal theunreal commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Sandbox commands target a Base44 branch by name with --branch <name>. For example:

base44 --app-id <app-id> --branch feature/checkout sandbox read src/App.jsx

The CLI resolves the exact name within the selected app and sends the ID to the sandbox bridge internally. Missing or ambiguous names fail before any sandbox operation. --branch main or no flag targets main. No checkout state is saved, and there is no public ID flag.

All seven sandbox commands honor the global flag; unsupported commands such as functions pull/list reject it explicitly. Broader resource branch support remains separate work.

Validation: production bundle build, TypeScript typecheck, lint, Knip, and 37 mocked-HTTP CLI tests passed. No live E2E run.

Pairs with base44-dev/apper#23840, whose Builder-generated CLI instructions now include the selected branch name. MCP sandbox tools are an independent connection and do not invoke the CLI.

Branch discovery: base44 --app-id <app-id> branches list returns main and active branch names, with structured JSON output for agents; IDs remain internal.

@theunreal
theunreal force-pushed the codex/sandbox-branch-support branch from 80c2ef8 to e9c5d36 Compare September 10, 2026 08:18
carmelc
carmelc previously approved these changes Sep 10, 2026
Comment thread packages/cli/src/cli/commands/sandbox/checkpoint.ts Outdated
Comment thread docs/commands.md Outdated

## Branch targeting

`--branch-id <id>` is global, but currently supported only by sandbox commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is it called branch-id and not just branch? what is an example value that needs to be passed, is it really an id?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The CLI now accepts only --branch and resolves the ID internally.

netanelgilad
netanelgilad previously approved these changes Sep 14, 2026
@theunreal theunreal changed the title Support app branches in sandbox commands Support sandbox branch targeting by name or ID Sep 14, 2026
Comment thread docs/commands.md Outdated

## Branch targeting

`--branch <name>` and `--branch-id <id>` are global, but currently supported only by sandbox commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we dont need both :) just branch.
users and agents have no way to know the id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The ID flag is removed, and branches list now lets agents discover names directly.

@theunreal theunreal changed the title Support sandbox branch targeting by name or ID Support sandbox branch targeting by name Sep 14, 2026
@theunreal

Copy link
Copy Markdown
Contributor Author

Moved unchanged to internal PR #622 so trusted publishing and review workflows can run.

@theunreal theunreal closed this Sep 14, 2026
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