Background
Currently the CLI maps the entire current workspace into the container volume by default. This causes large or unnecessary directories (for example, node_modules) to be included in the volume mapping and copied/mounted.
Goal
Add a new configuration option that lets users specify a list of files and directories (and optionally glob patterns) to exclude from the default workspace-to-volume mapping.
Requirements / Acceptance criteria
- Default behavior remains unchanged: the current workspace is mapped by default if no excludes are configured.
- Provide a new configuration key (example name:
volume.exclude or mapping.excludes) that accepts a list of path strings and/or glob patterns.
- Excludes should be applied relative to the workspace root by default.
- Support common patterns like
node_modules, .git, build/, dist/**, **/node_modules.
- Exclude patterns must not break other mapping features (preserve symlinks behavior and file permissions as currently implemented).
- Implement clear precedence rules if both include and exclude logic exist (excludes should take precedence when a path matches both rules).
- Document the new option in the README and configuration reference with examples.
Examples
YAML config example:
mapping:
excludes:
- node_modules
- .git
- dist/**
CLI flag example (if applicable):
--exclude=node_modules --exclude=.git
Notes
- Consider whether to support both glob patterns and plain relative paths; prefer glob support for flexibility.
- Consider adding sensible default excludes (optional) or leave the list empty by default to preserve current behavior.
Tasks
- Add config parsing for the new key.
- Wire exclude logic into the file-to-volume mapping routine.
- Add unit tests covering typical patterns and edge cases.
- Add documentation and changelog entry.
Background
Currently the CLI maps the entire current workspace into the container volume by default. This causes large or unnecessary directories (for example, node_modules) to be included in the volume mapping and copied/mounted.
Goal
Add a new configuration option that lets users specify a list of files and directories (and optionally glob patterns) to exclude from the default workspace-to-volume mapping.
Requirements / Acceptance criteria
volume.excludeormapping.excludes) that accepts a list of path strings and/or glob patterns.node_modules,.git,build/,dist/**,**/node_modules.Examples
YAML config example:
mapping:
excludes:
- node_modules
- .git
- dist/**
CLI flag example (if applicable):
--exclude=node_modules --exclude=.git
Notes
Tasks