{"id":50999880,"url":"https://github.com/cablehead/ralph.nu","last_synced_at":"2026-06-20T13:30:49.485Z","repository":{"id":345150285,"uuid":"1184685295","full_name":"cablehead/ralph.nu","owner":"cablehead","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-17T21:54:20.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T21:31:43.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nushell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cablehead.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-17T20:41:34.000Z","updated_at":"2026-03-18T09:17:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cablehead/ralph.nu","commit_stats":null,"previous_names":["cablehead/ralph.nu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cablehead/ralph.nu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fralph.nu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fralph.nu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fralph.nu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fralph.nu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cablehead","download_url":"https://codeload.github.com/cablehead/ralph.nu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cablehead%2Fralph.nu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34572423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-20T13:30:48.871Z","updated_at":"2026-06-20T13:30:49.476Z","avatar_url":"https://github.com/cablehead.png","language":"Nushell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ralph\n\nStream-driven iterative refinement loop for [gpt2099](https://github.com/cablehead/gpt2099.nu).\n\nRalph follows the [cross.stream](https://github.com/cablehead/xs) event stream reactively. When an\nassistant response arrives, a judge closure fires. If the judge returns feedback, ralph appends the\nnext turn and triggers another call -- the response arrives on the same stream, triggering the judge\nagain. No polling, no blocking waits.\n\n## Prerequisites\n\nA working `gpt -p milli` setup. See [gpt2099 getting started](https://github.com/cablehead/gpt2099.nu/blob/main/docs/getting-started.md).\n\n## Usage\n\n```nushell\nuse xs.nu *\noverlay use -pr /path/to/gpt2099.nu/gpt\nuse ralph.nu\n```\n\n### Single call (no loop)\n\n```nushell\n\"What is 2+2?\" | ralph -p milli\n```\n\n### With a judge closure\n\nThe judge receives the response text. Return null to stop, or a string to continue with.\n\n```nushell\n\"Write a haiku about rust\" | ralph -p milli -n 5 --judge {|response|\n  if \"borrow\" in ($response | str downcase) { null } else { \"Include the borrow checker\" }\n}\n```\n\n### LLM-as-judge\n\nUse `gpt` inside the judge -- it streams to the terminal and returns content on the pipeline:\n\n```nushell\n\"Write a haiku about the ocean\" | ralph -p milli -n 3 --judge {|response|\n  let verdict = $\"Rate this haiku. Reply ONLY DONE if evocative, or give a brief suggestion.\n\n($response)\" | gpt -p milli | where type == \"text\" | get text | str join\n  if \"DONE\" in ($verdict | str upcase) { null } else { $verdict }\n}\n```\n\n## Options\n\n- `-p, --provider-ptr` -- provider alias (e.g. `milli`, `kilo`)\n- `-j, --judge` -- judge closure: `{|response| null | string}`\n- `-n, --max` -- max iterations (default: 5)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fralph.nu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcablehead%2Fralph.nu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcablehead%2Fralph.nu/lists"}