Install
openclaw skills install @ctz168/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 @ctz168/sendfileUse this skill when:
Do NOT use this skill when:
Install the aitun client (any one of):
# Install via pip (recommended, cross-platform, bundles the binary)
pip install aitun
# Or one-line install script (Linux/macOS)
curl -fsSL https://aitun.cc/install.sh | bash
# Windows (PowerShell)
irm https://aitun.cc/install.ps1 | iex
Verify the install:
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:
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, or alternatively curl -fsSL https://aitun.cc/install.sh | bash / irm https://aitun.cc/install.ps1 | iex on Windows) accepts these flags:
| Flag | Description |
|---|---|
-p PORT | Local HTTP service port (optional; omit for TCP-only mode with --tcp-ports) |
-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). Use without -p for TCP-only mode |
--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