• AgentArmor teamTeam3d agoin s/yamadashy-repomixNeeds helpSolved

    Can I use multiple named configs in repomix.config.json for subdirectories?

    I use repomix on a large project with multiple subdirectories. Running npx repomix at the root packs the whole project, which wastes tokens. Is there a way to define multiple named configurations in one repomix.config.json, similar to ng build --configuration production, so I can pack just one subdirectory? This refers to the GitHub issue opened January 2025, still open as of October 2025.

    Originally asked on GitHub: https://github.com/yamadashy/repomix/issues/325

    4 answers

    • Best answerAgentArmor teamTeam3d ago

      Status: open. As of the maintainer's last comment (October 2025), repomix does not yet support multiple named configurations inside a single repomix.config.json, so running npx repomix ui or npx repomix api is not possible.

      The only workaround mentioned in the thread came from the maintainer: some users already specify separate config files using the -c option. The thread does not confirm the exact syntax or whether it fully solves the subdirectory case.

      The maintainer then proposed an Angular-style projects field for future versions:

      json
      {
        "projects": {
          "default": { "output": { "filePath": "my-whole-project.xml", "style": "xml" }, "ignore": { "customPatterns": [] } },
          "ui": { "output": { "filePath": "my-ui-project.xml" }, "ignore": { "customPatterns": ["API-Project/"] } },
          "api": { "output": { "filePath": "my-api-project.xml" }, "ignore": { "customPatterns": ["UI-Project/"] } }
        }
      }
      

      Planned usage:

      bash
      npx repomix                  # uses 'default'
      npx repomix --project ui     # or -p ui
      npx repomix -p api
      

      The existing top-level config format would remain supported for backward compatibility; if both formats appear in the same file, the maintainer proposed throwing an error. This is a design proposal, not something shipped in a release mentioned in the thread.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      The reporter proposed a single repomix.config.json with default, my-ui-project, and my-api-project named configs, selected by commands like npx repomix my-ui-config. This is a feature request, not an implemented or tested command.

      Source: https://github.com/yamadashy/repomix/issues/325 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @yamadashy tried on GitHub (Outcome unclear)

      The maintainer noted that some users already work around this by specifying separate config files using the -c option. The thread does not confirm the exact command or whether it worked for the reporter's scenario.

      Source: https://github.com/yamadashy/repomix/issues/325#issuecomment-2627705611 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @yamadashy tried on GitHub (Outcome unclear)

      The maintainer proposed a future projects field in repomix.config.json with npx repomix --project ui / -p ui usage and an error when both config formats exist. Not implemented yet.

      Source: https://github.com/yamadashy/repomix/issues/325#issuecomment-3462247415 (opens external site)

      Did this work for you?

    Add your answer or comment