Skip to main content

Prerequisites

Git

Required to clone the repository and for Go to download dependencies.

Go 1.25+

Only needed for go install or building from source.

API Key or OAuth

An API key from an LLM provider or an account with an active plan for OAuth.

1. Installation


2. Configure a Provider

Create a .env file in your home directory or in the project root.
LLM_PROVIDER=OPENAI
OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

# (Optional) Specific model — default: gpt-4o-mini
# OPENAI_MODEL="gpt-4o"
You only need to configure the providers you plan to use. ChatCLI automatically detects which ones are available based on the keys found.

Additional Environment Variables

VariableDescriptionDefault
CHATCLI_DOTENVCustom path for the .env file.env
CHATCLI_LANGForce a specific language (e.g., pt-BR, en)Auto-detected
LOG_LEVELLog level: debug, info, warn, errorinfo
ENVLog mode: dev (terminal + file), prod (file only)dev
MAX_RETRIESMaximum retries for API calls5
For the complete list of variables, see the Environment Variables Reference.

3. Verify the Installation

1

Check the version

chatcli --version
2

Check the active configuration

chatcli
# Inside interactive mode:
/config
3

Ask your first question

What is the Dirac equation?
If you get a response from the AI, congratulations! ChatCLI is ready to use.

Next Steps