Skip to content

Documentation / Integrations

Chat in the terminal

The opendb chat command opens the same conversation as the web interface, with its artifacts, its approvals and sixteen slash commands.

Start a conversation

Terminal
opendb chat

OpenDB asks you to log in, then to pick a project and a model if there are several. The conversation stays open until you leave it.

Ask a single question

Give the question as an argument: OpenDB answers and hands control back.

Terminal
opendb chat "How many orders this month?" --project=shop

Options

Option Purpose
--project= The project's name or identifier
--model= The model that answers, in provider/model format
--conversation= The identifier of a conversation to resume
--name= The username to log in with. The password is always asked for.
Terminal
opendb chat --project=shop --model=ollama/qwen3:4b

What is shown

  • The model's text and reasoning, as they come.
  • SQL and code, in color.
  • Artifacts, rendered as text: result tables, key figures, horizontal bar charts, profiles, record sheets, execution plans, diagrams.
  • A link to the conversation in the web interface, for what a terminal cannot show.

When you resume a conversation, its earlier messages are printed again.

Slash commands

Type / to use a command.

Conversations

Command Purpose
/new Start a new conversation
/conversations Resume a conversation. Add a word to search.
/rename Rename the conversation
/archive Archive the conversation
/delete Delete the conversation

Answer settings

Command Purpose
/model Switch model
/mode Switch database access mode
/effort Change the reasoning effort
/retry Ask for the last answer again

Message

Command Purpose
/multi Write a message over several lines
/attach Attach a file to the next message. /attach clear removes attached files.

Artifacts

Command Purpose
/open Show an artifact in full. Add its number.
/csv Export a table as CSV. Add its number.

Miscellaneous

Command Purpose
/clear Clear the screen
/help Show the help
/quit Quit

Approvals

When an operation needs your approval, OpenDB stops and presents the approvals one by one. You see the query and its reason, then approve or reject, with an optional reason.

Creating a record and sending an email open a form in the terminal, as in the web interface. See Modes and approvals.

Keyboard

Key Effect
Ctrl + C Stops the answer in progress, immediately
Up and down arrows Walk through your earlier messages

Language

The terminal uses your system's language. The agent answers in that language.

When to prefer the terminal

  • You work on a server, over SSH.
  • You want a quick answer without leaving your shell.
  • You chain a question in a script.

The web interface remains better suited to browsing large tables, reading a chart or working on the schema.

Other commands

opendb chat is only one of OpenDB's commands. Settings, accounts, privileges and MCP tokens are also managed from the terminal. See the command reference.