LaunchKit · 2026
Back to Skills

grok-image-cli

Generate and edit images via Grok API from the command line.

0
976 downloads
by @cyberash-dev

Setup & Installation

openclaw skills install @cyberash-dev/grok-image-cli

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install grok-image-cli

Version History

v0.2.1Feb 20, 2026 - Version note by skill developer:

No changes detected in this version. - No file changes found between this and the previous version. - No updates or modifications to features, documentation, or metadata. - Functionality and usage remain the same as the previous release.

What This Skill Does

A command-line tool for generating and editing images using the xAI Grok API. Supports three models, batch generation up to 10 images, aspect ratio control, and image editing from local files or URLs. API keys are stored in the OS native credential store, not in plaintext config files.

Stores credentials in the OS keychain rather than dotfiles, so the API key is never accidentally committed or leaked through shell history.

When to use it

  • Generate concept art variations from a text prompt
  • Edit a product photo to match a different art style
  • Batch-generate 10 social media images at 16:9 from a single prompt
  • Apply a watercolor or sketch effect to an existing photo
  • Quickly prototype visual assets from the terminal without opening a GUI

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: generate 4 landscape images at 16:9 and save them to ./output

AGENT
  1. 1Run `grok-img auth login` and enter the xAI API key when prompted
  2. 2Run `grok-img generate "Mountain landscape at sunrise" -n 4 -a 16:9 -o ./output`
  3. 3CLI calls the xAI image generation API with the specified parameters
  4. 4Downloads each generated image and saves it to ./output
OUTPUT

Four PNG files saved to ./output, filenames assigned by the CLI

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

xAI API key from https://x.ai