Commands

Every img-cli command, grouped by what it does. img-cli <command> --help shows the same with examples.

Command structure

img-cli <command> [subcommand] [arguments] [flags]

Global flags can go before or after the command:

img-cli --json image -m grsai:nano-banana-2.1 "a fox"
img-cli image -m grsai:nano-banana-2.1 "a fox" --json

Command families

Generate

Manage

  • provider: install providers and save their API keys
  • models: list models and what they support
  • task: check, wait for, and list tasks
  • balance: show account balances

Other

  • version: print the version
  • completion <shell>: print a shell completion script for bash, zsh, fish, or PowerShell

Global flags

Flag Meaning
--json Print results as JSON, and errors as JSON on stderr
-q, --quiet Hide progress messages
-v, --verbose Log each HTTP request to stderr
--dry-run Print the request instead of sending it
--provider-file <file> Use this provider file instead of the installed one with the same name; repeatable
--http-timeout <duration> Timeout for one HTTP request (default 10m)
--max-retries <n> Retries for rate limits and for requests that are safe to repeat (default 2)

Environment variables

Variable Meaning
IMG_CLI_<NAME>_KEY API key for provider <name>; dashes become underscores
IMG_CLI_CONFIG_DIR Keep config, providers, tasks, and cache in this directory
IMG_CLI_VERSION, IMG_CLI_INSTALL_DIR, IMG_CLI_DOWNLOAD_URL Installer options; see Installation

Exit codes

0 ok, 1 error, 2 usage, 3 auth, 4 not found, 5 rate limited, 6 insufficient credits, 7 generation failed, 8 wait timed out, 9 network, 130 interrupted. See Output and exit codes.