Skip to main content

Ralph Loop Harness: iterative Claude runner + stream-json renderer

Project description

claude-ralph-harness

Ralph Loop Harness: iterative Claude runner + stream-json renderer.

Two modes:

  • render - Reads JSONL from stdin and renders a human-friendly terminal view of Claude Code's stream-json output
  • loop - Drives Claude iteratively until a completion promise is detected

Stdlib only, no external dependencies.

Install

# from PyPI
uvx claude-ralph-harness

# or install globally
uv tool install claude-ralph-harness

Usage

Render mode

Pipe Claude Code's stream-json output for a readable terminal view:

claude -p --output-format stream-json --verbose "your prompt" | claude-ralph-harness render

Options:

--show-thinking     Display thinking block content
--no-color          Disable ANSI color codes
--verbose           Show raw JSON for unrecognized events
--show-tool-output  Show full tool result content

If stdin is piped and no subcommand is given, render mode is the default:

claude -p --output-format stream-json --verbose "prompt" | claude-ralph-harness

Loop mode

Run Claude iteratively until it outputs a <promise>SKILL COMPLETE</promise> tag (or a custom phrase):

claude-ralph-harness loop --prompt PROMPT.md --max-iterations 50

Options:

--prompt FILE              Path to the prompt markdown file (required)
--completion-phrase TEXT    Phrase inside <promise> tags that signals completion
                           (default: SKILL COMPLETE)
--max-iterations N         Maximum number of iterations (default: 50)
--working-dir DIR          Working directory for claude subprocess (default: .)
--show-thinking            Display thinking block content
--verbose                  Show raw JSON for unrecognized events

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_ralph_harness-0.1.0.tar.gz (32.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_ralph_harness-0.1.0-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file claude_ralph_harness-0.1.0.tar.gz.

File metadata

  • Download URL: claude_ralph_harness-0.1.0.tar.gz
  • Upload date:
  • Size: 32.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for claude_ralph_harness-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66c5e3cd0b4b3351b85ae5c9e5e9eae9b7ad7d7e76d56592137e72c79f75bc9b
MD5 b3be889229e463c66a504fbe31959b50
BLAKE2b-256 7e53a67867832ae62865e778179a43b80c3577079763b0c1180c6cc6631c39a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_ralph_harness-0.1.0.tar.gz:

Publisher: publish.yml on voidfiles/claude-ralph-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file claude_ralph_harness-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_ralph_harness-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2806edfe19fd017291e7c302fd12464bbc8811d82aadb4f84b9e8ec3888c872d
MD5 0b146953761ab6a1d78ed064aa6bbef8
BLAKE2b-256 9cf1066c3504d04846a21a82a78a005c585ed1b10e402372c8d2550fe4b94d89

See more details on using hashes here.

Provenance

The following attestation bundles were made for claude_ralph_harness-0.1.0-py3-none-any.whl:

Publisher: publish.yml on voidfiles/claude-ralph-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page