Skip to content

feat: flatten option for extras sync #97

Closed

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)

Activity

  1. self-assigned this
    on Mar 24, 2026
  2. added
    feature
    on Mar 24, 2026
  3. linked a pull request that will close this issuev0.17.11 #100on Mar 25, 2026
  4. runkids commented on Mar 25, 2026

    @runkids
    Owner

    Shipped in v0.17.11 🎉

    Thanks for the well-structured proposal @mk-imagine — landed exactly as described.

    What landed

    • Config: flatten: true per-target in extras config
    • CLI: --flatten / --no-flatten flags on extras sync, extras add; applies to all targets when --target is omitted
    • TUI: flatten option in extras add wizard + F toggle in extras list
    • Web UI: flatten checkbox with tooltip on Extras page
    • Conflict handling: name collisions warn and skip

    Example

    extras:
      - name: agents
        targets:
          - path: ~/.claude/agents
            flatten: true

    Your #98 (first-class agent support) is on the roadmap next — flatten was a great stepping stone toward that. Stay tuned!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions