ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified media Safety 4/5

grok-image-cli

Generate and edit images via Grok API from the command line. Cross-platform secure credential storage for xAI API key. Supports batch generation, aspect ratios, and style transfer.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/cyberash-dev/grok-image-cli
Or

What This Skill Does

The grok-image-cli skill provides a command-line interface for the xAI Grok image generation models directly from your terminal. It serves as a secure bridge between your local environment and xAI's imaging services. Beyond basic generation, it enables advanced workflows including image editing, aspect ratio manipulation, and batch generation. It leverages native OS credential stores (such as the macOS Keychain or Windows Credential Manager) to ensure your API keys remain encrypted and inaccessible to other applications, providing a higher level of security than traditional environment variable storage.

Installation

To integrate this skill into your environment, use the OpenClaw installer:

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

Ensure you have Node.js version 20.19.0 or higher installed. Once the skill is installed, initialize your credentials by running grok-img auth login and entering your xAI API key when prompted. You can verify your connection using grok-img auth status.

Use Cases

This skill is ideal for developers, designers, and content creators who prefer keyboard-centric workflows over GUI tools. It is particularly useful for automating the creation of placeholder assets for web projects, generating variations of UI mockups, or quickly applying style transfers to existing image datasets. Because it supports both local file inputs and remote URLs, it fits seamlessly into CI/CD pipelines or automated shell scripts meant to process visual media programmatically.

Example Prompts

  1. "Generate a series of 4 abstract neon-themed wallpapers in 16:9 aspect ratio using the grok-imagine-image-pro model and save them to my desktop assets folder."
  2. "Edit the image located at ./input.jpg by applying a cyberpunk aesthetic and output the result to my project assets directory."
  3. "Check if my xAI API key is correctly configured in the credential store and then generate a photorealistic portrait of a space explorer."

Tips & Limitations

To maximize performance, always specify the model type that best fits your intent (e.g., use the Pro model for high-fidelity requirements). Note that while the tool handles local files, large image batching operations may be limited by your current network bandwidth and API rate limits. Always ensure your source images are within recommended size constraints to prevent upload timeouts during the editing process.

Metadata

Stars3409
Views1
Updated2026-03-25
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-cyberash-dev-grok-image-cli": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#image-generation#grok#cli#ai-art#productivity
Safety Score: 4/5

Flags: file-write, file-read, external-api