Find out where
exported notes go.

Use REA to inspect a small app, follow its Export notes button and check one detail yourself.

A supplied example · Node.js and npm · Your coding agent

1. Connect your agent to REA

Use a coding agent such as Claude Code, Codex or Cursor. You’ll need Node.js and npm; the setup guide lists supported versions.

Your coding agent

Install REA and connect it to this coding agent using npx rea-agents@latest setup. Show me the setup plan for approval, then verify the installation.

Or run this command in your terminal:

npx rea-agents@latest setup

Review the plan, approve the setup, then restart your agent. Already connected? Continue below.

2. Ask where the CSV is written

The example is a six-file Electron app with an Export notes button. Your agent can inspect its code without installing or launching Electron.

Your coding agent

Download https://rea.tools/examples/notes-example.zip into a new example folder and unpack it. Use REA to find what happens when I click Export notes. Show where notes.csv is written, which fields it contains, and the relevant files and lines.

Your agent downloads the files and gives the unpacked folder to REA for inspection.

Download example ZIP

If your agent can’t download files, unzip this archive yourself. Give it the path to the notes-example folder and the same export question.

3. Follow the answer back to the code

Look for a short explanation with file and line references:

The button sends a notes:export message. The main process formats the notes as CSV and writes notes.csv in the user’s Downloads folder. The columns are id and title.

From the button to the file writer

  1. Page · renderer.jsExport notesCalls notes.exportCsv().
  2. Bridge · preload.jsnotes:exportSends a named message to the main process.
  3. Handler · main.jsWrite notes.csvCalls the formatter in csv.js and writes the file.
REA’s static analysis pairs the message with its handler. The destination is read from code.
main.js · lines 8–12Source
ipcMain.handle("notes:export", () => {
  const destination = path.join(app.getPath("downloads"), "notes.csv");
  writeFileSync(destination, toCsv(notes), "utf8");
  return destination;
});

The file path, formatter and write call are together in this handler. Ask your agent to show these lines if its answer leaves them out.

See the full code trace and recorded REA result.

4. Check a prediction

A comma separates CSV columns. What happens when a note title itself contains a comma or quotation marks?

Your coding agent

Predict the CSV for a note with id 1 and title Hello, "REA". Then run the example’s toCsv formatter with Node.js to check it. Show the prediction and actual output.

Expected formatter output
id,title
1,"Hello, ""REA"""

The title stays in one quoted field; each quotation mark is doubled. This checks the formatter directly with Node.js.

Run the check yourself

Open a terminal in the unpacked notes-example folder:

Node.js · CSV formatter
node <<'JS'
const { toCsv } = require('./csv.js');
process.stdout.write(toCsv([{ id: 1, title: 'Hello, "REA"' }]));
JS

This command uses a shell with here-document support, such as Bash or Zsh. Your agent can run the same JavaScript in your platform’s shell.

5. Ask another question

Try a follow-up in the same conversation:

What happens if the file can’t be written? Follow the error back to the page.

Or give your agent an app of your own and ask about one button, file or behavior.

Top