Zenith

January 27, 2026 · View on GitHub

A pragmatic terminal-based API and utility for interacting with Large Language Models (LLMs). Zenith is designed to be directly usable from the shell and to act as the LLM backend for other tooling, most notably nucleus-shell.


Overview

Zenith provides:

  • A single executable CLI (zenith) for querying LLMs from the terminal
  • Chat history persistence on disk
  • Support for multiple models via OpenRouter
  • A Wikipedia fallback mode when AI is disabled
  • Simple integration as a backend service for shell-based tools

This project intentionally favors minimal dependencies and shell interoperability over heavy SDK usage.


Requirements

  • C++17-compatible compiler
  • CMake ≥ 3.16
  • curl
  • jq
  • A POSIX-compatible shell environment
  • An OpenRouter API key

Configuration

Important

  • Only OpenRouter-hosted LLMs are supported for remote inference.
  • Zenith is used as the LLM backend for nucleus-shell.

Installation

Using cmake:

cmake -S . -B build
cmake --build build

or using g++ directly:

mkdir build; g++ src/main.cpp -o build/zenith

or using the install script (directly installs to /usr/bin):

./install.sh

The resulting binary will be available as:

./build/zenith

Usage

Usage: zenith [--ai|-a] [--new|-n <chatname>] [--chat|-c <existingChatName>] [--model|-m <model>] [--api|--bearer <apikey>] "<query>"

Options

  • --ai, -a Enable LLM-backed responses. If omitted, Zenith falls back to Wikipedia search.

  • --new <chatname> Create and switch to a new chat session.

  • --chat <chatname> Continue an existing chat session.

  • --model <model> Specify the OpenRouter model to use (default: gpt-4o-mini).

  • --api, --bearer Specify the api key

Examples

# Wikipedia lookup
zenith "quantum computing"

# Start a new AI chat
zenith -a --new research "Explain transformers"

# Continue an existing chat with a specific model
zenith -a --chat research --model gpt-4o "Give a concrete example"

Data Storage

Chat histories are stored locally at:

~/.config/zenith/chats/<chatname>.txt

Each entry is timestamped and appended sequentially.


Notes on Local Models

Basic support exists for local models such as llama or gpt4all if available in $PATH. This behavior is experimental and may require manual adjustment depending on your local runtime.


License

MIT License

Copyright (c) 2026 Zepyx