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.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cyberash-dev/grok-image-cliWhat 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
- "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."
- "Edit the image located at ./input.jpg by applying a cyberpunk aesthetic and output the result to my project assets directory."
- "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
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 skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cyberash-dev-grok-image-cli": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, external-api
Related Skills
claude-cost-cli
Query Claude API usage and cost reports from the command line. Secure macOS Keychain storage for Admin API key. Table/JSON output.
caldav-cli
Manage CalDAV calendars (iCloud, Google, Yandex) from the command line. Supports OAuth2 and Basic auth, multi-account, table/JSON output.
claude-usage-cli
Query Claude API usage and cost reports from the command line. Secure macOS Keychain storage for Admin API key. Table/JSON output.
tg-cli
Read-only Telegram CLI via MTProto. Lists chats, fetches messages, downloads media, manages local accounts/sessions. Does not send messages or modify Telegram data. Use when the user asks to read Telegram chats, fetch messages, download media, or automate Telegram data extraction.