Work safely on a real folder with a portal and AI edits
By the end of this walkthrough you will have pointed Undra at a real folder on your computer, asked an AI chat to make a change that spans several files, watched the safe edits land while a deletion politely waited for your yes, undone the whole batch in one click, and pulled a deleted file back out of the trash. The point is not the steps. The point is the feeling you walk away with: letting AI touch your real files is safe because anything it does, you can see and reverse.
That confidence is the whole reason portals exist. Most people keep AI at arm’s length from their actual work because a bad edit feels permanent. Here it is not. Once you have undone a run and recovered a file by hand, the fear drops away and you start handing the AI bigger jobs.
Desktop only
Folder portals live in the Undra desktop app. They are not part of the web demo, so do this one on your own machine.
Pick a folder you would be nervous about
Use a real folder, not an empty test one. A project directory, a pile of loose notes, a messy downloads folder: something where a wrong edit would actually annoy you. That nervousness is the thing this walkthrough is meant to dissolve, and it only dissolves if the stakes are real.
If you want a copy you can throw away first, duplicate the folder in your file manager and aim the portal at the copy. There is no shame in training wheels for the first run.
Mount it as a portal
Bring the folder into Undra as a portal. Nothing is copied and nothing moves. The portal is a live, two-way link to the folder where it already sits on disk, so editing through Undra edits the real file, and changing the file outside Undra shows up inside. The exact ways to mount it, and the permission prompt that confirms the path first, are in Folder portals.
Why this matters before you go further: the portal is also a fence. Once the folder is mounted, the AI you talk to inside it can reach those files and nothing else. Not the rest of your computer, not the rest of your workspace. That boundary is automatic, so you are never trusting a prompt to stay in its lane.
Scope an AI chat to the portal
Open an AI chat inside the portal folder. Now the AI reads from and proposes changes to that folder, and only that folder. This is the part that makes a portal different from pasting code into a generic chatbot: the AI is grounded in your real files, and it is boxed into the one place you pointed it.
If you have not connected an AI provider yet, do that first in Setting up AI. The propose, review, apply pattern you are about to lean on is the same one every agent uses, explained in Agents.
Decide how much to approve up front
By default, safe edits apply on their own and only deletions wait for you. If you would rather sign off on every single change instead, there is a setting for that. Folder portals shows where it lives and exactly what it changes.
Ask for a change that touches several files
Give it a job big enough to be interesting. Some honest examples:
- “Rename every
config.oldin here toconfig.bakand update any file that mentions the old name.” - “Sort these loose files into folders by year and delete the empty
tempfolder when you are done.” - “Add a one-line header comment to each script and remove the dead
scratch.txt.”
Notice that each one mixes safe edits (create, edit, rename, move) with at least one deletion. That mix is deliberate. It is what lets you see the two speeds of the safety model in a single run.
The AI does not start rewriting. It comes back with a proposal that lists every change it wants to make, file by file. Read it. This preview is the moment you are still fully in control, and it is the habit worth building: look before you let it go.
Watch the two speeds
When you let the proposal proceed, two things happen, and the difference between them is the whole lesson:
- The safe changes apply on their own. Creating, editing, renaming, and moving are all reversible, so by default they go through right away. Anything that gets overwritten is backed up first, before the new version lands.
- The deletion stops and asks. Removing a file always waits for your explicit yes, every time, even a single one. The riskiest action is the one that never happens silently.
That split is the design in one sentence: move fast on what you can undo, slow down on what you cannot easily reconstruct. The exact backup behavior and where deleted files go is documented in Folder portals.
Undo the entire run
Now do the thing that makes all of this real. Undo the run, the whole batch of changes, in one click. The renames, the edits, the move, all of it rolls back together. You do not unpick changes one at a time, and you do not have to remember what touched what.
This is the experience worth internalizing. You did not just read that edits are reversible. You reversed a multi-file change a machine made to your real folder, and your folder is fine. That is the trust layer working as intended.
Recover a deleted file by hand
Approve the deletion this time, then go get the file back. When you approve a delete, the file is not erased. It is moved into a hidden trash folder inside the portal, so it sits there on disk until you choose to clear it out yourself. The same goes for anything that was overwritten during the run.
The folder’s exact name, and the fact that it is hidden from the sidebar but plainly there on disk, are covered in Folder portals. Do this once by hand. Seeing your “deleted” file sitting safely in a real folder is what turns the promise into something you actually believe.
Deletions are backed up, not vaporized
A deleted file is moved to the portal’s trash, not destroyed. It is gone for good only when you empty that folder yourself. So even the action that asks first is still recoverable after you say yes.
Why this feels safe instead of risky
Step back and notice what just protected you, because none of it was you being careful. The boundary that kept the AI inside one folder was automatic. The preview that listed every change came for free. The backups happened before any overwrite. The deletion asked on its own. The undo was one click. The recovery was a real file in a real folder.
That is reversibility used as trust. You do not stay safe by reviewing every keystroke and hoping. You stay safe because mistakes are cheap to take back, so you can let AI move quickly without betting your work on it. The principle underneath all of it is in Local-first trust: if something changes your files, you can always tell what it changed and undo it.
Where to go next
- Folder portals: every mechanic touched here, including how to mount, the auto-apply setting, and the trash folder.
- Agents: the propose, review, apply model, and how to save a scoped portal worker you reuse.
- Local-first trust: the reversibility principle that makes leaning on AI here safe by design.