Docs / Getting Started

PowerAI Documentation

PowerAI is an invisible, local-first cognitive AI harness designed for modern terminals (macOS, Linux, and Windows).

Introduction

PowerAI transforms your standard terminal into an intelligent assistant without sending any keystrokes or environment data over the internet. Running on top of Ollama, it translates natural language requests into exact executable CLI commands, understands output buffers, and auto-corrects command typos on the fly.

100% Local Execution

All inferences occur locally on your machine via Ollama with Metal GPU (macOS) or CUDA acceleration (Linux/Windows). Zero telemetry is collected.

Installation

Install PowerAI in one step using the official automated installer for your platform:

macOS & Linux (Zsh / Bash)

Terminal
curl -fsSL https://raw.githubusercontent.com/Luizhcrs/powerai/main/install.sh | bash

Windows (PowerShell 5.1 / 7+)

PowerShell
irm https://raw.githubusercontent.com/Luizhcrs/powerai/main/install.ps1 | iex

Ollama Setup & Models

PowerAI connects to Ollama running locally on port 11434. If you haven't installed Ollama yet, download it from ollama.com.

Recommended lightweight local models:

Terminal
# Default lightweight model (2.0 GB) ollama run llama3.2 # Highly recommended for advanced code/CLI reasoning (4.7 GB) ollama run qwen2.5-coder:7b # DeepSeek Reasoning model ollama run deepseek-r1:8b

Natural Language Queries

Prefix your request with ai followed by your query in natural language:

Terminal
$ ai show open tcp listening ports ✦ lsof -iTCP -sTCP:LISTEN -P ↳ Lists all active processes listening for TCP connections on the system. Execute command? [Enter/Y = Yes | Esc/N = No]:

Output Memory Buffer

PowerAI captures the last terminal output lines automatically into a rolling session buffer. You can query printed data without copying or pasting:

Terminal
$ ai what is the IP address in the previous output? ✦ 192.168.1.100 (interface en0) ↳ Extracted directly from the previous session output memory buffer.

Typo Auto-Healing Hook

When you mistype a command (e.g. mrdir or dockr ps), the native shell error handler intercepts the command and generates the corrected syntax with explanation.

Terminal
$ mrdir new_module ✦ mkdir new_module ↳ Command 'mrdir' not found. Native hook intercepted and suggested correction. Execute command? [Enter/Y = Yes | Esc/N = No]:

CLI Reference

Command Description
ai "<query>" Translates natural language to native shell commands.
ai version / ai -v Displays installed version and checks GitHub for releases.
ai update / ai upgrade Downloads, verifies, and installs the latest version instantly.

Environment Variables

Variable Default Description
POWERAI_MODEL llama3.2 Ollama model to use for local inferences.
POWERAI_HOST http://127.0.0.1:11434 Ollama local or remote API endpoint.
POWERAI_MAX_TOKENS 150 Maximum tokens allocated per response.

Zero-Python Native Architecture

Unlike traditional AI CLI wrappers that require a heavy Python interpreter runtime, PowerAI uses a 100% native architecture:

  • Unix (macOS / Linux): C-compiled jq with POSIX shell regex fallback. Latency < 2ms.
  • Windows: Native .NET / C# in PowerShell module without external runtime dependencies.

Troubleshooting & FAQ

Error: Connection refused (11434)

Ensure Ollama is running in the background. Start it by opening the Ollama application or running ollama serve in a separate terminal.

How to uninstall PowerAI?

Terminal
# macOS / Linux rm -rf ~/.powerai && sed -i '' '/powerai/d' ~/.zshrc ~/.bashrc # Windows (PowerShell) Remove-Item -Recurse -Force "$HOME\.powerai"