Project

railbow

0.0
The project is in a healthy, maintained state
Railbow makes Rails database migrations beautiful with colorful output, emojis, and readable millisecond timing
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 7.2, < 8.2
>= 7.2, < 8.2
 Project Readme

Railbow

Gem Version CI License: MIT

Make your Rails CLI output beautiful. Railbow enhances migrations, routes, stats, notes, and more with colorful, emoji-rich, information-dense formatting.

Features

  • Migrations - colorful db:migrate output with readable millisecond timing
  • Migration Status - rich db:migrate:status with git authors, calendar view, table detection, landing dates, and time filtering
  • Routes - color-coded HTTP verbs and highlighted parameters in rails routes
  • Stats - beautiful rails stats tables
  • Notes - rails notes with git blame, author colors, date filtering, and sorting
  • About - polished rails about output
  • Git Integration - authors, diffs, branch origin, landing dates, uncommitted file indicators
  • Calendar View - month separators and week tick markers for migration timelines
  • Ghost Recovery - uses the mighost gem (optional) to recover names, authors, and branch badges for NO FILE migrations
  • Smart Defaults - auto-disables in CI, piped output, NO_COLOR, and LLM agents

Installation

Option A: Add to your Gemfile (recommended)

gem "railbow", group: :development
bundle install

Option B: Use the CLI wrapper (no Gemfile changes)

gem install railbow
railbow rake db:migrate:status
railbow rails routes

The CLI creates a temporary wrapper so Railbow loads automatically without modifying your project's Gemfile.

Usage

Railbow works automatically once installed. Every example below works with both rails and rake commands.

rails db:migrate

Before:

==  CreateProducts: migrating =================================================
-- create_table(:products)
   -> 0.0028s
==  CreateProducts: migrated (0.0028s) ========================================

After:

πŸš€ CreateProducts: migrating...
  βœ“ create_table(:products) β†’ 2.8ms
βœ… CreateProducts: migrated (2.8ms total)

rails db:migrate:status

This is Railbow's flagship feature. The plain Rails output:

Status   Migration ID    Migration Name
--------------------------------------------------
up       20260202145343  Add weight field to animals
up       20260203134528  Create vaccination records
up       20260210183902  Create pet tags
up       20260303120000  Add breed restrictions to adoption policies
up       20260313132325  Create veterinary appointments

becomes a rich, information-dense dashboard (with default config):

         Feb 2026   W06
 ↑↑    β”‚ 20260202145343 β”‚ 2026-02-02 14:53:43 β”‚ Add weight field to animals          ● animals
 ↑↑    β”‚ 20260203134528 β”‚ 2026-02-03 13:45:28 β”‚ Create vaccination records           ● vaccination_records
 ↑↑    β”‚ 20260210183902 β”‚ 2026-02-10 18:39:02 β”‚ Create pet tags              β€» Mar 04  ● pet_tags
───────┼────────────────┼─────────────────────┼──────────────────────────────
         Mar 2026   W10
 ↑↑    β”‚ 20260303120000 β”‚ 2026-03-03 12:00:00 β”‚ Add breed restrictions to…   β€» Mar 13  ● adoption_policies
 ↑↑    β”‚ 20260313132325 β”‚ 2026-03-13 13:23:25 β”‚ Create veterinary appointm…  βŽ‡ PS-142  ● veterinary_appointments

Out of the box you get:

  • Calendar separators - month + ISO week headers to orient you in time
  • Status aliases - ↑↑ / ↓↓ instead of up / down (customizable)
  • Created At - timestamp parsed from the migration ID
  • Landing dates - β€» Mar 04 badge when a migration was merged to main after its creation
  • Branch badges - βŽ‡ PS-142 showing the source branch/ticket
  • Affected tables - color-coded table names extracted from migration files
  • Time filtering - only the last 70 days shown by default (since: 70d)
  • Your migrations highlighted - rows authored by you are visually distinct

If the mighost gem is installed (gem "mighost", group: [:development, :test]), migrations whose files were deleted (e.g. after switching branches) show up with a πŸ‘» status and their recovered name and origin branch instead of a bare ********** NO FILE ********** row - Railbow talks to it through the stable Mighost::API.

rails db:migrate:down

βͺ CreateProducts: reverting...
  βœ“ drop_table(:products) β†’ 1.2ms
βœ… CreateProducts: reverted (1.2ms total)

rails routes

HTTP verbs are color-coded (GET=green, POST=yellow, PATCH/PUT=cyan, DELETE=red), route parameters (:id, *splat) are highlighted, and controller#action pairs stand out.

rails stats

Code statistics rendered as a colorful table with highlighted totals and code-to-test ratio.

rails notes

Annotations enriched with git blame data - author names, commit dates, and color-coded tags (TODO=yellow, FIXME=red, OPTIMIZE=cyan, HACK=red, NOTE=green).

Configuration

Railbow works with zero configuration, but everything is customizable.

Config files

Config is loaded in layers (each overrides the previous):

  1. Built-in defaults
  2. Global: ~/.config/railbow/config.yml
  3. Project: .railbow.yml (commit to git)
  4. Local: .railbow.local.yml (gitignored, personal overrides)

Generate a config interactively:

railbow init
# or, within a Rails project:
rake railbow:init

Example .railbow.yml

since: 70d
date: rel
git: "author:me,diff,mask:auto"
view: "calendar,tables"
calendar: wticks

compact: "maxw:120"

aliases:
  columns:
    Status: Live
  values:
    Status:
      up: "↑↑"
      down: "↓↓"

Environment variables

Every option can also be set via RBW_* environment variables, which override config files:

Variable Example Description
RBW_PLAIN 1 Disable all formatting
RBW_SINCE 2mo, 70d, 1y, all Filter migrations by time period
RBW_DATE full, rel, short, custom(%b %d) Date display format
RBW_GIT author:me,diff,mask:auto Git integration options
RBW_VIEW calendar,tables Enable calendar view and table detection
RBW_CALENDAR wticks Show week tick markers
RBW_COMPACT oneline,dense,noheader,maxw:80 Compact display options
RBW_VERB GET,POST Filter routes by HTTP method
RBW_SORT file, date Sort order for notes
RBW_HELP 1 Show help messages

Quick examples

# Last 2 months, calendar view
RBW_SINCE=2mo rake db:migrate:status

# Relative dates, highlight your migrations
RBW_DATE=rel RBW_GIT=author:me rake db:migrate:status

# Full git context with table detection
RBW_GIT=author:all,diff RBW_VIEW=tables rake db:migrate:status

# Only GET routes
RBW_VERB=GET rails routes

# Notes sorted by commit date
RBW_SORT=date rails notes

How It Works

Railbow integrates through a Rails Railtie - it prepends formatter modules onto existing Rails classes without modifying your code:

  • ActiveRecord::Migration - migration output
  • ActiveRecord::Tasks::DatabaseTasks - migration status
  • ActionDispatch::Routing::ConsoleFormatter::Sheet - routes
  • Rails::Info - about
  • Rails::SourceAnnotationExtractor - notes

Formatting auto-disables when:

  • RBW_PLAIN=1 or NO_COLOR is set
  • Running in CI (CI env var)
  • Output is piped or redirected (non-TTY)
  • Running inside an LLM agent (CLAUDECODE env var)

Requirements

  • Ruby >= 3.1.0
  • Rails >= 7.2 (including 8.x)

Development

bin/setup          # Install dependencies
bundle exec rake   # Run tests + linting (RSpec + Standard)
bin/console        # Interactive prompt

Contributing

Bug reports and pull requests are welcome at github.com/amberpixels/railbow.

License

MIT License. See LICENSE.txt.