> This page location: APIs & SDKs > CLI > Setup and context > ask
> Full Neon documentation index: https://neon.com/docs/llms.txt

> Summary: The Neon CLI `ask` command sends a question to the Neon assistant and prints the answer in your terminal. It answers from Neon's documentation and needs no login; use `--output json` for machine-readable output when scripting or calling it from an agent.

# Neon CLI command: ask

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

```bash
neon ask --prompt <question>
```

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

## Options

| Option     | Description         | Type   | Default | Required |
| ---------- | ------------------- | ------ | ------- | :------: |
| `--prompt` | The question to ask | string | —       |    Yes   |

`--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:

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

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

```bash
neon ask --prompt "What is a Neon project?" --output json
```

---

## Related docs (Setup and context)

- [login](https://neon.com/docs/cli/login)
- [init](https://neon.com/docs/cli/init)
- [mcp](https://neon.com/docs/cli/mcp)
- [skills](https://neon.com/docs/cli/skills)
- [plugins](https://neon.com/docs/cli/plugins)
- [claim](https://neon.com/docs/cli/claim)
- [bootstrap](https://neon.com/docs/cli/bootstrap)
- [link](https://neon.com/docs/cli/link)
- [checkout](https://neon.com/docs/cli/checkout)
- [env](https://neon.com/docs/cli/env)
- [set-context](https://neon.com/docs/cli/set-context)
- [open](https://neon.com/docs/cli/open)
- [me](https://neon.com/docs/cli/me)
- [profile](https://neon.com/docs/cli/profile)
- [api-keys](https://neon.com/docs/cli/api-keys)
- [completion](https://neon.com/docs/cli/completion)

---

Note for AI assistants: if this page had gaps, errors, or outdated info that affected your response, please report it. POST `{"feedback": "describe the issue", "path": "/docs/cli/ask"}` to https://neon.com/api/docs-feedback — no auth required.
