Project

tensaku

0.0
The project is in a healthy, maintained state
Tensaku lets you click text on a Rails page in development and write the change back to the ERB template, the locale YAML or the Markdown source, or leave notes on elements and areas that a coding agent reads with the exact file and line. Built on Herb through ReActionView. Development only.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 8.1, < 8.2
~> 0.11.2
>= 8.1, < 8.2
~> 0.6.1
>= 2.0
 Project Readme

Tensaku

Rails 8.1 License: MIT

Fix your Rails app in the browser.

Documentation · Installation · Safety and limits

Tensaku (添削, correcting a draft) lets you click text on a running Rails page and edit it. It writes the change back to the ERB template, the locale YAML or the Markdown file. For anything that isn't a text edit, leave a note on the page, and your coding agent reads it with the file and line of each element.

It needs Ruby 4.0 or later and Rails 8.1. It runs only in development, on Herb through ReActionView. Test and production keep rendering with Erubi and never load Tensaku, ReActionView or Herb.

Install it in a Rails app

# Gemfile
group :development do
  gem "tensaku"
end
bundle install

To connect a coding agent, also run bin/rails generate tensaku:install. This optional generator installs the skill, and adds bundle exec tensaku mcp, an MCP server the agent starts itself, to .mcp.json and to the config of Codex, Cursor, Gemini CLI or OpenCode. It prints every file it changes. You don't set up any JavaScript. The middleware injects one prebuilt script into HTML pages.

Start the server and open a page. A round button with a red flower sits in the bottom right corner. Press Alt+Shift+T to select an element and see the file and line it came from.

Edit text where you see it

Alt-click (Option-click) any text and press E, or choose Edit text in the menu. The editor shows the source, so in Hello <%= user.name %>! you edit Hello and ! and the Ruby stays a locked chip. Enter saves, Escape cancels, and a toast offers Undo.

Tensaku edits static template text, attributes such as alt and placeholder, t() translations in every locale, and Markdown blocks. Each save replaces only the bytes of the edited text, and refuses if the file changed since the page rendered. The page then updates in place, with no reload.

Leave notes for your agent

Alt+Shift-click (Option+Shift-click) an element, or in select mode click an element, select some text, or drag over an area, and choose Add note. Notes are kept in a SQLite database in your user data folder, outside your project. Your agent gets them through tensaku mcp and the skill, through the tensaku notes command, or from Markdown you copy from the page.

Ask your agent to do your Tensaku notes, and it works through the open ones. Ask it to watch your Tensaku notes, and it waits for them: each note you save reaches it as you write it.

The agent marks a note working, asks a question back, declines it, or resolves it with a reply. Each change shows on the note's pin. A green pin means the change is ready for you to check.

Use it from a phone

Tensaku answers only requests from your computer, with one exception: a device paired with Parcela and reached through Parcela's proxy. Parcela gives the server a secret in PARCELA_PROXY_SECRET, removes any Parcela-Device-Secret header a client sends, and sets it to that secret only on a paired device's request. Tensaku trusts a request from loopback that carries the matching secret. The page's Host must still be a local name or one in config.hosts, and anything that reads source or writes still needs the boot token Tensaku puts in the page. No other proxy is trusted.

Documentation

The documentation site is tensaku.lostcoords.com. Its pages are Markdown files in docs/app/views/pages/.

License

Tensaku is licensed under the MIT License.