Tensaku
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"
endbundle installTo 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/.
- Install Tensaku and see connect a coding agent.
- Read what can be edited and how a save works.
- Leave notes, and see how agents read them.
- Look up the configuration options and the attributes the overlay reads.
- Read safety and limits before you use it on a real app.
- Contribute or read the changelog.
License
Tensaku is licensed under the MIT License.