aichat
aichat is a powerful AI chat CLI that supports multiple providers via its OpenAI-compatible client configuration.
Prerequisites
- A running Corveil instance (see deployment options)
- A Corveil virtual API key (
sk-citadel-...) - aichat installed (
brew install aichatorcargo install aichat)
Mode
Direct mode only. aichat uses the OpenAI-compatible client type, which sends your Corveil key as the standard API key.
1. Configure aichat
Open your aichat config file. Run aichat --info to find its location, then add a Corveil client:
yaml
clients:
- type: openai-compatible
name: corveil
api_base: https://your-corveil-host/v1 # must include /v1
api_key: sk-citadel-your-key-here
models:
- name: or-claude-haiku-4.5
- name: or-gpt-5.1Replace your-corveil-host with your Corveil URL and sk-citadel-your-key-here with your virtual API key. List any models your key has access to — check GET /v1/models for the full list.
2. Start chatting
bash
# One-shot query
aichat -m corveil:or-claude-haiku-4.5 "Explain zero-trust architecture"
# Interactive session
aichat -m corveil:or-claude-haiku-4.5Troubleshooting
- 401 Unauthorized: Verify your
api_keymatches a valid Corveil virtual API key - Connection refused: Ensure your Corveil instance is running and the
api_baseURL is reachable - Model not found: Check that the model names match models available through your Corveil instance (
GET /v1/models) - Missing /v1 in URL: The
api_basemust include the/v1path suffix