ramalama-chat(1)

πŸ“¦
version 0.25.0 Β· 4 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

✨ ramalama-chat ✨

okay bestie, gather round β€” this is the ramalama-chat page from the General Commands Manual, and it's literally about chatting with an OpenAI-compatible REST API from your terminal. main character energy fr fr πŸ’…


🌸 NAME 🌸

ramalama-chat β€” OpenAI chat with the specified REST API URL πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

ramalama chat [options] [arg...]

positional arguments:

  • ARGS β€” overrides the default prompt, and the output is returned without entering the chatbot (unless --interactive is specified) πŸ‘‘

✨ DESCRIPTION ✨

So basically, you're chatting with an OpenAI REST API. By default, if you hand it arguments or pipe stuff in via stdin, it shows you the response and then dips out (exits). 🌈

But if you want to keep the conversation going, hit --interactive and it'll stay in an interactive chat session after it finishes processing that initial prompt. no cap 🫢


πŸ’– OPTIONS πŸ’–

  • --api-key β€” OpenAI-compatible API key πŸ”‘. You can also set it with the RAMALAMA_API_KEY environment variable instead.
  • --color β€” whether or not to use color in the chat 🎨. Possible values are "never", "always" and "auto". (default: auto)
  • --help, -h β€” shows this help message and exits 🫑
  • --interactive, -i β€” keeps you in interactive chat mode after it processes stdin or prompt arguments πŸ’¬. By default, when arguments or piped input are provided, the command exits after displaying the response. This flag lets you keep chatting interactively instead of getting abandoned mid-convo 😭
  • --list β€” lists the available models at an endpoint πŸ“‹
  • --max-tokens=integer β€” maximum number of tokens to generate. Set it to 0 for unlimited output (default: 0). 🌊
  • --mcp=SERVER_URL β€” MCP (Model Context Protocol) servers to use for enhanced tool calling capabilities πŸ› οΈ. You can specify it multiple times to connect to multiple MCP servers. Each server provides tools that can be automatically invoked during chat conversations. lowkey iconic
  • --model=MODEL β€” model for inferencing 🧠 (may not be required for endpoints that only serve one model)
  • --prefix β€” prefix for the user prompt (default: 🦭 > ) 🦭
  • --rag=path β€” a file or directory of files to be loaded and provided as local context in the chat history πŸ“š
  • --summarize-after=N β€” automatically summarize conversation history after N messages to prevent context growth πŸ“‰. When enabled, ramalama will periodically condense older messages into a summary, keeping only recent messages and the summary. This prevents the context from growing indefinitely during long chat sessions. Set to 0 to disable (default: 4).
  • --temp=float β€” temperature of the response from the AI Model 🌑️. Lower numbers are more deterministic, higher numbers are more creative. pick your vibe bestie
  • --url=URL β€” the host to send requests to (default: http://127.0.0.1:8080) 🌐

🧚 INTERACTIVE COMMANDS 🧚

When you're running in interactive chat mode, these commands are available. All commands are case-insensitive (e.g., /CLEAR, /Clear, and /clear all work). πŸ’…

  • /help, help, ? β€” displays help information showing all available commands and their descriptions πŸ†˜
  • /clear β€” clears the conversation history without exiting the chat session 🧹. This resets the context and lets you start a fresh conversation without restarting the container or connection. A confirmation message will be displayed when the history is cleared.
  • /bye, exit β€” exits the chat session and closes the connection πŸ‘‹
  • /tool [question] β€” (Only available when using --mcp) manually select which MCP tool to use for a question πŸ› οΈ. Without this command, the AI automatically decides whether to use tools based on the question.
  • Ctrl + D β€” exits the chat session (EOF signal) πŸšͺ

πŸ”₯ EXAMPLES πŸ”₯

Communicate with the default local OpenAI REST API. (http://127.0.0.1:8080) With Podman containers. 🦭

$ ramalama chat
🦭 >

Communicate with an alternative OpenAI REST API URL. With Docker containers. πŸ‹

$ ramalama chat --url http://localhost:1234
πŸ‹ >

Send multiple lines at once

$ ramalama chat
🦭 > Hi
🦭 > tell me a funny story
🦭 > please

Send an initial prompt via stdin and continue chatting

$ echo "What is 2+2?" | ramalama chat --interactive
4
🦭 > Now multiply that by 3
12
🦭 > /bye

Clear conversation history during a chat session (commands are case-insensitive)

$ ramalama chat
🦭 > What is 2+2?
4
🦭 > /CLEAR
Conversation history cleared.
🦭 >

🌈 SEE ALSO 🌈


πŸ’œ HISTORY πŸ’œ

Jun 2025, Originally compiled by Dan Walsh dwalsh@redhat.com ⟨mailto:dwalsh@redhat.com⟩ ✨


and that's the whole page bestie, ramalama-chat(1) from the General Commands Manual β€” go forth and chat, you absolute icon πŸ‘‘πŸ¦‹πŸ’–

πŸ“¦ where this page comes from