HomeTutorials › Tools: File & Shell
Tools: File & Shell

Editing Files

#050 0:14 Part of the Rysh video series

When the agent edits a file, you see the diff first -- every write waits for your yes.

Editing Files — 0:14 walkthrough

What you'll see

  1. Launch rysh; in shell mode create a small sample file.
  2. Double-Esc to prompt mode; ask the agent to change a line.
  3. Agent picks file_edit (exact-string replace), multi_edit (atomic hunks), file_write, or apply_patch (unified diff) -- each generates a diff and requires approval.
  4. Footer shows the diff preview; press y to approve (or Y approve-always, n reject, N reject-with-reason).

Commands shown

rysh
printf 'hello\\nworld\\n' > notes.txt
in notes.txt change the word world to rysh
y

Keys used

EnterEscape

Transcript

0:00When the agent edits a file, you see the diff first -- every write waits for your yes.

0:03Launch rysh and drop in a small file we can have the agent edit.

0:08In shell mode, create a quick README so there's something to change.

0:14Double-press Escape to enter prompt mode.

0:20Ask it to change a line. The agent uses file_edit for an exact-string replace, multi_edit for several atomic hunks, file_write to create files, or apply_patch for a unified diff. Each of these is approval-gated.

0:36The footer shows the action with a diff preview. Press y to approve, capital Y to approve always, n to reject, or capital N to reject with a reason.

0:45Nothing touches your files until you approve the diff.

Key takeaway
All file-writing tools are approval-gated and show a diff preview, so nothing changes on disk until you confirm.