The project is in a healthy, maintained state
Generates Rails applications by composing independent, opinionated steps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

~> 1.3
 Project Readme

opinionated_rails

Generate a Rails 8 app by choosing from independent, opinionated options. The tool runs rails new, then layers on exactly the pieces you picked (database, tests, frontend, background jobs, authentication, CI, deployment and more) and checks that the result boots and passes its own RuboCop, Brakeman and bundler-audit.

Documentation: https://brolinr.github.io/opinionated_rails/

Quick start

gem install opinionated_rails        # needs Rails 8.1+ (gem install rails)

opinionated_rails new my_app         # answer the prompts; enter accepts a default

# or script it
opinionated_rails new my_app --database postgresql --javascript esbuild --yes
opinionated_rails new my_app --config answers.yml --yes

For React you also need yarn (esbuild, webpack) or bun. The tool checks before generating anything.

What it can do

Area Options
Database SQLite, PostgreSQL, MySQL
App type Full-stack, API-only
Tests Minitest, RSpec (FactoryBot or fixtures), VCR
Frontend Stimulus + Hotwire, or React with esbuild, bun or webpack; Tailwind CSS; ESLint 9
Jobs, cache, cable Solid Trifecta, or Redis + Sidekiq
Authentication Rails 8 built-in or Devise (full-stack apps)
Also Pagination (pagy or geared_pagination), staging environment, application services, dotenv or Rails credentials, mailers, GitHub Actions CI, Docker and Kamal deployment

Every choice has a flag or a config file key, and values are validated before anything is generated.

Documentation

The sources are in docs/. opinionated_rails list and opinionated_rails info STEP_ID show the steps in your terminal.

Development

bin/setup
bundle exec rspec                          # fast suite
bundle exec rubocop
RUN_INTEGRATION_SPECS=1 bundle exec rspec  # also generates real apps for every combo (slow, needs network)

See CONTRIBUTING.md, STYLE.md and the contributing guide.

License

Released under the MIT License.