MiniLemon from your terminal

Generate AI images from the command line

Use the MiniLemon CLI to authenticate, list models, run focused image apps, generate images, wait for tasks, and download results from scripts or AI agents.

Terminal

Connected to MiniLemon MCP

JSON ready
$ minilemon generate \
  --prompt "A clean studio product photo" \
  --aspect-ratio 1:1 \
  --wait \
  --download ./outputs \
  --json
The CLI returns stable JSON for agents and predictable exit codes for automation.

Install

One binary for image automation

After the npm package is published, install it globally and sign in once. The CLI stores credentials in your user config directory and reuses them for future commands.

npm install -g @minilemon/cli
minilemon auth login
Local development

Before publishing, run it from source with bun run cli -- help or build with bun run build:cli.

Workflows

Built for scripts, agents, and repeatable image work

Agent-friendly JSON

Use --json for stable machine-readable output and predictable error codes in scripts or agent workflows.

Generate from scripts

Create images from prompts or focused image apps without opening the browser.

Download outputs

Save completed images locally by task, recent image id, or direct image URL.

OAuth built in

The CLI uses Dynamic Client Registration and stores credentials per MCP endpoint.

Commands

Start with the common path

Learn about MCP

Sign in

Authorize the CLI with OAuth, PKCE, and your MiniLemon account.

minilemon auth login

Check access

Verify saved credentials before running automated jobs.

minilemon auth status --check --json

List models

Inspect available image models, quality levels, and limits.

minilemon models list --json

Generate

Start a task, wait for completion, and return JSON output.

minilemon generate --prompt "Clean studio product photo" --aspect-ratio 1:1 --wait --json

Publish checklist

The CLI is already structured like a small npm package. These are the remaining release steps before the public install command goes live.

Remove private: true from packages/cli/package.json when you are ready for public npm distribution.

Run the CLI readiness checks: typecheck, lint, build, no-auth smoke tests, OAuth login, MCP tools, models, apps, and recent images.

Run npm pack --dry-run --workspace @minilemon/cli and inspect the tarball contents.

Publish the first scoped public release with npm publish --access public --workspace @minilemon/cli.

Use npm 2FA, a granular token with bypass 2FA, or trusted publishing from CI.