We ran the same workload through 42 models via AI Gateway and compared costs
/APIs & SDKs/Setup and context/ask

Neon CLI command: ask

new

Ask the Neon assistant a question from the terminal

The ask command sends a question to the Neon assistant and prints the answer to your terminal: neon ask --prompt "<question>". The assistant answers from Neon's documentation, so keep questions scoped to Neon and Lakebase Postgres rather than general chat. No login is required, and it doesn't touch your projects or account.

The answer is natural-language text, not structured data. By default it streams as markdown, use --output json to get the answer back as a single text field you can parse.

Usage

neon ask --prompt <question>

Pass your question with --prompt. It's the only required option.

Options

OptionDescriptionTypeDefaultRequired
--promptThe question to askstringYes

--output json and --output yaml both return the full answer at once as a single text field, instead of streaming markdown.

Examples

Ask a question:

neon ask --prompt "How do schema-only branches work?"

Get the answer as JSON so you can process it in a script:

neon ask --prompt "What is a Neon project?" --output json
Was this page helpful?
Edit on GitHub

On this page

Copy neon init command