Use this skill when:
Do NOT use this skill when:
bash
pip install aitun
Or install via one-line script (Linux/macOS):
bash
curl -fsSL https://aitun.cc/install.sh | bash
Windows (PowerShell):
powershell
irm https://aitun.cc/install.ps1 | iex
Or verify it is already installed:
bash
which aitun
Start the local dev server with hot-reload enabled. The command depends on your framework:
bash
# For a static HTML directory (use a live-reload tool)
pip install livereload
python3 -c "
from livereload import Server, shell
server = Server()
server.watch('/path/to/html/dir')
server.serve(root='/path/to/html/dir', port=8080)
" &
DEV_PID=$!
sleep 2
# For Next.js
npm run dev -- -p 8080 &
# For Vite
npx vite --port 8080 --host &
# For Flask
flask run --port 8080 --host 0.0.0.0 &
# For any HTTP server (no auto-reload)
python3 -m http.server 8080 --directory /path/to/html/dir &
Expose the dev server to the internet:
bash
aitun -p 8080 &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://aitun.cc/abc123text
Your live preview is ready: https://aitun.cc/abc123
I'm still working on it — just refresh the page to see my latest changes.
This preview link will remain active while I'm editing.
Continue editing files in your project directory. As you save changes:
After each significant change, notify the user:
text
I've updated the navigation bar — refresh the page to see it.
When the preview session is complete, stop the servers:
bash
kill $AITUN_PID 2>/dev/null
kill $DEV_PID 2>/dev/null
The aitun command (installed via pip install aitun, or alternatively curl -fsSL https://aitun.cc/install.sh | bash / irm https://aitun.cc/install.ps1 | iex on Windows) accepts these flags:
FlagDescription-p PORTLocal HTTP service port (optional; omit for TCP-only mode with --tcp-ports)-k TOKENAuth token for registered subdomain (omit for free tunnel)--host HOSTLocal service address (default: localhost)--tcp-ports PORTSTCP forwarding ports, comma-separated (e.g., 22,3306; requires -k). Use without -p for TCP-only mode--p2pEnable P2P direct connection (default: enabled)--no-p2pDisable P2P, force server relay mode--daemonRun as background daemon--stopStop running daemon
aitun.cc/abc123), NOT subdomainslivereload package to enable auto-refresh