Install
openclaw skills install sendfileSend files to users in chat by creating a temporary public download link via aitun tunnel. Perfect for AI agents that need to deliver generated files (documents, images, reports, code) to users.
openclaw skills install sendfileUse this skill when:
Do NOT use this skill when:
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:
ls -lh /path/to/your/file.ext
Start a simple HTTP server in the directory containing the file:
# 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:
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:
https://aitun.cc/abc123/report.pdf
Deliver the download link to the user in the chat:
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:
kill $AITUN_PID 2>/dev/null
kill $FILE_PID 2>/dev/null
The aitun command (installed via pip install aitun) accepts these flags:
| Flag | Description |
|---|---|
-p PORT | Local service port (default: 8080) |
-k TOKEN | Auth token for registered subdomain (omit for free tunnel) |
--host HOST | Local service address (default: localhost) |
--tcp-ports PORTS | TCP forwarding ports, comma-separated (e.g., 22,3306; requires -k) |
--p2p | Enable P2P direct connection (default: enabled) |
--no-p2p | Disable P2P, force server relay mode |
--daemon | Run as background daemon |
--stop | Stop running daemon |
aitun.cc/abc123), NOT subdomainsfiles.aitun.cc), register at https://aitun.cc