Skip to main content

Ultra-minimal multi-provider AI framework

Project description

Nexus AI

Ultra-minimal multi-provider AI CLI framework.

Available on PyPI as nexus-ai-cli

Features

  • Unified Interface: Single CLI for OpenAI, Anthropic, Ollama, and OpenRouter
  • Session Management: Persistent conversations with search and export
  • Prompt Library: Save and reuse system prompts
  • Smart Defaults: Interactive model selection and fuzzy search
  • Streaming Output: Real-time response streaming

Installation

Quick Install (Recommended)

pipx install nexus-ai-cli

pipx creates an isolated environment for Nexus AI, preventing conflicts with other Python packages.

Alternative Installation Methods

Using pip:

pip install nexus-ai-cli

Development install:

git clone https://github.com/saadiqhorton/nexus-ai.git
cd nexus-ai
pip install -e .

Updating

pipx upgrade nexus-ai-cli
# or
pip install --upgrade nexus-ai-cli

System Requirements

  • Python 3.8 or higher
  • API keys for at least one AI provider (OpenAI, Anthropic, or OpenRouter)
  • Ollama users: Ollama server running at http://localhost:11434

Environment Setup

Copy the example environment file and add your API keys:

cp .env.example .env

Required environment variables (set at least one provider):

Variable Description
OPENAI_API_KEY OpenAI API key
ANTHROPIC_API_KEY Anthropic API key
OPENROUTER_API_KEY OpenRouter API key

For local Ollama, no API key is needed - just ensure the server is running at http://localhost:11434.

Quick Start

# Use default model
nexus "your prompt"

# Specify model
nexus -m gpt-4o "your prompt"

# Include file contents
nexus -f file.txt "explain this"

# Pipe content
cat file.txt | nexus "summarize"

# Interactive chat
nexus chat --session myproject

Commands

Command Description
nexus "prompt" Send a prompt
nexus chat Interactive REPL
nexus models List available models
nexus providers Show configured providers
nexus config Display configuration
nexus -d [model] Set default model
nexus sessions Manage conversations
nexus prompts Manage prompt library
nexus completion Setup shell completion

Configuration

Config stored at ~/.nexus/config.yaml:

providers:
  openai:
    api_key: ${OPENAI_API_KEY}
  anthropic:
    api_key: ${ANTHROPIC_API_KEY}
  ollama:
    base_url: http://localhost:11434
  openrouter:
    api_key: ${OPENROUTER_API_KEY}

defaults:
  provider: openai
  model: gpt-4o
  temperature: 0.7
  max_tokens: 2000
  stream: true

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run tests with Ollama integration
NEXUS_OLLAMA_URL=http://localhost:11434 pytest

# Linting
ruff check .
ruff format .

Architecture

nexus/
├── cli/           # Click CLI commands
├── core/          # App, ProviderManager, CompletionHandler
├── providers/     # AI provider implementations
├── config/        # ConfigManager and models
├── session/       # Session persistence
├── prompts/       # Prompt library
└── utils/         # Cache, logging, errors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_ai_cli-0.4.0.tar.gz (85.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_ai_cli-0.4.0-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

Details for the file nexus_ai_cli-0.4.0.tar.gz.

File metadata

  • Download URL: nexus_ai_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 85.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexus_ai_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2c2a267b77c052c5254ee3e4cd59cba1bca23e33fdb2c9159ee9648589c9823f
MD5 c9c2a97cce26066f640bdb3df9350001
BLAKE2b-256 3023dd9e377865adc7ec0edebb5ef16ede92ecedd0e05b85f484b70530c0aafd

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexus_ai_cli-0.4.0.tar.gz:

Publisher: publish.yml on saadiqhorton/nexus-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nexus_ai_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: nexus_ai_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nexus_ai_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b62768fda64a6eb5bdc6c2b0be427ecfa879e1dc78843bd216965f4a0ba9e840
MD5 41ac618c9a592d936b234b48fc3fc47b
BLAKE2b-256 773e50fedbaaf493dc46fa3a4ac652ed116133e9eb8228d2f5da59fbf9102f82

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexus_ai_cli-0.4.0-py3-none-any.whl:

Publisher: publish.yml on saadiqhorton/nexus-ai

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page