Skip to content

Add --env-forward CLI flag#80

Merged
JAORMX merged 1 commit intomainfrom
add-env-forward-flag
Mar 23, 2026
Merged

Add --env-forward CLI flag#80
JAORMX merged 1 commit intomainfrom
add-env-forward-flag

Conversation

@JAORMX
Copy link
Copy Markdown
Contributor

@JAORMX JAORMX commented Mar 23, 2026

Summary

  • Adds a repeatable --env-forward CLI flag for ad-hoc host env var forwarding into VMs (exact names or globs like PREFIX_*)
  • CLI patterns are additive — merged with agent/config patterns via existing mergeEnvPatterns helper, consistent with --exclude and --allow-host
  • Adds integration test verifying EnvForwardExtra flows through Prepare() into VM env vars (merge, dedup, nil no-op)

Closes #77

Test plan

  • CGO_ENABLED=0 go build ./cmd/bbox/ compiles cleanly
  • CGO_ENABLED=0 golangci-lint run ./... — 0 issues
  • go test ./pkg/sandbox/ — all 34 tests pass (including 3 new sub-cases)
  • Manual smoke test: bbox claude-code --env-forward MY_VAR --env-forward 'CUSTOM_*'

🤖 Generated with Claude Code

Adds a repeatable --env-forward flag that merges with configured
env_forward patterns, matching the existing --exclude and --allow-host
pattern. CLI patterns are additive and deduplicated via mergeEnvPatterns.

Closes #77

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JAORMX JAORMX merged commit 406215a into main Mar 23, 2026
8 checks passed
@JAORMX JAORMX deleted the add-env-forward-flag branch March 23, 2026 13:38
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.

Add CLI flag for forwarding env vars into the VM

1 participant