-
Notifications
You must be signed in to change notification settings - Fork 8.4k
docs(sandboxes): add sandbox environments section (sbx env, experimental) #25487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dvdksn
wants to merge
22
commits into
docker:main
Choose a base branch
from
dvdksn:worktree-sbx-env-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f4802c4
docs(sandboxes): add sbx env experimental section to workflows page
dvdksn c5e7e8f
docs(sandboxes): add dedicated sandbox environment files page
dvdksn d4bce81
docs(sandboxes): fix schema accuracy from source code review
dvdksn e40a32b
docs(sandboxes): polish sandbox-environments page
dvdksn 20dde9e
docs(sandboxes): add Experimental sidebar badge to sandbox-environmen…
dvdksn 4450c95
Merge remote-tracking branch 'upstream/main' into codex/update-sbx-en…
dvdksn 899edf4
docs: align sandbox environment reference with v0.39
dvdksn f1f14b2
sandboxes: prepare environment docs for v0.39
dvdksn 9feb274
sandboxes: link environment files from get started
dvdksn 63b47b3
sandboxes: improve environment file introduction
dvdksn 3456c6b
sandboxes: add environment workflow gallery
dvdksn 8f2a9a7
sandboxes: omit environment interpolation docs
dvdksn 74499a9
docs(sandboxes): improve environment file learning flow
dvdksn 03e08ea
docs(sandboxes): strengthen environment starter example
dvdksn 1b95d19
docs(sandboxes): keep automation workflow focused
dvdksn 1cb30b4
docs(sandboxes): move update details after workflows
dvdksn c69be6e
docs(sandboxes): remove redundant project workflow
dvdksn 7db7bbb
docs(sandboxes): add port to starter environment
dvdksn 6afa473
docs(sandboxes): clarify environment field behavior
dvdksn fc07891
docs(sandboxes): keep environment files outside workspaces
dvdksn 2f4d007
docs(sandboxes): link clone mode guidance
dvdksn 092a2d1
docs(sandboxes): consolidate workspace warning
dvdksn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: sbx env | ||
| synopsis: | | ||
| Manage sandboxes declaratively from a .sbxenv.yaml file | ||
| experimental: true | ||
| description: |- | ||
| Manage a sandbox environment declared in a .sbxenv.yaml file. | ||
|
|
||
| The file describes the agent, optional mixin kits, workspace mounts, | ||
| environment variables, secrets to provision, and per-service credential | ||
| bindings. Secrets are provisioned at the environment's sandbox scope so | ||
| `sbx env rm` can remove everything it created. | ||
| usage: sbx env COMMAND | ||
| options: | ||
| - name: help | ||
| shorthand: h | ||
| default_value: "false" | ||
| usage: help for env | ||
| inherited_options: | ||
| - name: debug | ||
| shorthand: D | ||
| default_value: "false" | ||
| usage: Enable debug logging | ||
| see_also: | ||
| - sbx - Manage AI coding agent sandboxes. | ||
| - sbx env create - Create a sandbox environment from .sbxenv.yaml | ||
| - sbx env exec - Execute a command inside a sandbox environment | ||
| - sbx env rm - Remove a sandbox environment and its scoped resources | ||
| - sbx env run - Create (if needed) and attach to a sandbox environment | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: sbx env create | ||
| synopsis: Create a sandbox environment from .sbxenv.yaml | ||
| experimental: true | ||
| description: |- | ||
| Read the environment file from PATH (default: current directory), | ||
| provision its declared secrets at the sandbox scope, merge its credential | ||
| bindings, and create the sandbox. Use "sbx env run" to attach. | ||
|
|
||
| Each PATH may be a directory (the file is <PATH>/.sbxenv.yaml) or the | ||
| path to the environment file itself. Passing more than one PATH deep-merges them | ||
| in order (docker-compose `-f` semantics): later files override earlier ones. | ||
| Values may reference environment variables with ${VAR} / $VAR (and | ||
| ${VAR:-default}); see the docs for the full syntax. | ||
| usage: sbx env create [PATH...] [flags] | ||
| options: | ||
| - name: clone | ||
| default_value: "false" | ||
| usage: | | ||
| Override workspace.clone in .sbxenv.yaml (see 'sbx create --clone') | ||
| - name: help | ||
| shorthand: h | ||
| default_value: "false" | ||
| usage: help for create | ||
| inherited_options: | ||
| - name: debug | ||
| shorthand: D | ||
| default_value: "false" | ||
| usage: Enable debug logging | ||
| see_also: | ||
| - sbx env - (Experimental) Manage sandboxes declaratively from a .sbxenv.yaml file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: sbx env exec | ||
| synopsis: Execute a command inside a sandbox environment | ||
| experimental: true | ||
| description: |- | ||
| Run COMMAND in the sandbox declared in .sbxenv.yaml. The sandbox | ||
| must already exist (see "sbx env create" and "sbx env run"); a stopped sandbox is | ||
| started first. | ||
|
|
||
| Arguments before `--` are environment-file paths, following the same rules as | ||
| the other "sbx env" subcommands: each PATH may be a directory (the file is | ||
| <PATH>/.sbxenv.yaml) or the path to the environment file itself, and passing | ||
| more than one deep-merges them in order. Without a `--` every positional | ||
| argument forms the command and the environment file is read from the current | ||
| directory. | ||
|
|
||
| Flags match the behavior of "sbx exec". | ||
| usage: sbx env exec [flags] [PATH...] -- COMMAND [ARG...] | ||
| options: | ||
| - name: detach | ||
| shorthand: d | ||
| default_value: "false" | ||
| usage: 'Detached mode: run command in the background' | ||
| - name: detach-keys | ||
| usage: Override the key sequence for detaching a container | ||
| - name: env | ||
| shorthand: e | ||
| default_value: '[]' | ||
| usage: Set environment variables | ||
| - name: env-file | ||
| default_value: '[]' | ||
| usage: Read in a file of environment variables | ||
| - name: help | ||
| shorthand: h | ||
| default_value: "false" | ||
| usage: help for exec | ||
| - name: interactive | ||
| shorthand: i | ||
| default_value: "false" | ||
| usage: Keep STDIN open even if not attached | ||
| - name: privileged | ||
| default_value: "false" | ||
| usage: Give extended privileges to the command | ||
| - name: tty | ||
| shorthand: t | ||
| default_value: "false" | ||
| usage: Allocate a pseudo-TTY | ||
| - name: user | ||
| shorthand: u | ||
| usage: 'Username or UID (format: <name|uid>[:<group|gid>])' | ||
| - name: workdir | ||
| shorthand: w | ||
| usage: Working directory inside the container | ||
| inherited_options: | ||
| - name: debug | ||
| shorthand: D | ||
| default_value: "false" | ||
| usage: Enable debug logging | ||
| example: |4- | ||
| # Run a command in the environment declared in the current directory | ||
| sbx env exec go test ./... | ||
|
|
||
| # Open a shell | ||
| sbx env exec -it -- bash | ||
|
|
||
| # Run against explicitly merged environment files | ||
| sbx env exec .sbxenv.yaml override.yaml -- npm test | ||
| see_also: | ||
| - sbx env - (Experimental) Manage sandboxes declaratively from a .sbxenv.yaml file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: sbx env rm | ||
| synopsis: Remove a sandbox environment and its scoped resources | ||
| experimental: true | ||
| description: |- | ||
| Remove the sandbox declared in .sbxenv.yaml along with the | ||
| secret values provisioned at its sandbox scope (service, custom, and registry | ||
| credentials). Global credential bindings are left in place by default since | ||
| they are user-wide and may be shared with other sandboxes; pass | ||
| --prune-bindings to also remove the bindings this environment declares. | ||
|
|
||
| Each PATH may be a directory (the file is <PATH>/.sbxenv.yaml) or the | ||
| path to the environment file itself. Passing more than one PATH deep-merges them | ||
| in order (docker-compose `-f` semantics), so the same set used to create the | ||
| environment resolves to the same sandbox on removal. | ||
| usage: sbx env rm [PATH...] [flags] | ||
| options: | ||
| - name: force | ||
| shorthand: f | ||
| default_value: "false" | ||
| usage: Skip confirmation prompts | ||
| - name: help | ||
| shorthand: h | ||
| default_value: "false" | ||
| usage: help for rm | ||
| - name: prune-bindings | ||
| default_value: "false" | ||
| usage: | | ||
| Also remove this environment's bindings from the global credentials.yaml | ||
| inherited_options: | ||
| - name: debug | ||
| shorthand: D | ||
| default_value: "false" | ||
| usage: Enable debug logging | ||
| see_also: | ||
| - sbx env - (Experimental) Manage sandboxes declaratively from a .sbxenv.yaml file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: sbx env run | ||
| synopsis: Create (if needed) and attach to a sandbox environment | ||
| experimental: true | ||
| description: |- | ||
| Read the environment file from PATH (default: current directory) | ||
| and drop into the sandbox shell. If the sandbox already exists it is started | ||
| and re-attached without re-provisioning; otherwise it is created first | ||
| (provisioning secrets and bindings) and then attached. | ||
|
|
||
| Each PATH may be a directory (the file is <PATH>/.sbxenv.yaml) or the | ||
| path to the environment file itself. Passing more than one PATH deep-merges them | ||
| in order (docker-compose `-f` semantics): later files override earlier ones. | ||
| Values may reference environment variables with ${VAR} / $VAR (and | ||
| ${VAR:-default}); see the docs for the full syntax. | ||
| usage: sbx env run [PATH...] [flags] | ||
| options: | ||
| - name: clone | ||
| default_value: "false" | ||
| usage: | | ||
| Override workspace.clone in .sbxenv.yaml (see 'sbx create --clone') | ||
| - name: detached | ||
| shorthand: d | ||
| default_value: "false" | ||
| usage: Create/start the sandbox without attaching | ||
| - name: help | ||
| shorthand: h | ||
| default_value: "false" | ||
| usage: help for run | ||
| inherited_options: | ||
| - name: debug | ||
| shorthand: D | ||
| default_value: "false" | ||
| usage: Enable debug logging | ||
| see_also: | ||
| - sbx env - (Experimental) Manage sandboxes declaratively from a .sbxenv.yaml file |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.