Send logs, code snippets, and text directly from your command line to CopyAndPaste.at
tail -n 100 /var/log/auth.log | curl -X POST https://copyandpaste.at/api/log --data-binary @-That's it! The response will be your paste URL that you can share immediately.
Pro Tip: Create an alias for even easier use:
alias paste='curl -X POST https://copyandpaste.at/api/log --data-binary @-'Then simply: docker logs myapp | paste
POST https://copyandpaste.at/api/logSend log files:
tail -n 50 /var/log/nginx/error.log | curl -X POST https://copyandpaste.at/api/log --data-binary @-Send Docker container logs:
docker logs mycontainer | curl -X POST https://copyandpaste.at/api/log --data-binary @-Send command output:
ps aux | curl -X POST https://copyandpaste.at/api/log --data-binary @-Send file contents:
cat config.php | curl -X POST https://copyandpaste.at/api/log --data-binary @-POST https://copyandpaste.at/api/pasteUse the JSON API when you need to specify custom titles, languages, or when integrating with applications that need structured responses.
curl -X POST https://copyandpaste.at/api/paste \
-H "Content-Type: application/json" \
-d '{
"content": "Your content here",
"title": "Custom Title",
"language": "javascript"
}'| Parameter | Type | Required | Description |
|---|---|---|---|
| content | string | ✅ Yes | The text content to paste |
| title | string | ❌ No | Custom title (defaults to "Untitled") |
| language | string | ❌ No | Language for syntax highlighting |
{
"id": "abc1234567"
}The paste will be available at: https://copyandpaste.at/abc1234567
For syntax highlighting, you can specify any of these languages:
bashshelllogjsonyamlpythonjavascripttypescriptphpsqldockerfilenginxapachexmlhtmlcssjavagorustcppcrubyperltextAdd to your ~/.bashrc or ~/.zshrc:
alias paste='curl -X POST https://copyandpaste.at/api/log --data-binary @-'pasteit() {
local url=$(curl -s -X POST https://copyandpaste.at/api/log --data-binary @-)
echo "Paste URL: $url"
# Copy to clipboard (macOS)
if command -v pbcopy >/dev/null 2>&1; then
echo "$url" | pbcopy
echo "URL copied to clipboard!"
fi
# Copy to clipboard (Linux)
if command -v xclip >/dev/null 2>&1; then
echo "$url" | xclip -selection clipboard
echo "URL copied to clipboard!"
fi
}tail or head to limit sizegzip for very large content#!/bin/bash
# Error monitoring script
if grep -q "ERROR" /var/log/myapp.log; then
echo "Errors detected at $(date)" > /tmp/error-report.txt
tail -n 100 /var/log/myapp.log >> /tmp/error-report.txt
URL=$(cat /tmp/error-report.txt | curl -s -X POST https://copyandpaste.at/api/log --data-binary @-)
# Send alert with paste URL
echo "Error log: $URL" | mail -s "Application Errors" admin@example.com
fi# GitHub Actions example
- name: Share build logs on failure
if: failure()
run: |
cat build.log | curl -X POST https://copyandpaste.at/api/log --data-binary @- > paste_url.txt
echo "Build logs: $(cat paste_url.txt)" >> $GITHUB_STEP_SUMMARYQuestions or need help? The API is simple and reliable - just pipe your content and get a shareable URL back!