[{"data":1,"prerenderedAt":330},["ShallowReactive",2],{"project-46069556":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":43,"post_text":46,"what":47,"said":70,"maker_in_thread":156,"shape":167,"grid":172,"attempts":294,"same_week":295,"maker_shows":157,"maker_hidden":322,"reader_version":323,"card":324},"46069556","Runprompt","run .prompt files from the command line","title","Show HN: Runprompt – run .prompt files from the command line","https:\u002F\u002Fgithub.com\u002Fchr15m\u002Frunprompt","github.com","chr15m",1764253595,2025,134,49,559,3837,15,"notable","dev_tools","command line prompt runner","cli",[24,25,26,27,28],"llm cli","dotprompt","prompt templates","structured output","unix pipes","loved",0.265,{"positive":32,"neutral":33,"mixed":34,"critical":35},8,16,0,1,25,{"execution":38,"idea":39,"docs":41,"pricing":42},{"positive":35,"critical":35},{"positive":40,"critical":34},4,{"positive":35,"critical":34},{"positive":34,"critical":34},[44,34,45,34,45,44,44,34,45,34,45,34,34,45,34,44,45,44,45,34,45,34,45,34,34,34,45,45,34,45,34,35,44,44,34,45,34,34,45,44],5,3,"I built a single-file Python script that lets you run LLM prompts from the command line with templating, structured outputs, and the ability to chain prompts together.\n\nWhen I discovered Google's Dotprompt format (frontmatter + Handlebars templates), I realized it was perfect for something I'd been wanting: treating prompts as first-class programs you can pipe together Unix-style. Google uses Dotprompt in Firebase Genkit and I wanted something simpler - just run a .prompt file directly on the command line.\n\nHere's what it looks like:\n\n--- model: anthropic\u002Fclaude-sonnet-4-20250514 output:   for",{"problem":48,"audience":54,"pricing":55,"motivation":59,"time_to_build":54,"stack":63,"openness":68,"stage":69,"team_size":69},{"value":49,"source":50,"evidence":51},"Running LLM prompts from the shell with templating, structured JSON output and chaining","maker",[52],{"id":53},"post",null,{"value":56,"source":50,"evidence":57},"Uses user's own API keys for Anthropic, OpenAI, Google AI or OpenRouter",[58],{"id":53},{"value":60,"source":50,"evidence":61},"Wanted prompts as first-class programs piped together Unix-style, simpler than Dotprompt in Genkit",[62],{"id":53},[64],{"value":65,"source":50,"evidence":66},"Python",[67],{"id":53},"open_source","unknown",{"praise":71,"objections":88,"requests":95,"questions":117,"alternatives":133},[72,84],{"value":73,"source":74,"evidence":75},"Pipe-friendly, lightweight alternative to agent frameworks","commenter",[76,80],{"id":77,"by":78,"text":79},"46073308","Barathkanna","This is really clever. Dotprompt as a thin, pipe-friendly layer around LLMs feels way more ergonomic than spinning up a whole agent stack. The single-file + stdlib approach is a…",{"id":81,"by":82,"text":83},"46070483","cootsnuck","This is pretty cool. I like using snippets to run little scripts I have in the terminal (I use Alfred a lot on macOS). And right now I just manually do LLM requests in the…",{"value":85,"source":74,"evidence":86},"Single-file stdlib-only design",[87],{"id":77,"by":78,"text":79},[89],{"value":90,"source":50,"evidence":91},"Invalid LLM output passes silently down the chain",[92],{"id":93,"by":11,"text":94},"46074210","If the LLM returns invalid schema the next link in the chain will send that through since it defaults to string input if the JSON doesn't parse. Maybe I should make it error out…",[96,103,110],{"value":97,"source":74,"evidence":98},"Support for local LLMs via custom base URL (Ollama)",[99],{"id":100,"by":101,"text":102},"46070340","dymk","Can the base URL be overridden so I can point it at eg Ollama or any other OpenAI compatible endpoint? I’d love to use this with local LLMs, for the speed and privacy boost.",{"value":104,"source":74,"evidence":105},"Response caching for iterating on pipelines",[106],{"id":107,"by":108,"text":109},"46070843","__MatrixMan__","It would be cool if there were some cache (invalidated by hand, potentially distributed across many users) so we could get consistent results while iterating on the later stages…",{"value":111,"source":74,"evidence":112},"Shebang support in prompt files",[113],{"id":114,"by":115,"text":116},"46070427","cedws","Can it be made to be directly executable with a shebang line?",[118,122],{"value":119,"source":74,"evidence":120},"How robust is JSON schema enforcement when chaining steps",[121],{"id":77,"by":78,"text":79},{"value":123,"source":74,"evidence":124},"Why not use existing markdown files or simonw's llm tool",[125,129],{"id":126,"by":127,"text":128},"46070622","orliesaurus","Why this over md files I already make and can be read by any agent CLI ( Claude, Gemini, codex, etc)?",{"id":130,"by":131,"text":132},"46071638","benatkin","Perhaps instead of writing an llm abstraction layer, you could use a lightweight one, such as @simonw's llm.",[134,142,149],{"value":135,"source":74,"evidence":136},"Simon Willison's llm CLI",[137,138],{"id":130,"by":131,"text":132},{"id":139,"by":140,"text":141},"46070838","swah","Thats pretty good, now lets see simonw's one...",{"value":143,"source":74,"evidence":144},"Microsoft Prompty format",[145],{"id":146,"by":147,"text":148},"46071028","oddrationale","Interesting! Seems there is a very similar format by Microsoft called `.prompty`. Maybe I'll work on a PR to support either `.prompt` or `.prompty` files.…",{"value":150,"source":74,"evidence":151},"Google dotprompt Python library",[152],{"id":153,"by":154,"text":155},"46079569","threecheese","Looks like Google has packaged dotprompt into a Python library, might allow you to make the codebase leaner: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fdotprompt\u002Ftree\u002Fmain\u002Fpython\u002Fdotpromptz I…",{"comments":157,"answered":158,"key":159},17,9,[160,161,164],{"id":93,"text":94},{"id":162,"text":163},"46083765","I'm not sure. I think I need to use it more to see what the LLMs do with bad data. The design you're suggesting might be the answer though.",{"id":165,"text":166},"46083811","Will have a look at this. That could be the way to go. Thanks.",{"commenters":168,"max_depth":169,"maker_replies":157,"first_comment_mins":170,"lifespan_hours":171},26,6,83,126,[173,175,177,181,183,184,185,188,192,194,195,198,200,202,205,207,209,212,214,217,218,221,224,226,228,230,232,235,237,239,241,245,246,249,252,254,257,260,262,267,271,274,278,280,282,285,287,291,293],[77,34,44,174,78,34],"project\u002Fpositive\u002Fexecution",[93,34,34,176,11,35],"maker\u002Fneutral\u002Fexecution",[178,34,45,179,180,34],"46075115","project\u002Fneutral\u002Fexecution","anonym29",[162,34,34,182,11,35],"maker\u002Fneutral\u002Fnone",[153,35,45,179,154,34],[165,35,34,182,11,35],[81,186,44,187,82,34],2,"project\u002Fpositive\u002Fidea",[189,186,44,190,191,34],"46072177","project\u002Fpositive\u002Fdocs","PythonicNinja",[193,186,34,190,11,35],"46074241",[100,45,45,179,101,34],[196,45,45,179,197,34],"46070449","jedbrooke",[199,45,34,179,11,35],"46071125",[130,45,45,201,131,34],"project\u002Fneutral\u002Fidea",[203,45,34,204,11,35],"46074249","commenter\u002Fneutral\u002Fnone",[206,45,34,204,154,34],"46079347",[208,45,34,204,11,35],"46085856",[210,45,45,179,211,34],"46072269","khimaros",[213,45,34,179,11,35],"46085860",[215,40,44,187,216,34],"46071023","tomComb",[146,44,45,201,147,34],[219,44,34,220,11,35],"46071111","project\u002Fneutral\u002Fnone",[222,169,44,187,223,34],"46072520","gessha",[107,225,45,179,108,34],7,[227,225,34,179,11,35],"46071119",[229,225,45,179,108,34],"46075031",[231,225,34,179,11,35],"46083857",[233,225,45,179,234,34],"46071400","stephenlf",[236,225,45,179,101,34],"46074351",[238,225,34,204,108,34],"46075042",[240,225,34,179,11,35],"46092445",[242,32,34,243,244,34],"46074367","other\u002Fneutral\u002Fnone","meander_water",[114,158,45,179,115,34],[247,158,34,204,248,34],"46070568","_joel",[250,158,45,179,251,34],"46070882","vidarh",[253,158,34,179,11,35],"46071129",[255,158,45,179,256,34],"46073676","leobuskin",[258,158,34,259,11,35],"46092457","commenter\u002Fpositive\u002Fnone",[261,158,34,179,11,35],"46083861",[263,264,35,265,266,34],"46071612",10,"project\u002Fcritical\u002Fexecution","ltbarcly3",[268,269,44,270,234,34],"46071506",11,"project\u002Fpositive\u002Fnone",[272,273,44,187,234,34],"46071325",12,[275,276,34,243,277,34],"46072487",13,"journal",[279,276,34,220,11,35],"46074253",[126,281,45,201,127,34],14,[283,281,34,204,284,34],"46071190","garfij",[286,281,34,204,127,34],"46126506",[288,281,45,289,290,34],"46071610","project\u002Fneutral\u002Fpricing","jsdwarf",[292,281,34,187,11,35],"46074278",[139,18,44,270,140,34],[],[296,301,306,311,315,319],{"id":297,"name":298,"points":299,"category":300},"46093473","Boing",782,"games",{"id":302,"name":303,"points":304,"category":305},"46075882","banrays",509,"security_privacy",{"id":307,"name":308,"points":309,"category":310},"46139761","finfam",393,"finance_crypto",{"id":312,"name":313,"points":314,"category":20},"46135067","Fresh",187,{"id":316,"name":317,"points":318,"category":20},"46090619","Nano PDF",176,{"id":320,"name":321,"points":318,"category":310},"46130260","HCB Mobile",false,"v2",{"id":325,"name":5,"line":6,"ai":322,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":326,"top":18,"kw":327,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":328,"url":9,"mix":329,"praise":73,"objection":90,"sub":21},46069556,0.27,[24,25,26,27,28],"5030355030300305353030300033030155030035",[32,33,34,35],1794036686445]