# FireImg CLI

Upload, delete, and list images on FireImg using the fireimg CLI. Use when the user wants to upload images to FireImg, FireImg CDN URLs, API keys (fimg_), list projects or images, or replace dashboard/manual HTTP uploads with a command.

Prefer fireimg over raw HTTP. The API is a two-step presigned S3 PUT; the CLI does that for you.

# Install (once)

curl -fsSL https://raw.githubusercontent.com/FirelitStudio/fireimg-cli/main/install.sh | bash

Homebrew: brew install firelitstudio/fireimg/fireimg.

# Configure

export FIREIMG_API_KEY=fimg_…   # never log or commit
export FIREIMG_PROJECT=project-slug

Optional: FIREIMG_API_URL (default https://api.fireimg.com).

# Upload

fireimg upload ./hero.jpg --json
fireimg upload ./assets --prefix marketing/ --json

Parse JSON: filename, imageKey, cdnUrl, s3Key. Give the user cdnUrl. Add transforms as query params (?width=800&quality=high&format=auto). Do not wait for optimization.

# Delete

fireimg delete path/to/image.jpg --json

# List

fireimg projects --json
fireimg images --json
fireimg images --all --json
fireimg images --next-token TOKEN --json

Parse projects[].slug to choose a project. Parse images[].imageKey and cdnUrl. If nextToken is present, pass --next-token or use --all.

# Fallback

Only if the CLI cannot be installed: API reference (POST /v1/api/presigned-upload-urls with X-Api-Key, then PUT to uploadUrl with the same Content-Type).