CLI Reference
Every Pretty command with flags, defaults, and examples.
pretty
Start an interactive design session. With no arguments, opens the interactive prompt. With a prompt argument, starts a session with that prompt.
pretty # Interactive mode
pretty "Design a logo for Ember Coffee" # With prompt
pretty -p "Create a banner" # One-shot (non-interactive)| Flag | Description | Default |
|---|---|---|
-p, --print | Run once and exit (non-interactive) | false |
-m, --model | Image generation model | Server default |
-P, --project | Project name (created if doesn't exist) | default |
--api-url | API server URL | https://api.prettydraft.com |
--inline-images | Show inline image previews (Kitty/Ghostty/WezTerm) | Auto-detected |
Authentication
pretty login
Authenticate via browser or API key.
pretty login # Browser auth flow
pretty login --token pd_sk_your_key # Headless / CI| Flag | Description |
|---|---|
--token | API key for headless auth (skips browser) |
--api-url | API server URL |
pretty logout
Remove saved credentials.
pretty logoutpretty status
Show authentication status, API reachability, current project, and setup state.
pretty statusImage processing
pretty resize
Resize, crop, and reformat images.
pretty resize photo.png --width 800
pretty resize *.jpg --fit 1200x630
pretty resize hero.png --fill 1080x1080 --format jpg
pretty resize photos/ --scale 0.5 -r| Flag | Description | Default |
|---|---|---|
-w, --width | Target width in pixels | — |
-h, --height | Target height in pixels | — |
--fit | Fit within bounds (e.g. 1200x630) | — |
--fill | Fill bounds with crop (e.g. 1080x1080) | — |
--scale | Scale factor (e.g. 0.5) | — |
-f, --format | Output format: png, jpg, gif, tiff, bmp | Original |
-q, --quality | 1-100 or high/medium/low | — |
-o, --output | Output directory | ./output/ |
--pattern | Output naming pattern (e.g. {name}-thumb) | — |
-r, --recursive | Process directories recursively | false |
--in-place | Modify files in place | false |
--dry-run | Show what would happen | false |
--json | Output as JSON | false |
At least one sizing flag is required: --width, --height, --fit, --fill, or --scale.
pretty convert
Convert between image formats.
pretty convert logo.png --to jpg,webp
pretty convert input.png --to jpg,webp --html| Flag | Description | Default |
|---|---|---|
-t, --to | Target format(s), comma-separated (required) | — |
-q, --quality | 1-100 or high/medium/low | — |
-o, --output | Output directory | ./output/ |
-r, --recursive | Process directories recursively | false |
--html | Print <picture> HTML snippet | false |
--dry-run | Show what would happen | false |
--json | Output as JSON | false |
pretty compress
Reduce file sizes with smart compression. Works with JPEG and PNG.
pretty compress photos/*.jpg --quality medium
pretty compress hero.png --target 200kb
pretty compress images/ -r --in-place --dry-run| Flag | Description | Default |
|---|---|---|
-q, --quality | high, medium, low, lossless | — |
--target | Target file size (e.g. 200kb, 1mb) | — |
-o, --output | Output directory | ./output/ |
-r, --recursive | Process directories recursively | false |
--in-place | Compress files in place | false |
--dry-run | Show projected savings | false |
--json | Output as JSON | false |
pretty info
Show image metadata: dimensions, format, file size, color space, bit depth, alpha channel, and DPI.
pretty info photo.png
pretty info *.jpg --json| Flag | Description |
|---|---|
--json | Output as JSON |
pretty palette
Extract color palettes from images.
pretty palette photo.jpg
pretty palette brand.png --colors 8 --format css
pretty palette hero.png --format tailwind
pretty palette brand.png --save # Save to DESIGN.md Brand section
pretty palette brand.png --format swatch # Render a PNG swatch image| Flag | Description | Default |
|---|---|---|
-n, --colors | Number of colors (1-20) | 5 |
-f, --format | text, css, tailwind, tokens, swatch | text |
--save | Write palette to the ## Brand section of DESIGN.md | false |
--json | Output as JSON | — |
The swatch format renders a palette-swatch.png image with each color displayed side by side.
pretty favicon
Generate a complete favicon set from a source image.
pretty favicon logo.png
pretty favicon icon.svg --theme-color "#2563eb" -o public/Generates: favicon.ico, favicon-16x16.png, favicon-32x32.png, favicon-192x192.png, favicon-512x512.png, apple-touch-icon.png, and site.webmanifest.
| Flag | Description | Default |
|---|---|---|
--theme-color | Theme color for manifest | — |
--bg-color | Background color for manifest | — |
-o, --output | Output directory | ./output/favicons/ |
--dry-run | Show what would be generated | false |
--json | Output as JSON | false |
Project management
pretty init
Link the current directory to a project.
pretty init my-brand # Link to "my-brand" project
pretty init # Link to "default" projectCreates .pretty/project.json in the current directory.
pretty version
Show version and check for updates.
pretty versionpretty update
Update Pretty to the latest version.
pretty updateInteractive commands
These commands are available inside the interactive prompt (when you run pretty with no -p flag):
| Command | Description |
|---|---|
/help | Show all available commands |
/clear | Clear conversation and start fresh |
/quit | Exit Pretty |
/history | Show recent command history |
/files [dir] | List files in working directory |
/model [name] | Show or switch image model (fast, quality, default) |
/context | Show loaded design context and prompt sources |
Agent tools
During interactive sessions, the agent can run image processing commands (resize, convert, compress, info, palette, favicon) as tools. This means you can ask the agent to perform deterministic image operations as part of a conversation — for example, "resize all the PNGs in this folder to 800px wide" — and the agent will invoke the CLI commands directly.
File references
Type @filename in any prompt to include a file as context. Autocomplete is supported after the @ character.
> Redesign @mockup.png with more contrast and warmer colorsKeyboard shortcuts
| Key | Action |
|---|---|
Ctrl+C | Cancel current generation (double-tap to exit) |
Escape | Cancel current generation |
Up/Down | Navigate command history |
Tab | Accept autocomplete suggestion |
Shift+Enter | New line in editor |