This project enables users to execute Markdown files like shell scripts, piping their content through an AI model (specifically Claude Code) with full stdin/stdout support. It allows AI prompts to orchestrate shell commands, file operations, and API calls, replacing Python glue code for LLM orchestration tasks. The creator highlights improved composability and auditability compared to traditional shell scripts.
A starter prompt for Claude Code, what you'll need, and how to reach them.
You are a senior Rust/Go developer. Your task is to build a command-line tool named `lumivara-run` that enables executing Markdown files as scripts by piping their content through an AI model (specifically Claude Code). The core functionality should involve parsing a shebang line `#!/usr/bin/env lumivara-run [options]` from a Markdown file. The tool will then take the remaining content of the Markdown file as the prompt for the AI model. Implement full stdin/stdout support, allowing users to pipe data into the Markdown script and receive AI-generated output. Crucially, the AI model (via the Anthropic API) must be able to invoke shell commands on the local system. For the MVP, focus on reading the Markdown file, making an API call to Claude Code (with an environment variable for the API key), and printing the AI's response to stdout. Implement a `--permission-mode` flag for basic shell command execution within the AI's context (e.g., `bypassPermissions` for unrestricted access, or `promptForApproval` for interactive confirmation). Assume the Anthropic API is used via a simple HTTP client. For the first iteration, prioritize a single shebang line for `lumivara-run` and direct execution of the file content as a prompt.
Reach developers and solo operators who are heavy users of AI coding tools and want to integrate LLMs deeper into their build/automation workflows by offering a more composable and auditable way to orchestrate AI tasks.
I wanted to run markdown files like shell scripts. So I built an open source tool that lets you use a shebang to pipe them through Claude Code with full stdin/stdout support. task.md: #!/usr/bin/env claude-run Analyze this codebase and summarize the architecture. Then: chmod +x task.md ./task.md These aren't just prompts. Claude Code has tool use, so a markdown file can run shell commands, write scripts, read files, make API calls. The prompt orchestrates everything. A script that runs your tests and reports results (`run_tests.md`): #!/usr/bin/env claude-run --permission-mode bypassPermissions Run ./test/run_tests.sh and summarize what passed and failed. Because stdin/stdout work like any Unix program, you can chain them: cat data.json | ./analyze.md > results.txt git log -10 | ./summarize.md ./generate.md | ./review.md > final.txt Or mix them with traditional shell scripts: for f in logs/\*.txt; do cat "$f" | ./analyze.md >> summary.txt done This replaced a lot of Python glue code for us
Reply in the Hacker News thread to jedwhite's post.
“I've built a prototype of `lumivara-run` that provides executable Markdown files with Claude Code integration, similar to your vision. It supports shebangs, stdin/stdout, and shell command execution. Happy to share a demo or discuss further to see if there's an opportunity for collaboration or open-sourcing a robust alternative.”
Open the original ↗