Every folder is a website.
Served from your iPhone or iPad.
Write HTML, CSS and JavaScript in any editor. Portlight serves it at localhost, reloads it as you save, and opens it on any device on your Wi-Fi. No account, no server of ours, nothing sent to us.
- Version
- 1.0.5
- Platform
- iOS · iPadOS · iOS 26 or later
- Languages
- 21, server pages included
01Every folder is a site
Name a folder. Get an address.
Each folder in Portlight, on the device or in iCloud Drive, is served at its own address. Type a name to see the one it gets, by the rules the app uses.
Served at
- Spaces and symbols turn into dashes, accents are dropped, & becomes “and”, and apostrophes disappear.
- Names that collide get numbers: my-site, my-site-2. A folder already named like an address keeps it.
- Inside a site, files answer to their real name and to their slug, so Hero Photo.png and hero-photo.png both work.
- Addresses depend only on the name, never on the device's language.
/menu → menu.htmlClean URLs
Pages answer without their .html.
404.htmlCustom 404
A site's own page for whatever is missing.
200.htmlSingle-page apps
Served for every route without a file, so client-side routes survive a reload.
/css/app.cssRoot-relative links
Sent on to the site's own folder, so pages written for the root of a domain work unchanged.
02Live reload
See each change as you save.
Every HTML page gets a small script that watches its site. A stylesheet is swapped in without a reload; anything else reloads the page, whichever app saved the file.
button { background: #0a7cff; color: white;}<main> <h1>My Cool Site</h1> <button id="counter">Clicks …</button></main>My Cool Site
This page lives in the My Cool Site folder. Edit index.html, style.css, script.js, then reload.
A preview that keeps serving
The built-in browser keeps Portlight on screen, so the server keeps running while you test.
Light, dark, system
A switch in the preview tests prefers-color-scheme without touching the device's own setting.
Web Inspector
Inspect the preview from Safari › Develop on a Mac, like any page in Safari.
Beside the page, on iPad
Edit Files opens next to the page, so each save shows right away. Drag the edge between them to resize it.
03Console & requests
Know what your page did.
Everything the page logs, its errors with their file and line, and a field to run JavaScript in it. Next to it, every file the server sent, and the links a real web host would answer with a 404.
- 200/my-cool-site/GET · 1.4 kB · 2.1 ms · 127.0.0.14:35:02 PM
- 200/my-cool-site/style.cssGET · 812 B · 0.9 ms · 127.0.0.14:35:02 PM
- 200/my-cool-site/Hero.PNGGET · 48.2 kB · 1.7 ms · 127.0.0.1Matched “Hero.PNG” to “hero.png”. This link may break on a real web host, which matches names exactly.4:35:02 PM
- 404/my-cool-site/img/logo.svgGET · 1.1 kB · 0.8 ms · 127.0.0.14:35:02 PM
- 206/bobs-portfolio/reel.mp4GET · 1.2 MB · 6.2 ms · 192.168.1.404:35:31 PM
- console.log() and its friends, console.table() as a table, dir, trace, assert, count, time, and group, which indents what's logged inside it. Uncaught errors with their file and line, failed loads and unhandled rejections.
- Run JavaScript in the page, await included, in a field that colors your code in the editor's theme, wraps long code onto up to four lines and, with Auto-Close Brackets on, closes brackets and quotes. A badge on the console button counts the errors since you last looked.
- As you type, a list over the field suggests names, as the editor does: the page's own variables first, then everyday ones like document, and properties after a dot, each with a badge for what it holds.
- Suggestions never run anything: finding an object follows names and literal keys, never calls. With a keyboard, ↑ and ↓ pick one and Tab takes it; without suggestions, ↑ and ↓ bring back the last 100 commands.
- On iPad the console shares the preview, beside the page or under it, and keeps its size as the sidebar comes and goes.
- The request log lists every page, script and image served, with its status, size, time and the device that asked.
04Code editor
Edit right there.
Edit Files opens the site on screen in a code editor for HTML, CSS, JavaScript, Markdown, SVG and more, with completion at the cursor, brackets and tags that close themselves, folding and Format Code. Try them on these four files.
Theme
Tap a theme to try it in the editor above. Default, Monochrome, Solarized and Tomorrow follow light and dark; Monokai, Dracula and Nord are always dark.
Tap a theme to try it in the editor above. Default, Monochrome, Solarized and Tomorrow follow light and dark; Monokai, Dracula and Nord are always dark.
Code completion
A list at the cursor suggests HTML tags and attributes, CSS properties and values, JavaScript names and what they hold, JSON keys, SVG's elements, attributes and values, the names an XML file already uses, and the site's own files, classes and ids. It's lists built into the app, not AI, and nothing leaves the device.
Brackets that close themselves
Typing (, [, { or a quote adds its closer, and typing the closer steps over it. Return between { and } opens a block with the cursor inside.
Tags that close and rename themselves
Finishing an opening tag adds its closing tag. Rename either one and the other follows; an element that has none, like img, loses it, and gets it back with another name.
Format Code
Tidies a file's layout in one tap, or ⌥⇧F: each line indented by its structure, each CSS declaration and JSON value on a line of its own. Undo puts it back.
Code folding
Tap the arrow beside a line, or its number, to fold away the lines indented under it, and tap again to bring them back. Saving, Find and Undo still see every line.
Image previews
With a trackpad, a mouse or Apple Pencil's hover, rest the pointer on an image's name, in an src, an href or a url(), to see the picture, its size in pixels and its file size.
Nothing lost, nothing overwritten
Saving never replaces a change made in another app, on another device or by a page without asking. Changes save as Portlight leaves the screen; when they can't, they stay on the device and come back the next time the file opens.
Pictures and files
Add pictures from Photos, HEIC arriving as JPEG, and any file from the Files app. Tap an image or a video to preview it; rename, duplicate, move or trash it in place. Touch and hold a page to open it in the preview or in Safari.
Made for code
Return keeps the indentation, Tab inserts the file's own; no autocorrection or smart quotes. Files up to 5 MB, with colors and suggestions up to 1 MB. Settings › Editor turns each feature off.
Markdown and SVG, previewed
Markdown files open with Edit, Edit and Preview, and Preview at the top. The preview is laid out like a README, light or dark, with its tables, task lists, code and pictures, and follows your typing. Its scripts never run.
# Ahoy
- [x] Buy rope
- [ ] Paint the hull
| Port | Site |
| ---- | ---- |
| 8080 | my-cool-site |
`fetch()` can save this file too.<svg xmlns="http://www.w3.org/2000/svg" viewBox="-50 -50 100 100">
<circle r="48" fill="#c8963e"/>
<circle r="39" fill="#8fd3f4"/>
<circle cx="18" cy="-18" r="7" fill="#ffd34d"/>
<path d="M-36 15a39 39 0 0 0 72 0z" fill="#1f6fb2"/>
<path d="M-4 14v-24l14 24z" fill="#fff"/>
<path d="M-10 15h26l-4 5h-18z" fill="#7a4a21"/>
</svg>Ahoy
- Buy rope
- Paint the hull
| Port | Site |
|---|---|
| 8080 | my-cool-site |
fetch() can save this file too.
File types
Edit Files opens and creates files of these types, and pages can save some of them, with fetch(). Every other file in a site is served too, from pictures, sounds and videos to fonts and PDFs.
| Type | You can edit | Pages can save |
|---|---|---|
| HTML.html | Yes | |
| CSS.css | Yes | |
| JavaScript.js | Yes | |
| JSON.json | Yes | Yes |
| Markdown.md | Yes | Yes |
| SVG.svg | Yes | |
| XML.xml | Yes | |
| YAML.yml .yaml | Yes | Yes |
| CSV.csv | Yes | Yes |
| TSV.tsv | Yes | Yes |
| Text.txt | Yes | Yes |
| Git.gitignore .gitattributes .gitmodules .gitkeep | Yes |
05Git, built in
A history for every site.
The Git tab of Edit Files commits your changes, shows each file's lines in red and green, and pulls and pushes with GitHub, GitLab or any Git server, over HTTPS. Try a pull before you commit, then commit, pull and push.
Changes
Tap a change to see its lines. Untick a file to leave it out of the commit.
- Clone a Repository, in the sidebar's + menu, copies one from GitHub, GitLab or any Git server into a new site. Connect to a Repository links a site you already have; Start Without a Server keeps the history on the device. Remove Git from This Site takes it away again and leaves the files.
- When the server and the site changed the same lines, the editor tints each conflict, with Keep Current, Keep Incoming and Keep Both beside it. Until then, your pages show your version. A pull never writes over a change you haven't committed, and Settings › Git › Pull can rebase instead of merge.
- Switch, start, rename and merge branches, and delete them here or on the server. Cherry-pick and tag commits, like v1.0, and drop stashes one by one or all at once. ↶ discards a change, Undo Last Commit takes back an unpushed commit, and Revert This Commit undoes any commit.
- Over HTTPS, with a personal access token kept in your keychain under Settings › Git Accounts and brought to your other devices by iCloud Keychain. A repository can't write outside its site, and your token never follows a redirect to another host. No SSH, Git LFS or submodules for now.
- With sites in iCloud Drive, each device keeps its own Git history outside it, since iCloud damages repositories. Your other devices set Git up from the same server and branch.
- A branch beside each site in the sidebar shows where it stands: green when all is committed and up to date, orange with files changed, blue with commits to push or pull, red while a merge waits. Git, in the preview's More menu, opens the Git tab directly, as does a toolbar button on iPad. Portlight's Git is its own, with no third-party code.
06Assistant
An assistant that works on your site.
The Assistant tab of Edit Files talks with the model you choose: Claude from Anthropic, OpenAI's models, or your own Ollama or LM Studio on a computer on your network. It reads the site, and each change it proposes waits on a card for you to allow. Pick a question to see how.
Settings › Assistant
Provider
Off until you choose a provider. Each provider keeps its own key, address and model, and Test Connection lists its models.
The assistant reads the site's files and changes them, checks the preview's console and runs scripts in the page, asking before each change.
What you ask, and the files the assistant reads, go to Anthropic.
- It reads the site's pages, styles and scripts, big ones in parts, searches them and changes them, adds pictures and SVG drawings, checks the console, runs JavaScript in the page and reloads it. When you ask, it does what the Git tab does: starting Git for the site, on this device or from a repository, and setting, changing or removing its server; commits, pulls and pushes; branches, merges and tags; reverts, cherry-picks and stashes; and removing Git.
- Every change to a file, every page it opens and every Git operation that changes something waits on a card for Allow or Deny. Reading never asks. Allow All lets the rest of a conversation go ahead, and Settings › Assistant can stop it asking, except for what asks every time.
- Some things ask every time, even after Allow All: a script in the page, a file from the web, connecting to a server or changing it, removing Git, deleting a branch or a tag, and dropping stashes.
- A file or page the assistant reads can talk the model into asking for anything, so each card shows what would really happen: an address in full, a script with hidden characters spelled out, and whether a download would replace a file.
- Every file it touches stays inside the site open in Edit Files, and it refuses to download from the device's own network, however the address is written or wherever a redirect leads.
- Your provider, your key: an API key from Anthropic or OpenAI, billed by them and kept in your keychain, or Ollama or LM Studio on a computer on your network. Portlight has no model or AI service of its own.
- Before the first question to Anthropic or OpenAI, Portlight says what goes there, and sends nothing until you agree. Requests go straight from your device to the provider: nothing goes through us.
- The Assistant button in the preview opens it. Conversations are kept for each site, on the device, out of its backups. With a keyboard, Return sends and Shift-Return starts a new line.
07Saving data
Pages that keep their data.
A page can write JSON, Markdown and text files inside its own site with fetch(). They are plain files in the site, so a to-do list or a high score survives a reload, and syncs with it when the site is in iCloud Drive.
const response = await fetch("data.json"); // 404 until the first saveconst data = response.ok ? await response.json() : {};await fetch("data.json", { // create or replace method: "PUT", headers: { "Content-Type": "application/json" }, body: JSON.stringify(data),});await fetch("scores/old.json", { method: "DELETE" }); // removeawait fetch("notes.txt", { method: "PUT", body: "Hi" }); // text goes as it is→ PUT /my-cool-site/data.json If-Match: "6a1f-18c4"← 204 No Content ETag: "6a1f-18c9"→ PUT /my-cool-site/data.json If-Match: "6a1f-18c4"← 412 Precondition Failed- Only JSON, Markdown and text files (.json, .md, .yml, .yaml, .csv, .tsv, .txt) inside a site, never at the top level or in hidden folders. Up to 5 MB of valid JSON or UTF-8 text a file, and missing folders are created.
- Each save answers with the file's new ETag. Send it back as If-Match and a change made elsewhere is never overwritten.
- Pages from other websites can't save, and other devices only after entering the access key. Pages Can Save Data Files turns it off.
- Never HTML, CSS, JavaScript, SVG or XML, which a browser can run as code: a page can't change the code of any site.
Storage
Storage, in a site's More menu, shows what its pages saved in the preview: their localStorage and sessionStorage. Tap an item to change its key or value, swipe to delete it, or add one with +. Each site keeps its own, in the preview and on other devices.
Pages use these commands, the same for sessionStorage, and the console runs them too.
// read an itemlocalStorage.getItem("theme");// add or change an itemlocalStorage.setItem("theme", "dark");// delete an itemlocalStorage.removeItem("theme");Local Storage
- themedark
- highScore4200
Session Storage
- step2
08Your Wi-Fi
On every device on your Wi-Fi.
Turn on Allow Other Devices and your network address and a QR code appear in the sidebar. A phone, a tablet or a computer on the same Wi-Fi opens your sites in its own browser.
Server
http://192.168.1.23:8080
Access key: K7P2QX
Sites
- My Cool Site/my-cool-site/
- Café & Bar!/cafe-and-bar/
- Bob's Portfolio/bobs-portfolio/
Enter the Access Key
To open sites from this device, type the access key shown in Portlight on the device that's serving them.
Continue- The key is asked once. A cookie then remembers that browser for a year, and this device never needs it at localhost.
- Local network only, never over cellular or a VPN, and only by IP address, localhost or a .local name.
- After 10 wrong keys in a minute, a device waits a minute. New Key signs every device out.
- Other devices use plain http, so camera, service workers and the clipboard work only in the preview and in Safari on this device.
09Test in Safari
Keep testing in Safari.
iOS pauses an app soon after it leaves the screen, which stops the server. With Keep Serving in Background on, Open in Safari serves your sites for an hour, with the device locked too.
- On by default. Nothing runs in the background until you tap Open in Safari, and tapping it again starts the hour over.
- iOS can still end it early when the device needs the resources. Portlight then stops cleanly and starts again when you come back.
- It uses more battery than letting iOS pause Portlight.
- On iPad, a site can open in its own window, side by side with Safari.
10And the rest
What a real server does.
Video and audio
Byte ranges, so media plays with seeking, and large files stream straight from storage.
Revalidation
ETags and keep-alive: an unchanged file answers 304 and costs nothing to send again.
Folder listings
A folder without an index.html lists its files, or says what to add, with a starter page to copy.
iCloud Drive, by choice
Sites start on the device. Turn on Keep Sites in iCloud Drive to edit them from your other devices; offloaded files download before they're served.
Settings on every device
Your settings follow you through iCloud, and your keys through iCloud Keychain. Server settings stay on each device.
Keyboard shortcuts
⇧⌘N new site, ⌘E Edit Files, ⌘S save, ⌥⇧F format, ⌘/ comment, ⌥↑ ⌥↓ move lines, ⌘R reload, ⌥⌘C console. Help lists them all, on iPhone too with a keyboard attached.
Never served
Hidden files, symlinks and .. are never served, whatever the address asks for.
Server pages, translated
Errors, folder listings, All Sites and the access-key page follow each visitor's own browser language.
Closed to other websites
On this device, Portlight doesn't answer what other websites ask of it, so a page on the web can't read your sites or show them in a frame. Following a link still works.
A page stays in its preview
Portlight asks before a page opens another website or app. Dialogs that keep coming can be blocked, and a page stuck in a loop can be left: Reload or a new address opens it again from the start.
21 languages, in the app and in every page the server writes
No account
Nothing to sign up for. Add a folder and it's a site.
Nothing sent to us
No server of ours, no analytics, no ads. Portlight only connects to servers you choose.
Your files, your place
Sites stay on the device, or in your iCloud Drive if you turn it on. It works offline.
Every folder, a website.
Portlight for iPhone and iPad. No account, nothing sent to us, and it works offline.
Version 1.0.5 · iOS 26 or later