CLI Documentation

Use ti.fo directly from your terminal.

# ti.fo CLI Documentation

ti.fo is designed to be CLI-friendly. You can use curl, wget, or any other HTTP client.

## 1. Pastes (/t)
Create a text paste from stdin or a file.

# From stdin
echo "hello world" | curl -F "content=<-" https://ti.fo/t

# From a file
curl -F "content=@file.txt" https://ti.fo/t

# With options (expiry: 1d, 3d, 1w, 1m)
curl -F "content=hello" -F "expiry=1d" -F "burn_after_read=1" -F "password=secret" -F "title=My Paste" https://ti.fo/t

## 2. Code Snippets (/c)
Similar to pastes, but with syntax highlighting in the browser.

curl -F "content=@script.py" -F "language=python" -F "title=Script" https://ti.fo/c

## 3. Files (/f)
Upload any file. Strictly burn-on-read.

curl -F "file=@image.png" -F "password=mypass" https://ti.fo/f

## 4. Images (/i)
Upload an image with preview support.

curl -F "file=@photo.jpg" -F "burn_after_read=1" https://ti.fo/i

## 5. Webhook Tester (/h)
Generate a unique URL to test and debug incoming webhooks.

# Create a new endpoint (returns JSON with ID)
curl -X POST https://ti.fo/h

# Send a request to your webhook
curl -X POST https://ti.fo/h/{ID} -d '{"hello": "world"}' -H "Content-Type: application/json"
curl -X GET "https://ti.fo/h/{ID}/custom/path?query=param"

## 6. Reading Raw Content
Append ?raw=1 to any paste/snippet/note URL to get plain text.

curl https://ti.fo/t/abc123?raw=1