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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c2a267b77c052c5254ee3e4cd59cba1bca23e33fdb2c9159ee9648589c9823f
|
|
| MD5 |
c9c2a97cce26066f640bdb3df9350001
|
|
| BLAKE2b-256 |
3023dd9e377865adc7ec0edebb5ef16ede92ecedd0e05b85f484b70530c0aafd
|
Provenance
The following attestation bundles were made for nexus_ai_cli-0.4.0.tar.gz:
Publisher:
publish.yml on saadiqhorton/nexus-ai
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus_ai_cli-0.4.0.tar.gz -
Subject digest:
2c2a267b77c052c5254ee3e4cd59cba1bca23e33fdb2c9159ee9648589c9823f - Sigstore transparency entry: 789792635
- Sigstore integration time:
-
Permalink:
saadiqhorton/nexus-ai@23919a74e412a3f4f1833f613e247f8480701ab3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/saadiqhorton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23919a74e412a3f4f1833f613e247f8480701ab3 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b62768fda64a6eb5bdc6c2b0be427ecfa879e1dc78843bd216965f4a0ba9e840
|
|
| MD5 |
41ac618c9a592d936b234b48fc3fc47b
|
|
| BLAKE2b-256 |
773e50fedbaaf493dc46fa3a4ac652ed116133e9eb8228d2f5da59fbf9102f82
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus_ai_cli-0.4.0-py3-none-any.whl -
Subject digest:
b62768fda64a6eb5bdc6c2b0be427ecfa879e1dc78843bd216965f4a0ba9e840 - Sigstore transparency entry: 789792639
- Sigstore integration time:
-
Permalink:
saadiqhorton/nexus-ai@23919a74e412a3f4f1833f613e247f8480701ab3 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/saadiqhorton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@23919a74e412a3f4f1833f613e247f8480701ab3 -
Trigger Event:
workflow_dispatch
-
Statement type: