Luizhcrs/powerai

The invisible cognitive layer & local-first AI copilot for macOS, Linux, and Windows terminals.

4

stars

66

commits

Shell

primary language

Sep 1, 2026

updated

luizhcrs.github.io/powerai
cli
copilot
developer-tools
devops
dotnet
linux
local-ai
macos
ollama
productivity
terminal
windows
Browse cluster: Cross-platform terminal and CLI tools

README

Quick Install

macOS & Linux (Bash / Zsh)

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

Windows (PowerShell 5.1 / 7+)

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

The installer is self-healing: missing dependencies (curl, jq — Zero Python required) and the recommended local Ollama model (qwen2.5-coder:1.5b) are configured automatically.


Core Capabilities

  • Local-First & Offline: Runs entirely on your machine via Ollama or local APIs with GPU acceleration.
  • Terminal Output Buffer: Answers questions directly about command outputs printed on your screen.
  • Non-Destructive Execution: Asks for confirmation before executing any suggested command.
  • Multi-Language Support: Automatically detects and switches between English, Portuguese, and Spanish.
  • Auto-Healing: Intercepts shell typos and syntax errors, proposing immediate fixes.

Commands

CommandDescription
ai <query>Natural language terminal query
? <query>Fast shorthand alias
ai commitGenerate Conventional Commit from git diff with confirmation
ai explain <cmd>Break down and explain flags of any CLI command
ai updateSelf-update to latest release from GitHub
ai versionCheck installed and remote version
ai language <pt|en|es>Change assistant language
ai configDisplay current configuration
ai uninstallCompletely uninstall PowerAI
Usage Examples
# Network & Processes
? list all open TCP ports listening for connections
? kill all hung node processes

# Files & Logs
? find all .log files larger than 100mb
? search for ERROR in the last 500 lines of app.log

# Git Operations
? undo last commit while keeping local changes
? clean local branches that were deleted on remote

How It Works

  1. Input Capture: You type ai <query> or ? <query> in your shell.
  2. Context Resolution: Reads minimal local context (operating system, working directory, and the last printed command output).
  3. Local Inference: Queries are processed locally via Ollama or local OpenAI-compatible endpoints with zero external telemetry.
  4. Interactive Prompt: Displays the proposed command with an explanation, awaiting confirmation (Enter to run, Esc to cancel).

Configuration Reference (~/.powerai/config.json)
{
  "Mode": "Auto",
  "LocalType": "Ollama",
  "LocalEndpoint": "http://127.0.0.1:5151/v1",
  "LocalApiKey": "",
  "LocalModel": "qwen2.5-coder:1.5b",
  "OllamaEndpoint": "http://localhost:11434",
  "CloudEndpoint": "https://api.openai.com/v1",
  "CloudApiKey": "",
  "CloudModel": "gpt-4o-mini",
  "Language": "pt-BR",
  "AutoSuggestOnErrors": true,
  "AutoHealingRetries": 2,
  "TimeoutSeconds": 25
}

Automated Tests
  • Unit tests (.NET / xUnit): tests/PowerAI.Tests/
  • Integration tests (Terminal harness): tests/test_harness.sh

Run locally:

./tests/test_harness.sh

License

PowerAI is distributed under the PolyForm Noncommercial License 1.0.0.

  • Permitted: Free personal use on local machines, academic research, education, code review, and non-commercial community contributions.
  • Prohibited: Commercial use, paid distribution, SaaS re-hosting, or monetization without prior written license from the copyright holder.

Author: Luiz Henrique (@Luizhcrs)
Repository: github.com/Luizhcrs/powerai

Contributors

Luizhcrs

66 commits

Luizhcrs/powerai

The invisible cognitive layer & local-first AI copilot for macOS, Linux, and Windows terminals.

4

stars

66

commits

Shell

primary language

Sep 1, 2026

updated

luizhcrs.github.io/powerai
cli
copilot
developer-tools
devops
dotnet
linux
local-ai
macos
ollama
productivity
terminal
windows
Browse cluster: Cross-platform terminal and CLI tools

README

Quick Install

macOS & Linux (Bash / Zsh)

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

Windows (PowerShell 5.1 / 7+)

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

The installer is self-healing: missing dependencies (curl, jq — Zero Python required) and the recommended local Ollama model (qwen2.5-coder:1.5b) are configured automatically.


Core Capabilities

  • Local-First & Offline: Runs entirely on your machine via Ollama or local APIs with GPU acceleration.
  • Terminal Output Buffer: Answers questions directly about command outputs printed on your screen.
  • Non-Destructive Execution: Asks for confirmation before executing any suggested command.
  • Multi-Language Support: Automatically detects and switches between English, Portuguese, and Spanish.
  • Auto-Healing: Intercepts shell typos and syntax errors, proposing immediate fixes.

Commands

CommandDescription
ai <query>Natural language terminal query
? <query>Fast shorthand alias
ai commitGenerate Conventional Commit from git diff with confirmation
ai explain <cmd>Break down and explain flags of any CLI command
ai updateSelf-update to latest release from GitHub
ai versionCheck installed and remote version
ai language <pt|en|es>Change assistant language
ai configDisplay current configuration
ai uninstallCompletely uninstall PowerAI
Usage Examples
# Network & Processes
? list all open TCP ports listening for connections
? kill all hung node processes

# Files & Logs
? find all .log files larger than 100mb
? search for ERROR in the last 500 lines of app.log

# Git Operations
? undo last commit while keeping local changes
? clean local branches that were deleted on remote

How It Works

  1. Input Capture: You type ai <query> or ? <query> in your shell.
  2. Context Resolution: Reads minimal local context (operating system, working directory, and the last printed command output).
  3. Local Inference: Queries are processed locally via Ollama or local OpenAI-compatible endpoints with zero external telemetry.
  4. Interactive Prompt: Displays the proposed command with an explanation, awaiting confirmation (Enter to run, Esc to cancel).

Configuration Reference (~/.powerai/config.json)
{
  "Mode": "Auto",
  "LocalType": "Ollama",
  "LocalEndpoint": "http://127.0.0.1:5151/v1",
  "LocalApiKey": "",
  "LocalModel": "qwen2.5-coder:1.5b",
  "OllamaEndpoint": "http://localhost:11434",
  "CloudEndpoint": "https://api.openai.com/v1",
  "CloudApiKey": "",
  "CloudModel": "gpt-4o-mini",
  "Language": "pt-BR",
  "AutoSuggestOnErrors": true,
  "AutoHealingRetries": 2,
  "TimeoutSeconds": 25
}

Automated Tests
  • Unit tests (.NET / xUnit): tests/PowerAI.Tests/
  • Integration tests (Terminal harness): tests/test_harness.sh

Run locally:

./tests/test_harness.sh

License

PowerAI is distributed under the PolyForm Noncommercial License 1.0.0.

  • Permitted: Free personal use on local machines, academic research, education, code review, and non-commercial community contributions.
  • Prohibited: Commercial use, paid distribution, SaaS re-hosting, or monetization without prior written license from the copyright holder.

Author: Luiz Henrique (@Luizhcrs)
Repository: github.com/Luizhcrs/powerai

Contributors

Luizhcrs

66 commits

Languages

Shell

47.1%

PowerShell

29.4%

C#

22.5%