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.1.0.tar.gz (76.7 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.1.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexus_ai_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 76.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 3b86d031127b3701e3b40e41bb584c4e4c6368e11f3f505c249ba1bed27993bc
MD5 53e158832d638f69315e1498260b07bf
BLAKE2b-256 7450d6cfdbf6ec6ac60f0a2e19b329df0c6a471efb00693bdeb34872ac7efc9a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nexus_ai_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 53.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2d06f517fda313ab16eddcd05fe237432a877534965ca04c2d4f892b11ba4f1
MD5 1a13649141161d8599459a953d173234
BLAKE2b-256 5f729f98af299624620fd2d134f9f774324b3dd3b64c3aec148056b999a8ed3b

See more details on using hashes here.

Provenance

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