0.0
The project is in a healthy, maintained state
Pair with Claude Code in your Rails console
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Claude Console

Pair with Claude Code in your Rails console. No quoting needed.

claude help me debug this user's deliverables
claude write a scope to find users with expired trials
claude why does User.find(42) have no campaigns

Claude runs Ruby code directly in your console session and sees the results — just like pair programming.

Installation

Add to your Gemfile:

gem "claude_console", group: :development

Requires Claude Code installed and authenticated on the machine.

How It Works

Open rails console and type claude followed by your request:

irb(main):001> claude find the user with email "foo@bar.com" and show their campaigns
Asking Claude...

Here's what I found:

>> Running:
   user = User.find_by(email: "foo@bar.com")

=> #<User id: 42, email: "foo@bar.com">

>> Running:
   pp user.campaigns.select(:id, :name, :status)

[#<Campaign id: 1, name: "Summer 2026", status: "active">,
 #<Campaign id: 2, name: "Fall Launch", status: "draft">]

Claude sees your console history for context, runs code in your session, and can iterate on results.

Configuration

# config/initializers/claude_console.rb

# Custom system prompt
ClaudeConsole.system_prompt = "You are a database expert..."

# Path to claude binary
ClaudeConsole.cli_path = "/usr/local/bin/claude"

# Additional env vars to clear (for auth isolation)
ClaudeConsole.clear_env_vars = ["MY_CUSTOM_API_KEY"]

How Auth Works

Claude Console shells out to claude -p. It clears env vars like ANTHROPIC_API_KEY and CLAUDE_CONFIG_DIR from the subprocess so Claude Code uses its own stored credentials — not keys from your Rails environment.

License

The gem is available as open source under the terms of the MIT License.