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.3.0.tar.gz (77.0 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.3.0-py3-none-any.whl (53.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexus_ai_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 77.0 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.3.0.tar.gz
Algorithm Hash digest
SHA256 ce9ee6d326bf4c532751e57c4f920c908aab4370aea17e8bdb9164715f161f91
MD5 1acd9766d936a0341f6c1548c9aec09c
BLAKE2b-256 1f9fbdb76078a0c440647588776a07afdc1afe5701985eab14a56d5ed233034a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexus_ai_cli-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: nexus_ai_cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 53.3 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6164ed4aad16560d25ca16d527b3030ac9b5458525cf9cf779fe7f549b253b
MD5 b115a53e1d13cbe9a948913d7bcd187a
BLAKE2b-256 1639969d818685e9a143db42b89129567bc42ce7bbf2a6ff21ec6253e36a1c6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nexus_ai_cli-0.3.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