Skip to content

ramble-images

by official

Text

Create image description prompts from text using AI, with optional image fetching via Stability AI (STABILITY_API_KEY environment variable, makes POST requests to api.stability.ai) or Pexels (PEXELS_API_KEY environment variable, makes GET requests to api.pexels.com). Defaults to descriptions-only mode with no network access.

ramble images
# ramble-images

Create image description prompts from text using AI, with optional image fetching via Stability AI or Pexels. Defaults to descriptions-only mode with no network access.

## Installation

This is a CmdForge tool. Install it from the CmdForge registry or create it using the CmdForge GUI.

## Usage

Use `ramble-images` as a pipeline command to extract image descriptions from text:

```bash
# Generate image descriptions only (no API calls)
echo "A sunny day at the beach with children playing in the sand" | ramble-images

# Generate 3 image descriptions
echo "A cyberpunk cityscape at night" | ramble-images --count 3

# Fetch actual images using Stability AI
export STABILITY_API_KEY="your-key"
echo "A serene mountain landscape at sunset" | ramble-images --image-provider stability

# Fetch stock photos using Pexels
export PEXELS_API_KEY="your-key"
echo "Modern office workspace with natural lighting" | ramble-images --image-provider pexels --count 4
```

## Arguments

| Flag | Variable | Default | Description |
|------|----------|---------|-------------|
| `--image-provider` | `image_provider` | `descriptions-only` | Image source: descriptions-only, stability, pexels |
| `--count` | `count` | `2` | Number of image descriptions to extract |

## How It Works

1. **Build image description prompt** - Constructs an AI prompt to analyze the input text and generate image descriptions
2. **Call AI for image descriptions** - Uses Claude Haiku to extract relevant image prompts from the text
3. **Parse descriptions and optionally fetch images** - Processes the AI response and optionally fetches actual images via Stability AI (POST to api.stability.ai) or Pexels (GET to api.pexels.com)

## API Keys

- **Stability AI**: Set `STABILITY_API_KEY` environment variable to enable image generation
- **Pexels**: Set `PEXELS_API_KEY` environment variable to enable stock photo search

Without API keys, the tool operates in descriptions-only mode and makes no network requests.

## Dependencies

None

No reviews yet.

Issues

No issues reported for this tool.