runtimeanalyz.ing

← Runtime Analysis

Install ra and ask your first question

One line installs the binary and walks you through the rest, a question at a time, and nothing in your project changes. Ten minutes later you have a recording of your own app and a real answer about it.

Install

curl -fsSL https://www.runtimeanalyz.ing/install.sh | sh

The installer puts the free ra binary in ~/.local/bin and starts ra setup, which checks what ra needs on your machine and offers to fix each thing it finds missing:

PATH: ra runs the recorder gem's Ruby script at ~/.rbenv/shims/ra …   Add it to ~/.zshrc? [y/N] y
signed in: no                                                       Sign in now? [Y/n] y
  Open https://app.runtime-analyz.ing/device and enter WXYZ-1234 … Signed in as mark@… (free).
recorder gem: not installed                                        Run gem install runtime_analysis? [y/N] y
recording: none at tmp/runtime_analysis                            Run ra record now? [y/N] y
ra in a shell is ra 0.3.1 (free) and answers 5 tools.

Answer y to the steps you want and press Enter to skip one. Nothing changes without a yes.

Signing in opens your browser, where you sign in or sign up free with GitHub or Google. Your password never touches the terminal. At the end, ra asks once whether it may send a usage event, which names the tool you ran and whether it worked. Your code is never in it. What leaves your machine lists every field.

To see where you stand later, run ra doctor. It makes the same checks and prints one line each.

Record your tests

cd your_app
ra record

ra asks which command runs your tests, runs it with the recorder loaded, and writes the recording to tmp/runtime_analysis. Your Gemfile, lockfile and helpers stay as they were, and git status shows nothing new.

Give ra the command and it skips the question. Give it part of the suite and you get an answer sooner:

ra record -- bundle exec rspec spec/models
ra record -- bin/rails test test/models

Recording 145 of Redmine’s tests took three seconds, Rails boot included. What it found there runs the same commands on an app you can clone.

Ask

ra verify_mock spec                           # the stubs that differ from your real code
ra what_it_receives 'YourClass#your_method'   # the classes each argument was given
ra what_calls 'YourClass#your_method'         # every caller, with where and how often
ra tools                                      # everything you can ask, the Pro ones marked

With Minitest, pass test to verify_mock in place of spec.

The five free tools are verify_mock, what_calls, what_it_receives, who_actually_answered and where_nil_comes_from. Ask for a Pro tool and ra tells you what it would answer. Under a free answer, ra may add one line about what a Pro tool found in your recording, such as how many lines called a method on nil.

On a big recording the first answer takes seconds. After that, ra keeps the recording loaded in the background and answers the next question in milliseconds.

Connect your coding agent

Add one line to your agent’s MCP configuration, the same for every agent:

{ "mcpServers": { "ra": { "command": "ra", "args": ["mcp"] } } }

For Claude Code that is claude mcp add ra -- ra mcp, and ra setup offers to run it when it finds Claude Code on your machine.

Your agent now has the five free tools, sees the Pro ones by name, and gets their answers once you upgrade. Runtime Analysis makes no call to a language model. Your agent sees the answers it asks for, which contain class and method names.

You can also hand the whole install to your agent: tell it to set up ra and point it at /llms.txt. It runs the installer with RA_SETUP=0, then ra setup, and checks its work with ra doctor --json. If it asks a tool before you have signed in, the answer is one sentence, Sign in to use ra: run ra login, which the agent passes on to you.

Connect your editor

Your editor shows the classes each argument was given and what each call returned, as inline hints and on hover, and “go to type definition” opens the class of the value under the cursor. Any editor with a language server client can start ra lsp for Ruby files.

Neovim, 0.10 or later, with no plugin:

vim.api.nvim_create_autocmd("FileType", {
  pattern = "ruby",
  callback = function() vim.lsp.start({ name = "ra", cmd = { "ra", "lsp" } }) end,
})

Zed and Helix take a language server entry whose command is ra lsp. There is no VS Code extension yet; any extension that runs a custom language server command works. ra setup says which of these it found.

ra never holds your editor up. Before you have recorded, the first hover says to run ra record. Before you have signed in, it answers first and then says, once, to run ra login.

Pro

ra upgrade     # opens checkout, with your account filled in
ra activate    # once paid: fetches the Pro build, which the free ra then hands every command to

The licence is checked on your machine. ra doctor then says paid build ra 0.3.1 (pro), and every tool answers in the same terminal, editor and agent, with nothing else to configure.

Details

What was installed

Two pieces. The binary reads a recording and answers, and has no Ruby in it. The recorder is a gem, gem install runtime_analysis, installed once for the Ruby your project runs on. ra record loads it into one run of your tests by injection, which is why your Gemfile does not change. Everyone signs in, free or paid.

What ra record records

The methods defined under app and lib, at tier 4: call edges, argument classes, object ids and exception classes. What is written to disk lists each tier, and what recording costs has the measurements.

Tools that follow a returned object to the calls made on it, verify_mock among them, need tier 3 or above, and ra record records at tier 4. If you configure the recorder by hand, the default is tier 1, so set c.tier yourself. Configuring what gets recorded has every setting.

Recording in CI, or with your own settings

The steps above change nothing in your project. To record in CI, or to choose what is recorded, the gem is added to the project. The last step of ra setup offers to make those edits: the Gemfile, the test helper and the ignore file. It says what it changed and changes nothing if run again. The default answer is no, because injection already works.

If the gem install fails

The recorder is a C extension that compiles when the gem installs, so the machine needs a C compiler and make:

SystemCommand
Debian or Ubuntuapt-get install build-essential
Alpineapk add build-base
macOSxcode-select --install

It builds on Linux, with glibc or musl, and on macOS, for CRuby 3.2 and later. On Windows it needs WSL. If the extension is missing, ra record says so and says how to build it.

Switches

  • RA_SETUP=0 before the install line skips the walk-through.
  • ra doctor exits 1 if something is in the way, so a script can check on it.
  • RA_UPGRADE_HINTS=0 turns off the line under a free answer that says what a Pro tool found.
  • RA_SERVER=off keeps every answer local. Otherwise, an answer slower than two seconds starts ra serve in the background, which holds the recording and stops after an hour idle.