Created
May 2, 2025 15:34
-
-
Save zachwill/00c5bc674a4e20203358f0572fc556b1 to your computer and use it in GitHub Desktop.
Windmill Bun shell script for Repomix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { $ } from "bun"; | |
export async function main( | |
github = "windmill-labs/windmill", | |
path = "**/*.rs" | |
) { | |
// Install repomix package globally | |
await $`bun install -g repomix`; | |
const random = Math.floor(1000 + Math.random() * 9000); | |
const OUTPUT = `./shared/repomix-${random}.txt`; | |
const include = path ?? "*"; | |
// Repomix | |
await $`/root/.bun/bin/repomix --remote ${github} --style plain --include ${include} --top-files-len 80 --remove-empty-lines --no-file-summary -o ${OUTPUT}`; | |
// Read the Repomix output and return it | |
const output = await $`cat ${OUTPUT}`; | |
return output.stdout.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment