# Using FireImg from a coding agent

When the user wants to upload, delete, or list FireImg images, use the FireImg CLI. Do not hand-roll the presigned URL + S3 PUT flow unless the CLI cannot be installed.

# Install

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

Or Homebrew: brew install firelitstudio/fireimg/fireimg.

# Required configuration

  • FIREIMG_API_KEY — key from the FireImg dashboard (API Keys). Never log or commit it.
  • FIREIMG_PROJECT — project slug.

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

# Upload

fireimg upload ./path/to/image.jpg --json
fireimg upload ./assets --prefix marketing/ --json

Read --json output (filename, imageKey, cdnUrl, s3Key). Give the user the cdnUrl. Append transform query params as needed (?width=800&quality=high&format=auto). See the Image URL reference.

Do not wait for optimization; variants are generated on demand.

# Delete

fireimg delete feed_items/43/uuid.jpg --json

# List

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

projects does not need FIREIMG_PROJECT. images lists one page (100 by default) and includes nextToken when more results exist. --all follows every page.

# Cursor skill

Copy skills/fireimg/SKILL.md to .cursor/skills/fireimg/SKILL.md in a customer repo so agents pick this up automatically.

Machine-readable copy of these rules: https://docs.fireimg.com/llms.txt.