Run
Call ctx.fs() and a Helix project gets its own directory of files. Read and write with the Node methods you already know, and the files are still there after the next run and the next deploy.
In short
Tray Helix now gives a project its own directory of files through ctx.fs(). Every function in the project reads and writes the same directory with Node's familiar fs/promises methods, and the files persist across executions and deployments. Paths can't leave the directory, and helix dev keeps a local copy so nothing touches deployed files while you build.
Some of what an app produces is simply a file. A finance app builds a month-end report. An ops tool exports a CSV for an auditor. A library wants a path on disk, not a value in a database. Until now that meant pushing the file somewhere else and keeping track of where it went.
Now a Helix project has its own folder. Call ctx.fs(), write the file, and every function in the project can read it back, on the next run and after the next deploy.
What that gives the team building it:
readFile, writeFile, readdir, mkdir, streams. The same fs/promises calls, with Node’s own errors, so ENOENT means what it always meant.fs.resolve() returns a real path inside the project’s folder.helix dev keeps files in .helix/project-files/ inside the project, already excluded from git, so building never touches deployed files.What it gives IT:
.., an absolute path or a symlink, is rejected before anything runs.ctx.fs().A finance team runs a month-end app on Helix. Each close, it pulls the numbers and builds a report the controller signs off.
At the end of the close, a function writes the month’s report to reports/2026-11.json in the project’s folder.
await ctx.fs().writeFile('reports/2026-11.json', report);
The page that shows the report reads the same file. It’s there because the folder persists, even though the run that wrote it has finished.
The team deploys a change to how the report is laid out. Last month’s report is still in the folder, so the new page can show both side by side.
The read fails with Node’s usual ENOENT, and the app answers “No report for that month” instead of an error page.
Call it in your own code. Helix finds ctx.fs() in your project’s source, not inside a dependency. If a library needs files, call ctx.fs() yourself and pass it the handle or a path.
Give concurrent runs their own file names. Every execution shares the one folder, and nothing coordinates two writers on the same file.
Use the database for records. Files suit reports, exports and templates. Data that relates to other data belongs in the project’s database.
How to read and write files, and handle errors, is in the docs linked above.
When the data is better as a file: a generated report, an export, a template, or anything a library expects to find on disk. Records that relate to each other belong in the database, and a single value or flag belongs in the key-value store.
Yes. The directory persists across executions and deployments. It goes away only when the project is deleted.
No. A path with a .. segment, an absolute path, or a symlink that leads outside the directory is rejected before anything runs.
Yes. Call ctx.fs() in your own code, then pass the handle, or a path from fs.resolve(), to the library. Helix turns the file system on for a project when it finds ctx.fs() in the project's own source.
Deploy an app you built with your AI assistant, and see what Helix does with it.
Thanks, keep an eye on your inbox for an invite.
Want to talk to someone first? Contact us