smithery.ai

ruby-cli

Build Ruby CLI tools with Thor and Zeitwerk. Use for new Ruby CLI gems, adding commands, refactoring, or 'Thor CLI', 'command-line tool in Ruby'.

First seen Mar 26, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,537 B
  • docs SUMMARY.md 315 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Ruby CLI Development

Build Ruby CLI tools using Thor for commands and Zeitwerk for autoloading.

Quick Navigation

  • Starting a new CLI gem from scratch? See [references/bootstrap.md](references/bootstrap.md)
  • Adding commands or subcommands? See [references/patterns.md](references/patterns.md)
  • Thor syntax reference? See [references/patterns.md](references/patterns.md)
  • Rich terminal UI with Gum? See [references/gum.md](references/gum.md)

Core Principles

  • Use compact class declarations: class GemName::Cli::Main < GemName::Cli::Base
  • Use extend self instead of module_function for utility modules
  • Keep the Base class lean - add helpers as patterns emerge

Output Styling

For basic output, use Thor's built-in say "message", :color.

For rich terminal UI (headers, tables, spinners, confirmations), use the Gum gem:

ui.header("Section Title")    # branded header with border
ui.success("Done!")           # green checkmark
ui.error("Failed")            # red X
ui.table(rows, columns: [...]) # formatted table
ui.spin("Working...") { ... } # spinner during work

See [references/gum.md](references/gum.md) for setup and full API.

Tips & Gotchas

  • Add # rubocop:disable Rails/Output to UI modules (stdout is intentional in CLIs)
  • Gum requires brew install gum on the host machine