Repomix
Command-line tool that packs a code repository into a single file formatted for feeding to large language models.
Tested on Linux
Use it
Linux x86_64
These steps ran from a folder named work in the home folder, which already existed. Make it and run them from there:
mkdir -p "$HOME/work" && cd "$HOME/work"npm install -g repomix (candidate 2; npx candidate 1 leaves no persistent install and offline smoke-test replays need one)
npm install -g repomix
Verified in pickfit: the commands exactly as its sandbox ran them
For the record only: they name the sandbox's home, /home/sbx.
npm install -g repomixrepomix --versionmkdir -p /home/sbx/work/proj/src && cd /home/sbx/work/proj && cat > src/app.ts <<'EOF'
// Simple calculator module
export interface Calc {
add(a: number, b: number): number;
}
export class Calculator implements Calc {
add(a: number, b: number): number {
const result = a + b;
console.log("adding", a, b);
return result;
}
}
export function greet(name: string): string {
const msg = `Hello, ${name}!`;
return msg.toUpperCase();
}
EOF
cat > src/config.js <<'EOF'
const token = "ghp_Qm7Zt2Lx9Vb4Nc8Rk1Wp5Hy3Jd6Fs0Ga2Te7";
module.exports = { token };
EOF
cat > README.md <<'EOF'
# Demo project
A tiny project for repomix.
EOFcd /home/sbx/work/proj && repomix && cat repomix-output.xmlCheck that it works
repomix --versionThe output should contain “1.19.0”.
First thing to try
mkdir -p "$HOME"/work/proj/src && cd "$HOME"/work/proj && cat > src/app.ts <<'EOF'
// Simple calculator module
export interface Calc {
add(a: number, b: number): number;
}
export class Calculator implements Calc {
add(a: number, b: number): number {
const result = a + b;
console.log("adding", a, b);
return result;
}
}
export function greet(name: string): string {
const msg = `Hello, ${name}!`;
return msg.toUpperCase();
}
EOF
cat > src/config.js <<'EOF'
const token = "ghp_Qm7Zt2Lx9Vb4Nc8Rk1Wp5Hy3Jd6Fs0Ga2Te7";
module.exports = { token };
EOF
cat > README.md <<'EOF'
# Demo project
A tiny project for repomix.
EOFcd "$HOME"/work/proj && repomix && cat repomix-output.xmlRun repomix inside your project folder to pack it into repomix-output.xml.
What it does
- Pack a repository into one AI-friendly fileTested
How to use it
- Go to your project folder with
cd <your project>. - Run
repomix. - Open
repomix-output.xmlto see the packed result, for example withcat repomix-output.xml.
- Go to your project folder with
- Compress code with Tree-sitterTested
How to use it
- Go to your project folder with
cd <your project>. - Run
repomix --compress. - Open
repomix-output.xml; code blocks are separated by a ⋮---- delimiter.
- Go to your project folder with
- Count tokens per file and for the whole repositoryNot shown working
- Leave out credentials using Secretlint scanningNot shown working
How far pickfit got
Linux x86_64
- Installs
- Starts
- 2 of 4 features work
- Works offline
macOS: the project says it runs there; pickfit hasn’t tried it.
Good for
- pack a local repository into one file for an LLM
- pack a remote GitHub repository without cloning
- pack a list of files piped from stdin
- include git logs and diffs as context for AI analysis
An alternative to Gitingest.
How pickfit tested it
Each run starts from a clean machine and follows the steps above. How pickfit verifies
Linux x86_64
Its main function works
- Replayed from scratch
- Works offline
- Checked on 15 Nov 2026
- Version 1.19.0
Differences the test machine hit
- README: npm install -g repomix
In the test: Works as written; npm warns that @secretlint/secretlint-rule-preset-recommend@13.1.0 is deprecated (harmless).