{"record":{"id":"bc12e82bf634129e","repo":"yamadashy/repomix","slug":"no-data-provided-via-stdin-please-pipe-file-paths","errorCode":null,"errorMessage":"No data provided via stdin. Please pipe file paths to repomix when using --stdin flag.","messagePattern":"No data provided via stdin\\. Please pipe file paths to repomix when using --stdin flag\\.","errorType":"exception","errorClass":"RepomixError","httpStatus":null,"severity":"error","filePath":"src/core/file/fileStdin.ts","lineNumber":83,"sourceCode":" * Reads file paths from stdin, one per line.\n * Filters out empty lines and comments (lines starting with #).\n * Converts relative paths to absolute paths based on the current working directory.\n */\nexport const readFilePathsFromStdin = async (\n  cwd: string,\n  deps: StdinDependencies = {\n    stdin: process.stdin,\n    createReadlineInterface: readline.createInterface,\n  },\n): Promise<StdinFileResult> => {\n  logger.trace('Reading file paths from stdin...');\n\n  try {\n    const { stdin, createReadlineInterface } = deps;\n\n    // Check if stdin is a TTY (interactive mode)\n    if (stdin.isTTY) {\n      throw new RepomixError('No data provided via stdin. Please pipe file paths to repomix when using --stdin flag.');\n    }\n\n    // Read all lines from stdin (wait for EOF)\n    const rawLines = await readLinesFromStream(stdin as Readable, createReadlineInterface);\n\n    // Filter out empty lines and comments\n    const validLines = filterValidLines(rawLines);\n\n    if (validLines.length === 0) {\n      throw new RepomixError('No valid file paths found in stdin input.');\n    }\n\n    // Convert relative paths to absolute paths and deduplicate\n    const filePaths = resolveAndDeduplicatePaths(validLines, cwd);\n\n    logger.trace(`Found ${filePaths.length} file paths from stdin`);\n\n    return {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/yamadashy/repomix/blob/f465ad909315a22120636baf03fa5e28701a50cb/src/core/file/fileStdin.ts#L65-L101","documentation":"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.","triggerScenarios":"Running `repomix --stdin` directly in a terminal without piping anything into it, so stdin.isTTY is true.","commonSituations":"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.","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)."],"exampleFix":"// before\nrepomix --stdin\n\n// after\ngit ls-files | repomix --stdin","handlingStrategy":"validation","validationCode":"if (process.stdin.isTTY && process.argv.includes('--stdin')) {\n  throw new Error('--stdin requires piped input, e.g.: git ls-files | repomix --stdin');\n}","typeGuard":"const hasStdinData = (stdin: typeof process.stdin): boolean => !stdin.isTTY;","tryCatchPattern":"try {\n  await repomix.pack({ input: { stdin: true } });\n} catch (e) {\n  if (e instanceof Error && e.message.includes('No data provided via stdin')) {\n    console.error('Pipe file paths in: git ls-files | repomix --stdin');\n  } else throw e;\n}","preventionTips":["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."],"tags":["stdin","cli","usage"],"backgroundTag":"missing-stdin-input","analyzedSha":"f465ad909315a22120636baf03fa5e28701a50cb","analyzedAt":"2026-08-29T01:27:42.024Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}