Home Pricing Docs Log In Sign Up

CLI Tool

Run Agent Media Tools directly from your terminal. Resize images, manipulate PDFs, generate QR codes, create pastes, shorten URLs, and use developer utilities without writing API boilerplate.

Resize, convert, compress, analyze images
Merge, split, compress PDFs
Generate QR codes & shorten URLs
Create pastes for text and code
UUID, password, Base64, JWT decode, diff
Download public page media as a ZIP

Quick Start

1
Download the scriptamt.js (single file, zero dependencies, uses only built-in Node.js modules).
2
Run it with Node.js 18+:
# Make it executable
chmod +x amt.js

# See all commands
./amt.js --help

# Resize an image
./amt.js image resize photo.jpg --width 800

# Generate a QR code
./amt.js qrcode generate "https://example.com"

# Get a random UUID
./amt.js uuid

# Use an environment variable for authenticated tools
export AMT_API_KEY=mt_your_key_here
./amt.js pdf merge invoice.pdf receipt.pdf

Install via npm (global)

Install once and use the amt command from anywhere.

# Install the official package globally
npm install --global agentmediatools-cli

# Use amt from anywhere
amt --help
amt uuid
amt image resize ~/Pictures/photo.jpg --width 800 --format webp

# Or run once without a global install
npx agentmediatools-cli uuid

Usage Examples

┌─ Image Tools ──────────────────────────────────┐
amt image resize input.jpg --width 1024           # Resize to width 1024
amt image convert input.png --format webp         # Convert to WebP
amt image compress photo.jpg --quality 60         # Compress to 60% quality
amt image analyze screenshot.png                  # Show image metadata

┌─ PDF Tools ────────────────────────────────────┐
amt pdf merge a.pdf b.pdf c.pdf                   # Merge multiple PDFs
amt pdf split document.pdf                        # Split into single pages
amt pdf compress large.pdf                        # Compress PDF file

┌─ QR & URLs ────────────────────────────────────┐
amt qrcode generate "https://example.com"         # Generate QR code image
amt url shorten "https://very.long.url.com/page"   # Shorten a URL

┌─ Pastebin ─────────────────────────────────────┐
amt paste create "Hello world" --title "Greeting" # Create a paste

┌─ Developer Utilities ──────────────────────────┐
amt uuid                                          # Generate a UUID v4
amt password --length 24                          # Generate a password
amt base64 encode "Hello World"                   # Base64 encode
amt base64 decode SGVsbG8=                        # Base64 decode
amt ip                                            # Show your IP address
amt timestamp                                     # Current timestamp info
amt units 12 in cm                                # Unit conversion
amt diff "left text" "right text"                 # Text diff
amt jwt decode eyJ.eyJ9.abc                       # Decode a JWT

┌─ Agent Tools (API key required) ───────────────┐
export AMT_API_KEY=mt_your_key_here
amt scrape "https://example.com" --output media.zip # Download public page media
amt pdf merge invoice.pdf receipt.pdf             # Authenticated PDF operation

┌─ Scripts and agents ───────────────────────────┐
amt uuid --json                                   # Machine-readable stdout
amt diff "before" "after" --json                  # Nonzero exit on failure

Environment Variables

Set these to avoid passing --key every time:

# Set your API key (optional — only needed for agent endpoints)
export AMT_API_KEY=mt_your_key_here

# Use a custom base URL (for local dev or self-hosted)
export AMT_BASE_URL=http://localhost:3456