Skip to content

mattstyles333/openaur

Repository files navigation

openaur 🐧

Give your AI a memory and a shell.
openaur makes AI assistants personal by adding persistent memory, Linux system access, and an empathy engine—all safely sandboxed in Docker.

License: MIT Python 3.11+ FastAPI Docker

# One-line installer
curl -fsSL https://raw.githubusercontent.com/mattstyles333/openaur/master/install.sh | bash

Or manually:

git clone https://github.com/mattstyles333/openaur.git && cd openaur
cp .env.example .env
# Edit .env and add your OPENROUTER_API_KEY
docker-compose up -d

What is openaur?

LLMs are incredible at reasoning, but they have a major limitation: they don't know you. Every conversation starts from scratch. They can't see your system, remember your preferences, or actually do things on your behalf.

openaur bridges that gap.

It's a self-hosted AI assistant that:

  • 🧠 Remembers everything - Conversations, preferences, system state via OpenMemory
  • 🐧 Works with your Linux system - Install packages, run commands, manage services
  • 💬 Adapts to your mood - Empathy engine adjusts tone based on sentiment
  • 🔒 Runs in a sandbox - Docker container keeps your host system safe
  • 🔌 Works with any LLM - OpenRouter integration (Claude, GPT-4, DeepSeek, etc.)

Think of it as giving your favorite LLM a long-term memory and a bash shell, wrapped in a nice API.


Why openaur?

The Problem with Today's AI Assistants

You know the drill. You spend 20 minutes explaining your nginx setup to Claude or ChatGPT, it gives you great advice, you fix the issue. A week later, same problem happens. You open a new chat and... start from zero. It doesn't remember your config, your architecture, or that conversation.

openaur solves this. It persists context across sessions, so your AI actually learns about you and your systems over time.

Compared to OpenClaw

OpenClaw pioneered local-first AI agents—but openaur extends that vision specifically for Linux system integration and memory persistence.

Capability OpenClaw openaur
Philosophy Local-first AI agent Personal AI with memory + Linux tools
Cognitive Memory Limited session context Persistent SQLite-backed memory
System Access Basic file operations Full Arch Linux + AUR package management
Terminal Integration Standard CLI Tmux-based async execution
Emotional Adaptation No Sentiment-aware empathy engine
Package Management No Native AUR integration via yay
Action Discovery Manual tool registration Auto-crawl CLI documentation
Sandboxing Local execution Docker container isolation

Choose OpenClaw if: You want a lightweight, general-purpose local AI agent.

Choose openaur if: You want an AI that knows your Arch Linux system, remembers everything about your setup, and can actually manage packages and run commands for you.


Key Features

🧠 Cognitive Memory (OpenMemory)

Unlike cloud AI that forgets when you close the tab, openaur remembers:

  • Conversations - Context across sessions
  • Preferences - How you like things configured
  • System state - What packages are installed, your configs
  • CLI tools - Every command you've taught it
# Example: Month 1
User: "I need to analyze nginx logs"
openaur: "I see you have nginx installed. Checking /var/log/nginx/error.log..."

# Month 3, same user
User: "That nginx issue again"
openaur: "Looking at your nginx setup... same config from March? 
           Let me check if that SSL cert renewal script I wrote for you is still working."

🐧 Arch Linux Native

Built for Arch users who live in the terminal:

  • AUR support - Install any package via yay
  • System-aware - Knows what's installed
  • Tmux execution - Run long tasks async
  • Auto-discover - Crawls man pages to learn your tools
# Make openaur aware of your tools
make crawl BINARY=git
make crawl BINARY=docker
make crawl BINARY=your-custom-script

# Now it can help you use them
make chat MSG="What's the safest way to rewrite my last 3 git commits?"

Recommended CLI tools to register:

# Cloud & Infrastructure
make crawl BINARY=aws          # AWS CLI
make crawl BINARY=kubectl      # Kubernetes
make crawl BINARY=terraform    # Infrastructure as code

# Development Tools  
make crawl BINARY=gh           # GitHub CLI
make crawl BINARY=opencode     # AI coding agent
make crawl BINARY=playwright   # Browser automation

# Security & Secrets
make crawl BINARY=op           # 1Password CLI

# System & Package Management
make crawl BINARY=yay          # AUR helper
make crawl BINARY=systemctl    # systemd services

💬 Empathy Engine

Analyzes your sentiment and adapts:

  • Frustrated? → Calm, step-by-step guidance
  • Excited? → Matches your energy
  • Confused? → Patient explanations with examples
  • Focused? → Concise and technical
curl http://localhost:8000/heart
# { "mood": "focused", "empathy_level": 0.8 }

🔒 Docker Sandbox

Everything runs in containers:

  • ✅ Your API keys stay local
  • ✅ Can't accidentally break your host system
  • ✅ Easy to wipe and restart
  • ✅ Network isolated by default

Quick Start

Prerequisites

30-Second Setup (Automated)

curl -fsSL https://raw.githubusercontent.com/mattstyles333/openaur/master/install.sh | bash

The installer will:

  • Check prerequisites (Docker, Docker Compose)
  • Ask for your OpenRouter API key
  • Clone the repository
  • Build and start containers
  • Verify everything is working
# 1. Clone
git clone https://github.com/mattstyles333/openaur.git
cd openaur

# 2. Configure
cp .env.example .env
# Edit .env: OPENROUTER_API_KEY=your_key_here

# 3. Start
docker-compose up -d

# 4. Test
make test
# ✅ Health check passed

First Conversation

make chat MSG="What can you help me with?"

# Or register a tool first
make crawl BINARY=git
make chat MSG="How do I undo my last commit safely?"

Example Interaction

$ openaur chat

╔═══════════════════════════════════════════════════════════╗
║         Personal AI Assistant with Arch Linux              ║
╚═══════════════════════════════════════════════════════════╝

You: My nginx is broken after the update

openaur: I see you're frustrated. Let me check your setup...

🔍 Found: nginx 1.25.3 (installed via pacman)
📄 Config: /etc/nginx/nginx.conf (modified 2 days ago)
📊 Last conversation: "Setting up SSL certificates" (3 weeks ago)
⚠️  Error in config: worker_connections exceeds limit

I remember you prefer fixing root causes over band-aids. 
The issue is your nginx config expects more connections than 
your system allows. Two options:

1. Lower worker_connections in nginx.conf (quick fix)
2. Increase system limits in /etc/security/limits.conf (proper fix)

Which would you prefer? I can apply either.

API Endpoints

OpenAI-compatible + custom extensions:

Endpoint Description
/v1/chat/completions OpenAI-compatible chat
/chat Enhanced with memory & empathy
/memory/query Search your memory
/packages/search Find Arch/AUR packages
/packages/install Install packages
/actions/crawl Learn a CLI tool
/agents/spawn Run task in background
/heart Empathy status

Full API docs →


Common Use Cases

Arch Linux Users

# "Find me a terminal with GPU support"
make search QUERY=alacritty

# "What broke after my update?"
make chat MSG="Check pacman.log for errors from yesterday"

Developers

# "How do I squash these commits?"
make chat MSG="Interactive rebase last 3 commits"

# "Review this code"
make chat MSG="Check src/main.py for issues"

DevOps

# "Check all my services"
make chat MSG="Which systemd services are failing?"

# Background task
openaur agents spawn server-monitor

Architecture

┌─────────────────────────────────────────────────────────────┐
│   Docker Container (sandboxed)                              │
│                                                             │
│   ┌────────────┐    ┌───────────┐    ┌──────────────────┐   │
│   │  FastAPI   │───▶│  Gateway  │───▶│  OpenRouter LLM  │   │
│   │   Server   │    │           │    │  (Claude/GPT-4)  │   │
│   └────────────┘    └───────────┘    └──────────────────┘   │
│          │                                                  │
│          ▼                                                  │
│   ┌────────────┐    ┌───────────┐    ┌──────────────┐     │
│   │ OpenMemory │    │   yay     │    │    tmux      │     │
│   │  (SQLite)  │    │  (AUR)    │    │  (async)     │     │
│   └────────────┘    └───────────┘    └──────────────┘     │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Components:

  • FastAPI - REST API server
  • OpenRouter - Access to best LLMs (Claude, GPT-4, etc.)
  • OpenMemory - Persistent cognitive layer
  • yay - Arch/AUR package management
  • tmux - Background task execution
  • Empathy Engine - Sentiment analysis

CLI Usage

# Server
openaur server start      # Start containers
openaur server logs       # View logs

# Chat
openaur chat              # Interactive mode
openaur chat "message"    # One-shot

# Packages
openaur packages search <query>
openaur packages install <name>

# Actions (CLI registry)
openaur actions crawl <binary>
openaur actions list

# Development
ruff check . && ruff format .  # Lint & format

Configuration

.env file:

# Required
OPENROUTER_API_KEY=your_key_here

# Optional
DEBUG=false
OPENMEMORY_DB_PATH=./data/openmemory.db

Development

# Build locally
make build

# Run with logs attached
make run-logs

# Reset everything
make reset-db

# Run tests
make test

Contributing

Contributions welcome! See AGENTS.md for code guidelines.

  1. Fork it
  2. Branch: git checkout -b feature/cool-thing
  3. Commit: git commit -m 'Add cool thing'
  4. Push: git push origin feature/cool-thing
  5. PR it

Roadmap

  • Web UI (no CLI required)
  • Plugin system
  • Voice interface
  • More distros (Ubuntu, Fedora)
  • Kubernetes deployment
  • Team/multi-user support

License

MIT - See LICENSE


Acknowledgments

openaur stands on the shoulders of giants:

Core Stack

Terminal & UI

  • Rich - Beautiful terminal formatting
  • Open WebUI - Web interface companion

AI & Memory

System Tools

  • tmux - Terminal multiplexer for async tasks
  • yay - AUR helper for package management
  • Arch Linux - Foundation OS
  • Docker - Container sandbox
  • psutil - System monitoring

Python Ecosystem

To all open source maintainers: thank you for sharing your work.


Questions?

⭐ Star this repo if you find it useful!

About

Personal AI Assistant with Arch Linux Action Registry & OpenMemory

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors