bitart-generator 0.4.1

Terminal pixel art generator — create 64x64 art from text prompts using AI image generation
bitart-generator-0.4.1 is not a library.

BitArt Generator

A terminal-based pixel art generator built in Rust. Generate 64x64 pixel art from text prompts using DALL-E image generation. View art directly in your terminal and export to PNG.

Rust License

Features

  • AI Generation — Uses OpenAI DALL-E API to generate pixel art from text prompts
  • Model Selection — Choose between DALL-E 2 ($0.02/image) or DALL-E 3 ($0.04/image)
  • Setup Wizard — First-launch setup for model selection and API key entry
  • Config Management — Change model or API key anytime with c keybind
  • Terminal Preview — Full-color pixel art rendered with Unicode block characters
  • PNG Export — Save art as 512x512 PNG (8x upscaled from 64x64)
  • Interactive TUI — Built with Ratatui for a smooth terminal experience

Installation

npm (Easiest)

npm install -g bitart-generator

Homebrew (macOS/Linux)

brew tap ezani92/bitart
brew install bitart

Cargo (From Source)

Requires Rust 1.70+:

cargo install bitart-generator

From Releases

Download the latest binary from Releases.

Setup

On first launch, BitArt will prompt you to:

  1. Select a model — DALL-E 2 (cheapest) or DALL-E 3 (better quality)
  2. Enter your OpenAI API key — Get one at platform.openai.com/api-keys

Your config is saved to ~/.bitart/config.json and persists across sessions.

Usage

bitart

This opens the TUI. Type a prompt and press Enter to generate pixel art.

Keybindings

Key Action
Enter Generate art from prompt / New prompt
s Save to output.png
r Regenerate same prompt
c Open config (change model/API key)
q Quit
Esc Quit

How It Works

  1. Enter a prompt — e.g. "neon city skyline", "sunset mountains", "pixel art cat"
  2. Generation — Sends prompt to DALL-E API, downloads the image, and downscales to 64x64 pixels
  3. Preview — Art is displayed in your terminal using colored ██ Unicode blocks
  4. Export — Press s to save as a 512x512 PNG to ./output.png

Project Structure

src/
├── main.rs              # Entry point
├── config.rs            # API key & model config (~/.bitart/config.json)
├── generator/
│   ├── mod.rs           # Async generation orchestrator
│   └── dalle.rs         # DALL-E API integration
├── tui/
│   └── mod.rs           # Ratatui TUI (setup, input, canvas, status)
└── exporter/
    └── mod.rs           # PNG export (image crate)

License

MIT