DocScribe logoDocScribe
v1.6.2 View on GitHub
DocScribe 1.6.2 - gem plus IDE plugins

YARD docs from Ruby AST

Auto-generate inline YARD documentation for Ruby by analyzing code AST. Supports RBS and Sorbet type signatures.

gem install docscribe

One daemon per project serves both IDE plugins over a Unix socket. Falls back to CLI.

plain method, String return

real gem output - 1.6.2

See CLI quickstart

Ecosystem: gem and editors

Three ways in. Gem for CI, extensions for the editor. Same engine underneath.

01
DocScribe gem 1.6.2
Ruby gem - CLI - RBS and Sorbet aware

YARD docs from AST. Safe fix with -a, full rebuild with -A. Needs Ruby >= 2.7.

gem install docscribe
rubygems.org/gems/docscribewhat you get: versioned gem tarball v1.6.2
github.com/unurgunite/docscribewhat you get: source plus changelog v1.6.2
02
VS Code 0.1.3
Extension - diagnostics on open and save

Missing docs underlined on open and save. One-click fix, RBS types, whole-project check, Cmd+Shift+D chords.

ext install unurgunite.docscribe-vscode
Marketplace pagewhat you get: one-click install v0.1.3
Extension sourcewhat you get: chords plus diagnostics v0.1.3
03
RubyMine plugin 32349
Marketplace 32349 - RubyMine 2026.1 plus

Talks to the daemon over a Unix socket: annotations plus quick-fixes. CLI when the daemon is off.

Settings - Plugins - DocScribe
JetBrains Marketplace 32349what you get: signed plugin zip b32349
Plugin sourcewhat you get: socket client code b32349

Feature set

Six behaviors that keep docs next to code.

01

No reprint

Skips files that already carry full docs. Reruns stay clean.

Try safe fix
02

Inline-first

Writes YARD above the method, never into side files.

Try before-after
03

RBS and Sorbet

Reads sig blocks and RBS to type params.

Try typed params
04

Rescue-aware

Turns rescue and raise into @raise tags.

Try rescue preset
05

Visibility

Keeps private and protected markers in output.

Try private scope
06

Daemon plus thin client

One watcher serves VS Code and RubyMine.

Try socket

CLI quickstart

Three commands, in order. Paste and run.

01Check a folder
terminal - check
$docscribe lib

$? 1 here means missing docs, fix with step 02

02Safe fix in place
terminal - safe fix
$docscribe -a lib

$? 0 means clean, commit the diff

03Sync inferred types, file-scope
terminal - type sync
$docscribe update_types lib

$? 0 means synced, 2 means read the errors

Reading the terminal
$Type this command, prompt and command share one line
$?Exit status of the last run, table below maps each code
$?MeaningNext action
0OK, docs completeCommit the diff
1Check found missing docsRun with -a flag
2Had errorsRead output, fix input

Designed, not grown

CLI parses with the parser gem (Prism on Ruby 3.4+), collects methods, then infers types through RBS, Sorbet, and plugin signatures before rewriting the file, safe or aggressive. A daemon keeps parsed files behind a Unix-socket JSON-RPC with a 1000-entry LRU cache, so editor checks return instantly.

CLI Entry point. Flags, file list, exit codes 0/1/2.
DocScribe system architecture diagram
System architecture: CLI, daemon, and thin clients.

One watcher parses, thin IDE clients ask over socket.

architecture.mmd source

DocScribe dataflow diagram
Dataflow: parse, collect, infer, rewrite.

AST in, typed YARD out, safe or aggressive.

dataflow.mmd source

DocScribe plugin and gem diagram
Plugin and gem: providers plug into the chain.

RBS plus Sorbet plus custom providers.

plugin-gem.mmd source

diagram paper stays light in dark mode

Daemon for IDEs

Five JSON-RPC methods. Pick one to see its payload.

MethodUse
checkSingle file check
fixApply missing tags
check_batchWorkspace run
update_typesFile-scoped type sync, needs 1.6.2
pingHealth probe
Thin client
docscribe-client --check lib/user.rb

RubyMine 2026.1 plus uses annotator plus intention over this socket. Falls back to CLI when daemon is off.

socket ms 3

Compatibility strip

Old gems lack new daemon calls. Match the client to the gem first.

1.6.2

File-scoped type sync

Per-file update_types flag lands here.

you get: per-file sync, you miss: nothing current

1.5.2

Batch check

check_batch runs whole workspace at once.

you get: batch runs, you miss: file-scoped sync

1.5.1

CLI plus daemon start

Daemon ships, use docscribe lib for plain runs.

you get: daemon checks, you miss: batch plus sync

System architecture
DocScribe system architecture diagram

System architecture: CLI, daemon, and thin clients.

Internal API docs. Class and method reference for the gem, separate from this page.

unurgunite.github.io/docscribe_docs