Railwyrm is a Ruby CLI that bootstraps Rails apps with an opinionated default stack and an interactive feature wizard.
Project page: docs/index.html (Tailwind CSS / GitHub Pages-ready)
- Deterministic Rails app generation
- Interactive wizard for auth/features
- Reproducible defaults for local development
See VISION.md for broader product direction.
Every generated app includes:
- PostgreSQL (
rails new --database=postgresql) - Tailwind CSS (
rails new --css=tailwind+./bin/rails tailwindcss:install) - RSpec (
gem "rspec-rails"+bin/rails generate rspec:install) - Dotenv (
gem "dotenv-rails"in development/test) - Ruby LSP (
gem "ruby-lsp", require: falsein development) - Brakeman (
gem "brakeman", require: falsein development/test) - RuboCop (
gem "rubocop"+gem "rubocop-rails"in development/test) - Bullet (
gem "bullet"in development + auto-configured inconfig/environments/development.rb) - GitHub Actions CI (
.github/workflows/ci.ymlrunning RSpec, RuboCop, and Brakeman) - Devise (
gem "devise"+ install + user generation by default) - Active Storage (
bin/rails active_storage:install) - ActionText (
bin/rails action_text:install)
Rails compatibility behavior:
- Railwyrm pins generated apps to Ruby
3.3.0by writing.ruby-versionandruby "3.3.0"in the generated Gemfile. - Because generated apps target Ruby
3.3.0, Railwyrm pins Rails to~> 8.0.3beforebundle install.
During railwyrm new, the wizard can configure:
- Devise user generation (on/off)
- Devise optional modules:
confirmablelockabletimeoutabletrackablemagic_link(viadevise-passwordless)passkeys(viadevise-webauthn)
Magic-link behavior:
- Installs
devise-passwordless - Adds passwordless sign-in routes and UI
- Enables
Devise.paranoid = true - Auto-enables
trackable - Configures development mail delivery to file output at
tmp/mails - Installs a plain-text magic-link template for copy/paste-friendly URLs in development
Passkeys behavior:
- Installs
devise-webauthn - Runs
bin/rails generate devise:webauthn:install --force - Adds
:passkey_authenticatableto the Devise model - Configures
config/initializers/webauthn.rbdefaults forrp_name(generated app name),rp_id, and localhost origins - Populates
.env.examplewithWEBAUTHN_RP_NAME,WEBAUTHN_RP_ID, andWEBAUTHN_ALLOWED_ORIGINS - Ensures WebAuthn JavaScript is loaded as an ES module
- Adds passkey sign-in button on Devise sign-in page
- Redirects first sign-in users (without passkeys) to passkey enrollment
- Runs migrations for the generated WebAuthn tables
Passkeys production checklist:
- Run the app under HTTPS in production.
- Set
WEBAUTHN_RP_IDto your real domain (for exampleapp.example.com). - Set
WEBAUTHN_ALLOWED_ORIGINSto your exact HTTPS origin list (for examplehttps://app.example.com).
Passkeys smoke test checklist (generated app):
- Sign in with email/password and verify you are redirected to the passkey enrollment page on first sign-in.
- Create a passkey and confirm the page no longer forces enrollment on next sign-in.
- Sign out and use "Sign in with passkey" from the sign-in page to confirm passwordless passkey authentication works.
CI behavior:
- Generates
.github/workflows/ci.ymlby default for new apps - Provides
railwyrm feature install ci --app /path/to/appfor existing apps - Workflow runs database prep, RSpec, RuboCop, and Brakeman on push/pull_request
- Generator normalizes default Bullet/Devise config formatting to keep RuboCop green in fresh apps
Quality feature behavior:
- Provides
railwyrm feature install quality --app /path/to/appfor existing apps - Automatically installs dependency
ci(workflow setup) when missing - Ensures
brakeman,rubocop,rubocop-rails, andbulletgems are present - Injects Bullet development config (
Bullet.enable, alerts, and Rails logger hooks)
cd /path/to/railwyrm
bundle install
bundle exec ruby exe/railwyrm newNon-interactive example:
bundle exec ruby exe/railwyrm new my_app --interactive=false --path /tmp --devise_magic_linkInstall features into an existing app:
bundle exec ruby exe/railwyrm feature list
bundle exec ruby exe/railwyrm feature status --app /path/to/existing_app
bundle exec ruby exe/railwyrm feature sync --app /path/to/existing_app
bundle exec ruby exe/railwyrm feature install magic_link --app /path/to/existing_app
bundle exec ruby exe/railwyrm feature install ci --app /path/to/existing_app
bundle exec ruby exe/railwyrm feature install quality --app /path/to/existing_appFeature state tracking:
- Railwyrm records installed features in
.railwyrm/features.ymlinside each generated app. feature installuses tracked state plus app detection to skip already-installed features safely.feature statusshowsinstalled,tracked_only, anddetected_onlyfeature sets for diagnostics.feature syncrebuilds.railwyrm/features.ymlfrom detected app state.
bundle exec ruby exe/railwyrm new [APP_NAME]
bundle exec ruby exe/railwyrm feature list
bundle exec ruby exe/railwyrm feature status --app /path/to/app
bundle exec ruby exe/railwyrm feature sync --app /path/to/app
bundle exec ruby exe/railwyrm feature install FEATURE [FEATURE ...] --app /path/to/app
bundle exec ruby exe/railwyrm serve
bundle exec ruby exe/railwyrm doctor
bundle exec ruby exe/railwyrm versionCommon flags:
--no-bannerhide mascot/banner--verbosestream command output--dry_runprint commands without executing--skip_devise_userskip Devise model generation--devise_confirmableenable Devise confirmable--devise_lockableenable Devise lockable--devise_timeoutableenable Devise timeoutable--devise_trackableenable Devise trackable--devise_magic_linkenable magic-link sign-in--devise_passkeysenable passkeys sign-in (WebAuthn)
Feature install options:
--apppath to the existing Rails app--devise_user_modelDevise model name (defaultUser)--dry_runshow commands without executing--verbosestream command output
Installable features:
confirmablelockabletimeoutabletrackablemagic_link(automatically installstrackable)passkeysciquality(automatically installsci)
Run tests:
bundle exec rspecexe/railwyrmCLI entrypointlib/railwyrm/cli.rbThor commandslib/railwyrm/generator.rbgeneration workflowlib/railwyrm/rails_blueprint.rbstack defaults and setup commandslib/railwyrm/templates/devise/{passkeys,passwordless}magic-link and passkey auth templatesAGENTS.mdCodex repo instructions