Docs

Command Reference

Complete reference for all AnyToURL CLI commands — upload, text, url, whoami, and config.

Global Options

Every command supports these flags:

Flag Description
-u, --api-url <url> Override the configured API URL
-k, --api-key <key> Override the configured API key
-q, --quiet Output URLs only (one per line)
-j, --json Output as JSON

upload

Upload one or more files. Supports local files, globs, and stdin.

anytourl upload <files...>

Examples

# Single file
anytourl upload screenshot.png

# Multiple files
anytourl upload file1.txt file2.pdf image.jpg

# From stdin
cat photo.png | anytourl upload -
echo "hello" | anytourl upload --filename hello.txt

# Quiet mode — returns URL only
anytourl upload photo.png -q

Options

Flag Description
--filename <name> Set filename for stdin input

JSON Output

With -j, each result contains:

Field Type Description
id string Unique file ID
url string Shareable URL
key string File key
filename string Original filename
size number File size in bytes
type string File type
zone string Storage zone
expiresAt string | null Expiration time (null if permanent)
permanent boolean Whether the file is permanent
deduped boolean Whether the file was deduplicated

text

Create a text paste from inline content, a file, or stdin.

anytourl text [options]

Examples

# Inline text
anytourl text -c "Hello, world!"

# From a file
anytourl text -f notes.md

# From stdin
cat log.txt | anytourl text
echo "quick note" | anytourl text -t "My Note"

# JSON output
anytourl text -c "debug data" -j

Options

Flag Description
-c, --content <text> Text content to paste
-f, --file <path> Read content from a file
-t, --title <title> Set a title for the paste

JSON Output

Field Type Description
id string Unique paste ID
url string Shareable URL
filename string Generated filename
size number Content size in bytes
type string File type
contentType string MIME type

url

Shorten a URL.

anytourl url <url>

Examples

# Shorten a URL
anytourl url https://example.com/very/long/path/to/page

# Get short URL only
anytourl url https://example.com/long -q

# JSON output
anytourl url https://example.com/long -j

JSON Output

Field Type Description
id string Unique ID
url string Short URL
shortUrl string Short URL (alias)
shortCode string Short code identifier
originalUrl string Original long URL

whoami

Display your account information, plan, and quota usage.

anytourl whoami

JSON Output

Field Type Description
user.name string Account name
user.email string Account email
plan.displayName string Current plan name
quota.storage object Storage usage (used, limit, formatted versions)
quota.monthlyUpload object Monthly upload usage
quota.bandwidth object Bandwidth usage
features object Feature flags (apiAccess, customShortLinks, etc.)
fileRetention.hours number | null File retention period
fileRetention.permanent boolean Whether files are kept permanently

config

Manage CLI configuration. Stores settings in ~/.anytourl.

anytourl config <subcommand>

Subcommands

# Set a value
anytourl config set apiUrl https://anytourl.com
anytourl config set apiKey sk-your-api-key

# Get a value
anytourl config get apiKey

# List all config
anytourl config list

# Delete a key
anytourl config delete apiKey

# Clear all config
anytourl config clear

Available keys: apiUrl, apiKey


Integration Patterns

Capture URL in a Script

URL=$(anytourl upload report.pdf -q)
echo "Report uploaded: $URL"

CI/CD Pipeline

# Upload build artifacts
anytourl upload dist/*.js -q -k "$ANYTOURL_API_KEY" -u https://anytourl.com

Pipe Chain

# Generate → upload → notify
tar czf - ./logs | anytourl upload --filename logs.tar.gz -q | xargs -I{} curl -X POST "$WEBHOOK" -d '{"url":"{}"}'

npx One-off Usage

No global install needed:

npx anytourl upload file.txt -k sk-your-key -u https://anytourl.com