Command Reference

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

Global Options

Every command supports these flags:

FlagDescription
-u, --api-url <url>Override the configured API URL
-k, --api-key <key>Override the configured API key
-q, --quietOutput URLs only (one per line)
-j, --jsonOutput 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

FlagDescription
--filename <name>Set filename for stdin input

JSON Output

With -j, each result contains:

FieldTypeDescription
idstringUnique file ID
urlstringShareable URL
keystringFile key
filenamestringOriginal filename
sizenumberFile size in bytes
typestringFile type
zonestringStorage zone
expiresAtstring | nullExpiration time (null if permanent)
permanentbooleanWhether the file is permanent
dedupedbooleanWhether 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

FlagDescription
-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

FieldTypeDescription
idstringUnique paste ID
urlstringShareable URL
filenamestringGenerated filename
sizenumberContent size in bytes
typestringFile type
contentTypestringMIME 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

FieldTypeDescription
idstringUnique ID
urlstringShort URL
shortUrlstringShort URL (alias)
shortCodestringShort code identifier
originalUrlstringOriginal long URL

whoami

Display your account information, plan, and quota usage.

anytourl whoami

JSON Output

FieldTypeDescription
user.namestringAccount name
user.emailstringAccount email
plan.displayNamestringCurrent plan name
quota.storageobjectStorage usage (used, limit, formatted versions)
quota.monthlyUploadobjectMonthly upload usage
quota.bandwidthobjectBandwidth usage
featuresobjectFeature flags (apiAccess, customShortLinks, etc.)
fileRetention.hoursnumber | nullFile retention period
fileRetention.permanentbooleanWhether 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