Problem
Default exclude patterns (DEFAULT_EXCLUDES) and copy-without-render patterns (DEFAULT_COPY_WITHOUT_RENDER) are hardcoded in src/extract/exclude.rs. Every time a new tool invents a cache/worktree directory (.astro, .claude/worktrees, .turbo, .next, etc.), it requires a code change, recompile, and release.
Proposed Solution
Move these patterns to a layered config system:
- Hardcoded minimal set — just the truly universal patterns (
.git, node_modules)
- User-level config —
~/.config/diecut/config.toml with default_excludes and default_copy_without_render arrays that extend the built-in defaults
This follows the existing XDG convention (~/.cache/diecut/ already exists for template caching).
Example config
[extract]
default_excludes = [
".astro",
".claude/worktrees",
".turbo",
".next",
".nuxt",
# ...
]
default_copy_without_render = [
"*.lock",
"pnpm-lock.yaml",
"Cargo.lock",
# ...
]
Users could add project-specific or tool-specific patterns without waiting for a diecut release.
Current Location
src/extract/exclude.rs — DEFAULT_EXCLUDES and DEFAULT_COPY_WITHOUT_RENDER constants.
Problem
Default exclude patterns (
DEFAULT_EXCLUDES) and copy-without-render patterns (DEFAULT_COPY_WITHOUT_RENDER) are hardcoded insrc/extract/exclude.rs. Every time a new tool invents a cache/worktree directory (.astro,.claude/worktrees,.turbo,.next, etc.), it requires a code change, recompile, and release.Proposed Solution
Move these patterns to a layered config system:
.git,node_modules)~/.config/diecut/config.tomlwithdefault_excludesanddefault_copy_without_renderarrays that extend the built-in defaultsThis follows the existing XDG convention (
~/.cache/diecut/already exists for template caching).Example config
Users could add project-specific or tool-specific patterns without waiting for a diecut release.
Current Location
src/extract/exclude.rs—DEFAULT_EXCLUDESandDEFAULT_COPY_WITHOUT_RENDERconstants.