Skip to content

FlorexLabs/docscribe-rubymine

DocScribe Logo

DocScribe for RubyMine

JetBrains Marketplace Downloads CI License RubyMine Ruby

DocScribe is a RubyMine plugin that auto-generates inline YARD documentation for Ruby methods using docscribe — a Ruby gem that analyzes AST and suggests YARD-compatible documentation. Compatible with docscribe >= 1.5.0.

Also, available for VS Code on the VS Code Marketplace.

Features

  • Inline diagnostics — undocumented methods highlighted in the editor on file open and save
  • Quick-fix intention — lightbulb action to generate YARD documentation with one click
  • RBS type inference — uses RBS signatures for accurate @param and @return types (when gem "rbs" is in your Gemfile)
  • Workspace-wide check — scan all Ruby files in the project
  • Flexible strategies — safe (document missing methods only) and aggressive (replace existing docs, preserve manual descriptions)
  • Update types from RBS — refresh YARD docs from RBS signatures
  • Collapsible YARD docs — fold all YARD comment blocks automatically on file open (configurable in settings)
  • Configurable — bundle exec, custom command path, run on save, RBS toggle, omit boilerplate, hide comments
  • .rake support — diagnostics and actions work on Rake files
  • JSON output — uses docscribe --format json for reliable diagnostics parsing

Requirements

  • RubyMine 2026.1+ (also works in IntelliJ IDEA with Ruby plugin)
  • Ruby (>= 3.0) with Bundler
  • docscribe gem >= 1.5.0
gem install docscribe

Or add to your Gemfile:

gem "docscribe", group: :development

For RBS type inference:

gem "rbs", group: :development

Installation

From JetBrains Marketplace

Install directly from the IDE: Settings -> Plugins -> Marketplace -> search "DocScribe".

Or download from the JetBrains Marketplace.

From disk

Download the latest release from GitHub Releases and install via Settings -> Plugins -> ⚙ -> Install Plugin from Disk.

Usage

Actions

Action Shortcut Description
DocScribe -> Check Current File Ctrl+Shift+D then C Analyze the active Ruby file for undocumented methods
DocScribe -> Check Entire Workspace Ctrl+Shift+D then W Scan all Ruby files in the project
DocScribe -> Apply Safe Fixes Ctrl+Shift+D then S Add docs to undocumented methods only
DocScribe -> Apply Aggressive Fixes Ctrl+Shift+D then A Replace all existing YARD docs
DocScribe -> Update Types from RBS Refresh YARD docs from RBS signatures

All actions are available in the editor right-click menu under the DocScribe group.

Diagnostics

Open a Ruby file — undocumented methods are underlined with a warning. Hover to see what's missing. Diagnostics update automatically on file save and open.

Quick-Fix

Click the lightbulb or press Alt+Enter on an annotated diagnostic and select "Apply docscribe fix" to auto-generate documentation for that method.

Settings

Navigate to Settings -> Tools -> DocScribe:

Setting Description Default
Command path Path to the docscribe executable docscribe
Use bundle exec Run via bundle exec Off
Use RBS type signatures Enable RBS-based type inference Off
Omit boilerplate text Skip boilerplate in generated docs On
Hide comments by default Auto-fold YARD comment blocks on file open Off
Run on save Automatically check file diagnostics on save On

Development

# Build the plugin
./gradlew buildPlugin

# Run in development IDE
./gradlew runIde

# Run tests
./gradlew test

# Check formatting and static analysis
./gradlew spotlessCheck detekt

# Verify compatibility
./gradlew verifyPlugin

Output: build/distributions/docscribe-rubymine-*.zip

Architecture

  • docscribe-rubymine — IntelliJ Platform plugin (Kotlin)
  • docscribe — Ruby gem (CLI) — GitHub

The plugin wraps the docscribe CLI via GeneralCommandLine/CapturingProcessHandler and parses its JSON (RuboCop-compatible) output for inline diagnostics. Fixes are applied by running docscribe with -a (safe) or -A (aggressive) flags.

License

MIT

About

Autogenerate YARD documentation for Ruby code with Docscribe, right from RubyMine

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors