Use this skill when:
Do NOT use this skill when:
Install the aitun client (any one of):
bash
# Install via pip (recommended, cross-platform, bundles the binary)
pip install aitun
bash
# Or one-line install script (Linux/macOS)
curl -fsSL https://aitun.cc/install.sh | bash
powershell
# Windows (PowerShell)
irm https://aitun.cc/install.ps1 | iex
Verify the install:
bash
which aitun
aitun --help
Identify the file you want to send. This is typically a file you just generated:
.pdf, .docx, .pptx, .xlsx.png, .jpg, .svg.zip, .tar.gzVerify the file exists:
bash
ls -lh /path/to/your/file.ext
Start a simple HTTP server in the directory containing the file:
bash
# If the file is at /path/to/output/report.pdf
cd /path/to/output
python3 -m http.server 8080 &
FILE_PID=$!
sleep 1
Use aitun to expose the local server to the internet:
bash
aitun -p 8080 &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://aitun.cc/abc123Append the filename to the public URL to create a direct download link:
text
https://aitun.cc/abc123/report.pdf
Deliver the download link to the user in the chat:
text
Your file is ready for download: https://aitun.cc/abc123/report.pdf
This link is temporary and will expire in 24 hours. Download it soon.
After the user confirms they have downloaded the file, stop the servers:
bash
kill $AITUN_PID 2>/dev/null
kill $FILE_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 subdomainsfiles.aitun.cc), register at https://aitun.cc