PWI Software Documentation Help

Repomix

At PWI, we use Repomix to assist with incorporating chat models such as ChatGPT or Claude into our development workflows.

What is RepoMix?

Repomix bundles your repository’s code into a single text file for use with large language models (LLMs) like ChatGPT or Claude. It filters out unneeded files (builds, binaries, logs, secrets, etc.) so the output stays clean and concise.

Why use RepoMix?

When working with LLMs, it's crucial to provide them with relevant context. Repomix helps by:

  • Bundling Code: It consolidates your codebase into a single file, making

  • Filtering Unnecessary Files: It removes files that are not relevant to the task at hand, such as build artifacts, binaries, logs, and secrets.

  • Improving Model Performance: By providing a cleaner and more focused context, Repomix can help improve the performance of LLMs when generating code or answering questions about your codebase.

  • Ease of Use: It simplifies the process of preparing your code for use with LLMs, saving you time and effort.

Installation

You can install Repomix using npm. Run the following command in your terminal:

npm install -g repomix

Configuration

There are a few steps you want to take to configure Repomix for your project:

1. Configure .gitignore

We recommend tracking all repomix configurations in your repository. However, since repomix outputs are often customized per use, you should add the following to your .gitignore file:

# repomix outputs repomix-output*

2. Configure Repomix

Add a repomix.config.json file to the root of your repository. This file allows you to customize how Repomix processes your codebase. The recommended settings are:

{ "output": { "filePath": "repomix-output.txt", "style": "markdown", "parsableStyle": false, "fileSummary": true, "directoryStructure": true, "removeComments": false, "removeEmptyLines": false, "compress": false, "topFilesLength": 5, "showLineNumbers": false, "copyToClipboard": false }, "include": [], "ignore": { "useGitignore": true, "useDefaultPatterns": true, "customPatterns": [] }, "security": { "enableSecurityCheck": true }, "tokenCount": { "encoding": "o200k_base" } }

2. Set up additional ignore patterns

In addition to observing the patterns from .gitignore, Repomix allows you to set up custom ignore patterns in a .repomixignore file. Here are some recommended patterns to consider:

# ignore repomix files .repomixignore repomix.config.json # ignore some basic git files .gitattributes .gitignore # ignore github config files github/* # ignore metadata files .metadata # flutter specific analysis_options.yaml devtools_options.yaml assets/* # ignore jetbrains and vscode files .run/* .vscode/*

Use Repomix

Once you have installed and configured Repomix, you can generate the bundled code file by running commands in your terminal. Running these will generate a repomix-output.txt file (or the name you specified in the configuration) in the root of your repository. You can then copy and paste this file into your chat model to provide context for your queries.

To pack an entire repository:

repomix

To pack a specific directory:

rempomix path/to/directory

To pack specific files or directories using glob patterns:

repomix --include "src/**/*.ts,**/*.md"

To exclude specific files or directories:

repomix --ignore "**/*.log,tmp/"

There are many additional options you can use to customize the output. To see all available options, visit the Repomix documentation

24 September 2025