RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Unofficial Claude Code SDK for Ruby — Now with MCP + Streaming Support

Just published a new Ruby gem claude_code — an unofficial SDK for working with Anthropic’s Claude Code via Ruby. It wraps the Claude CLI and supports:

  • 🧠 Basic and streaming prompts (via stdin)
  • 🔁 Multi-turn conversation management
  • 🧰 Tool execution (Read, Write, Bash, etc.)
  • 🌐 Plug-and-play with MCP servers (just pass a hash of names + URLs)
  • ☁️ Cloud support via AWS Bedrock & Google Vertex AI
  • 🧪 JSONL input for batched prompts, structured assistant output, and cost reporting
  • 🛠 CLI failure handling, custom working directories, and full error classes

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in