yamadashy/repomix · error · RepomixError
No data provided via stdin. Please pipe file paths to repomi
Error message
No data provided via stdin. Please pipe file paths to repomix when using --stdin flag.
What it means
Thrown by readFilePathsFromStdin when --stdin is used but stdin is a TTY (interactive terminal), meaning no piped data was provided. Repomix expects file paths to be piped in when --stdin is set.
Source
Thrown at src/core/file/fileStdin.ts:83
* Reads file paths from stdin, one per line.
* Filters out empty lines and comments (lines starting with #).
* Converts relative paths to absolute paths based on the current working directory.
*/
export const readFilePathsFromStdin = async (
cwd: string,
deps: StdinDependencies = {
stdin: process.stdin,
createReadlineInterface: readline.createInterface,
},
): Promise<StdinFileResult> => {
logger.trace('Reading file paths from stdin...');
try {
const { stdin, createReadlineInterface } = deps;
// Check if stdin is a TTY (interactive mode)
if (stdin.isTTY) {
throw new RepomixError('No data provided via stdin. Please pipe file paths to repomix when using --stdin flag.');
}
// Read all lines from stdin (wait for EOF)
const rawLines = await readLinesFromStream(stdin as Readable, createReadlineInterface);
// Filter out empty lines and comments
const validLines = filterValidLines(rawLines);
if (validLines.length === 0) {
throw new RepomixError('No valid file paths found in stdin input.');
}
// Convert relative paths to absolute paths and deduplicate
const filePaths = resolveAndDeduplicatePaths(validLines, cwd);
logger.trace(`Found ${filePaths.length} file paths from stdin`);
return {View on GitHub (pinned to f465ad9093)
Solutions
- Pipe file paths into repomix, e.g. `git ls-files | repomix --stdin`.
- If you meant to pack a directory, drop the --stdin flag and pass the path instead.
- In scripts, ensure stdin redirection is preserved (avoid allocating a TTY when invoking repomix).
Example fix
// before repomix --stdin // after git ls-files | repomix --stdin
Defensive patterns
Strategy: validation
Validate before calling
if (process.stdin.isTTY && process.argv.includes('--stdin')) {
throw new Error('--stdin requires piped input, e.g.: git ls-files | repomix --stdin');
} Type guard
const hasStdinData = (stdin: typeof process.stdin): boolean => !stdin.isTTY;
Try / catch
try {
await repomix.pack({ input: { stdin: true } });
} catch (e) {
if (e instanceof Error && e.message.includes('No data provided via stdin')) {
console.error('Pipe file paths in: git ls-files | repomix --stdin');
} else throw e;
} Prevention
- Always pair --stdin with a pipe on the same command line.
- Test pipes with `echo file.ts | repomix --stdin` before scripting.
- In CI/scripts, verify stdin is redirected and not a TTY.
- Drop --stdin if you actually want directory-based packing.
When it happens
Trigger: Running `repomix --stdin` directly in a terminal without piping anything into it, so stdin.isTTY is true.
Common situations: Copy-pasting the --stdin example without the pipe portion (e.g. `git ls-files | repomix --stdin`), or running the command inside a script that lost its stdin redirection.
Related errors
- When using --stdin, do not specify directory arguments. File
- No valid file paths found in stdin input.
- --skill-output can only be used with --skill-generate
- --force can only be used with --skill-generate
- --skill-project-name can only be used with --skill-generate
AI-assisted analysis of yamadashy/repomix@f465ad9093 (2026-08-29).
Data as JSON: /api/errors/bc12e82bf634129e.
Report an issue: GitHub.