본문으로 건너뛰기

Grida CLI

Discover models, generate media, and keep the files in your own workflow. Desktop does not need to be running.

Preview channel: next. Installation requires a published next version; check npm's versions and tags for availability. Before that tag exists, the command below cannot install the preview. The legacy latest package does not provide these commands.

Install

Use Node.js 24 or later:

npm install -g grida@next

Stored credentials currently support macOS and Linux. Windows users can supply BYOK through explicit environment variables or stdin; durable account login is not supported there yet.

Generate your first image

Bring an OpenRouter API key and enter it at the hidden prompt:

grida providers configure openrouter
grida models list --provider openrouter --modality image --available
grida generate --provider openrouter --model openai/gpt-image-2 \
--prompt "A blue ceramic teapot on a warm neutral background" --out ./image

Generation sends your input to the selected provider and may incur charges on that provider account. ./image must not already exist. A successful command saves media and receipt.json, then prints their paths.

BYOK needs no Grida login. Provider credentials explains storage and overrides. Grida login and account credits describe the separate account path required by GG.

Find the right command

TaskGuide
Sign in and manage a Grida sessionAuth
Inspect memberships and cached creditsAccount
Configure your own provider keysProviders
Discover models and accepted inputsModels
Generate media and chain local filesGenerate
grida --version
grida --help
grida docs generate

--help describes your installed version and works offline. docs prints a guide URL without opening a browser; reading the guide needs a connection. These pages describe the next preview. Agent, render, and MCP commands are deferred.

Use Grida in scripts

Use --json where supported for one structured result on stdout; diagnostics go to stderr. Errors have error.code and error.message. Exit codes are 0 for success, 1 for operation failure, and 2 for invalid usage. Signed-out auth status and logout with unconfirmed remote revocation return 1.

--no-input prevents terminal questions where supported. It does not suppress OS keyring dialogs. Interactive login rejects --json and --no-input. Never put a key itself in a command argument.

Generation does not automatically retry a possibly accepted paid request. Check errors and saved paths before deciding to submit again.