Skip to content
CLI Tools
Skill

/rails

Use when working with the Rails CLI — commands, generators, database tasks, test subcommands, rake tasks, flags, and argument completion. Triggers on: "rails", "Ruby on Rails", "bin/rails", "rails new", "rails generate", "rails server", "rails console", "rails dbconsole", "rails

From plugin
carapace-bin
2k23 skills

Claude Code

$ npx -y skills add carapace-sh/carapace-bin --skill rails --agent claude-code

SKILL.md

rails.SKILL.md
name: rails
description: >
  Use when working with the Rails CLI — commands, generators, database tasks,
  test subcommands, rake tasks, flags, and argument completion. Triggers on:
  "rails", "Ruby on Rails", "bin/rails", "rails new", "rails generate",
  "rails server", "rails console", "rails dbconsole", "rails runner", "rails test",
  "rails routes", "rails destroy", "rails db", "rails credentials",
  "rails middleware", "rails notes", "rails dev:cache", "rails restart",
  "rails secret", "rails stats", "rails about", "rails boot",
  "rails initializers", "rails plugin", "rails tmp", "rails version",
  "rails devcontainer", "rails encrypted", "rails zeitwerk", "rails yarn",
  "rails scaffold", "rails model", "rails migration", "rails controller",
  "rails resource", "rails job", "rails mailer", "rails channel",
  "railsrc", ".railsrc", "config/database.yml".
user-invocable: true

Rails CLI In-Depth Reference

Complete reference for the Rails CLI surface — commands, generators, database tasks, rake tasks, flags, positional arguments, and shell completion targets. Built for creating a carapace completer.

Data Flow

bin/rails COMMAND [args] [options]
  ├── rails new          → AppGenerator (Thor)
  ├── rails generate     → GenerateCommand → Generator subclasses
  ├── rails server       → ServerCommand (Rack/Puma)
  ├── rails console      → ConsoleCommand (IRB)
  ├── rails dbconsole    → DbconsoleCommand (psql/mysql/sqlite3)
  ├── rails runner       → RunnerCommand (eval code)
  ├── rails test         → TestCommand → Minitest
  ├── rails routes       → RoutesCommand (router inspection)
  ├── rails db:          → Rake tasks (Active Record)
  ├── rails credentials  → CredentialsCommand (encrypted YAML)
  ├── rails encrypted    → EncryptedCommand (generic encrypted files)
  ├── rails notes        → NotesCommand (annotation grep)
  ├── rails query        → QueryCommand (Active Record REPL)
  └── rails <task>       → Rake fallback (Thor delegate)

Sub-Resources

Load the reference that matches your task. When in doubt, load multiple references.

| Keywords | Reference | |----------|----------| | rails new, AppGenerator, --database, --javascript, --css, --api, --minimal, --skip-*, --template, --rc, .railsrc, --dev, --edge, --main, --devcontainer, PluginGenerator | [references/rails-new.md](references/rails-new.md) | | rails generate, rails destroy, generator subcommands, model, scaffold, resource, controller, migration, job, mailer, channel, mailbox, task, helper, jbuilder, system_test, integration_test, generator, application_record, benchmark, scaffold_controller, --skip-routes, --parent, --timestamps, --api, --queue, --assets, --actions, field:type:index, --pretend, --force, --skip, orm hook, template_engine hook, test_framework hook | [references/generators.md](references/generators.md) | | rails server, rails console, rails runner, rails dbconsole, rails routes, middleware, initializers, about, stats, boot, dev:cache, restart, secret, version, encrypted, credentials, notes, query, devcontainer, --port, --binding, --sandbox, --environment, --database, --unused, --expanded, --controller, --grep, --enroll, --disenroll | [references/cli-commands.md](references/cli-commands.md) | | rails db:*, database rake tasks, migrate, schema, seed, rollback, create, drop, setup, reset, prepare, version, encryption, truncate, charset, collation, fixtures, test:db, multi-db, db:system:change, --to, VERSION, STEP, SCOPE, FIXTURES, FIXTURES_DIR | [references/database.md](references/database.md) | | rails test, test:system, test:all, test:functionals, test:units, test:generators, test:models, test:helpers, test:channels, test:controllers, test:mailers, test:integration, test:jobs, test:mailboxes, test:db, --name, --verbose, --seed, --warnings, --environment | [references/testing.md](references/testing.md) | | rails log:clear, tmp:*, time:zones, yarn:install, zeitwerk:check, action_mailbox:*, action_text:install, active_storage:*, app:template, railties:install:migrations, javascript:install | [references/rake-tasks.md](references/rake-tasks.md) | | config/application.rb, config/environment.rb, config/boot.rb, config.ru, config/database.yml, config/environments/*.rb, config/initializers/, config/routes.rb, config.load_defaults, config.time_zone, config.eager_load, config.cache_classes, config.enable_reloading, config.log_level, config.cache_store, config.session_store, config.autoload_paths, config.consider_all_requests_local, config.force_ssl, config.hosts, config.active_record.*, config.action_controller.*, config.action_mailer.*, config.active_storage.*, config.action_dispatch.*, config.assets.*, config.generators, config.x, before_configuration, before_initialize, after_initialize, to_prepare, before_eager_load, initialization queue, boot sequence, Rails::Application | [references/configuration.md](references/configuration.md) | | RAILS_ENV, RACK_ENV, RAILS_MASTER_KEY, SECRET_KEY_BASE, DATABASE_URL, BUNDLE_GEMFILE, RAILS_RELATIVE_URL_ROOT, RAILS_CACHE_ID, RAILS_APP_VERSION, RAILS_DEVELOPMENT_HOSTS, RAILS_MAX_THREADS, RAILS_MIN_THREADS, RAILS_SERVE_STATIC_FILES, RAILS_LOG_TO_STDOUT, WEB_CONCURRENCY, PORT, VERSION, STEP, SCOPE, VERBOSE, FIXTURES, FIXTURES_DIR, FIXTURES_PATH, LOGS, URL, INGEST_PASSWORD | [references/environment.md](references/environment.md) |

Quick Guide

  • **How do I complete `rails new` flags?** → [references/rails-new.md](references/rails-new.md)
  • **How do I complete `rails generate <thing>`?** → [references/generators.md](references/generators.md)
  • **What flags does `rails server` accept?** → [references/cli-commands.md](references/cli-commands.md)
  • **What are all the `db:*` subcommands?** → [references/database.md](references/database.md)
  • **How do I complete test paths and subcommands?** → [references/testing.md](references/testing.md)
  • **What `--environment` values are valid?** → The string `environment` — value can be any string, typically `development
Read more
@carapace-sh
Ships withcarapace-bin

Carapace-bin provides argument completion for multiple CLI commands (full list), and works across multiple POSIX and non-POSIX shells. Supported shells: Bash Cmd (experimental) Elvish Fish Nushell Oil Powershell Tcsh (experimental) Xonsh Zsh

Stars on GitHub

Momentum

stars in total
2.0k
Star history of carapace-sh/carapace-bin on GitHub, a chart by star-history.com

Other skills on carapace-bin.

brew

brew

Use when working with Homebrew (`brew`) — the package manager for macOS and Linux. Covers the command structure, formula and cask…

bubbletea

bubbletea

Use when working with Bubble Tea (charmbracelet/bubbletea) — the Elm Architecture TUI framework for Go. Covers the…

bun

bun

Use when working with the bun CLI — Bun's all-in-one JavaScript runtime and toolkit. Covers the CLI command reference (install,…

but

but

Use when working with the GitButler CLI (`but`) — virtual branches, stacked branches, workspace model, commit editing (rub,…

carapace

carapace

Use when working with carapace shell completion — integrating into CLIs, writing YAML specs, creating custom actions, building…

cargo

cargo

Use when working with the cargo CLI — Rust's package manager. Covers the manifest format (Cargo.toml), dependencies, features,…

More skills from other plugins.

cli-anything-adguardhome

cli-anything-adguardho…

Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI…

@hkuds@hkudsInstall Skill
find-skills

find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a…

skills7d40k
@vercel-labs-2@vercel-labs-2Install Skill
ohmyposh

ohmyposh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on…

@jandedobbeleer@jandedobbeleerInstall Skill

Questions about rails.

Which coding agents can use rails?
rails installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.