@justmpm/gpt-banana
v0.2.3
Published
CLI for generating images via ChatGPT using browser automation
Maintainers
Readme
GPT Banana CLI
Generate images via ChatGPT (DALL-E) directly from your terminal.
Installation
# Clone and install
git clone https://github.com/kodaai/gpt-banana.git
cd gpt-banana
npm install
npm run build
# Install globally
npm linkUsage
# Login to ChatGPT (first time)
gpt login
# Generate an image
gpt generate "A futuristic logo with neon colors" -o logo.png
# Check status
gpt doctorCommands
| Command | Description |
|---------|-------------|
| gpt login | Login to ChatGPT (opens browser) |
| gpt generate <prompt> -o <path> | Generate and save image |
| gpt doctor | Check installation status |
| gpt --help | Show help |
| gpt --version | Show version |
Examples
# Simple generation
gpt generate "A cat astronaut in space" -o cat.png
# With path
gpt generate "Modern logo with blue gradient" --output ./assets/logo.png
# Complex prompt
gpt generate "A minimalist app icon for a meditation app, soft purple colors, rounded corners" -o icon.pngRequirements
- Node.js >= 18
- Chrome browser installed
- ChatGPT Plus/Pro subscription (for DALL-E access)
How It Works
- Login: Opens Chrome, you log in to ChatGPT, session is saved
- Generate: Opens browser with saved session, sends prompt, downloads image
- Session persists: No need to login every time
Data Storage
- Chrome profile:
~/.gpt-banana/chrome-profile/ - Session info:
~/.gpt-banana/session.json
Troubleshooting
# Check status
gpt doctor
# If login expired, run again
gpt login
# If browser issues, delete profile and re-login
rm -rf ~/.gpt-banana/chrome-profile
gpt loginLicense
MIT - Koda AI Studio
