Skip to content

FlorexLabs/docscribe-rubymine

Repository files navigation

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.4.0 (daemon mode requires >= 1.5.0).

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

Features

  • Fast daemon mode — persistent Ruby server via Unix socket JSON-RPC, eliminating CLI startup overhead on repeated operations
  • 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 — hide comments by default
  • .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 with Bundler
  • docscribe gem >= 1.4.0

Version compatibility

Mode docscribe version Ruby version
Daemon (Unix socket RPC) >= 1.5.0 >= 3.0
CLI fallback >= 1.4.0 >= 2.7

The plugin prefers daemon mode for better performance. If docscribe < 1.5.0 or the Ruby SDK is unavailable, it automatically falls back to spawning the CLI directly.

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
Hide comments by default Auto-fold YARD comment blocks on file open Off

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 (gem + CLI) — GitHub

The plugin runs a persistent Ruby daemon (Docscribe::Server) over a Unix domain socket using JSON-RPC 2.0 for all check/fix operations. If the daemon is unavailable, it falls back to spawning the docscribe CLI directly via GeneralCommandLine/CapturingProcessHandler. Output is parsed from the RuboCop-compatible JSON format for inline diagnostics.

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

Languages