Skip to content

feat: flatten option for extras sync #97

@mk-imagine

Description

@mk-imagine

Feature Request

Add a flatten: true option to extras target configuration in config.yaml. When enabled, files in subdirectories of the extras source are synced directly into the target root rather than preserving the directory hierarchy.

Use Case

Some AI CLI tools (e.g. Claude Code's /agents) only discover files at the top level of their config directory — they do not recurse into subdirectories. When an extras source uses subdirectories for organization (e.g. agents/curriculum/, agents/software/), synced files land in subdirs and are invisible to the tool.

Proposed Config

extras:
  - name: agents
    targets:
      - path: ~/.claude/agents
        flatten: true   # sync all files directly into target root, ignoring source subdirs
      - path: ~/.agents/agents
        flatten: true

Current Workaround

Flatten the source directory manually and use filename prefixes for organization (e.g. curriculum-tactician.md, software-implementer.md). This works but loses the organizational structure in the source repo.

Expected Behavior

  • flatten: true: all .md files from any depth under the source are symlinked/copied directly into the target directory
  • Conflict behavior on name collision: warn and skip (or optionally error)
  • Compatible with all sync modes (merge, copy, symlink)

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions