Steward:极简高精度终端 AI 编程助手
sapirrior/steward
sapirrior 发布终端 AI 编程助手 Steward,基于 AI SDK v7 构建统一流式推理与工具调用引擎,支持 Anthropic、OpenAI、Gemini、OpenRouter 等 11 家提供商,可通过浏览器 OAuth 或环境变量密钥即插即用。
The minimal, high-precision AI engineering assistant for your terminal.
Steward is a plug-and-play terminal pair programmer built with a focused philosophy: maximum engineering leverage with zero bloat.
Instead of heavy framework abstractions or sprawling plugin layers, Steward delivers a clean, cohesive tool from day one—giving you the speed of a lightweight coding agent with the safety, resilience, and depth required for serious software development.
┌─────────────────────────────────────────────────────────────┐
│ ✦ Fast, zero-lag Alternate-Screen TUI (Synchronized Mode 2026)│
│ ✦ Unified streaming AI engine with automatic retry │
│ ✦ Ultra-lean system prompt (~450 tokens) & lazy skill loading│
│ ✦ 16 native tools: search, read, edit, bash, tasks, fetch │
│ ✦ Content-addressed checkpoints & atomic rewind undo │
│ ✦ 11 providers: Anthropic, OpenAI, Gemini, OpenRouter, etc. │
│ ✦ Plug-and-play: browser OAuth or standard environment keys │
└─────────────────────────────────────────────────────────────┘
Quick Start
Install Steward globally with your favorite package manager or one-line installer:
One-Line Install
# macOS, Linux & Termux curl -fsSL https://raw.githubusercontent.com/sapirrior/steward/main/installer/install.sh | bash
# Windows (PowerShell) irm https://raw.githubusercontent.com/sapirrior/steward/main/installer/install.ps1 | iex
Via Package Managers
npm install -g steward-cli
# or
bun add -g steward-cliLaunch
Navigate to any codebase and launch:
steward
Connect your provider in seconds using /login (Anthropic, OpenRouter, GitHub Copilot) or by setting standard environment keys (OPENAI_API_KEY, GEMINI_API_KEY, ANTHROPIC_API_KEY, etc.).
Why Steward?
🎯 Pure & Focused from Day One
Steward is engineered to be clean and immediately productive without setup friction. You don't need to configure complex plugin trees, manage external SDK wrappers, or debug fragile hook pipelines. Everything you need to inspect, edit, test, and ship code is built directly into the core runtime.
🪶 Ultra-Lean System Prompt & Smart Lazy Loading
Rather than burning thousands of tokens on monolithic boilerplate prompts or dumping entire skill libraries into upfront context, Steward uses a razor-sharp base system prompt (~450 tokens). Context rules and domain capabilities are discovered and loaded on demand through native catalog tools (skill_list, skill_read), preserving maximum model attention and context window budget for your code.
🛡️ Safe by Default, Fearless by Design
- Permission Gated: Destructive file modifications and shell commands always ask for your explicit approval with line-by-line diff previews.
- Atomic Rewind Checkpoints: Every file edit automatically snapshots a pre-mutation image. Made a mistake or want to revert an approach? Use
/rewindto cleanly roll back your workspace to any previous turn.
⚡ Multi-Provider AI Core
Steward delivers a unified inference and tool-calling engine powered by AI SDK v7, with resilient rate-limit recovery (with 10-attempt backoff), dynamic model discovery, thinking/reasoning control, and offline resilience across 11 providers.
🎨 Native Terminal UI (stitchable)
Built on a custom line-differential rendering engine with Mode 2026 synchronized output. Enjoy flicker-free markdown streaming, real-time tool badges, fuzzy file searching (@), and interactive slash palettes (/).
Supported Providers
Steward works with any model you prefer—frontier cloud models, unified gateways, or local offline servers:
| Provider | Authentication | Setup |
|---|---|---|
| Anthropic | Browser OAuth / API Key | /login anthropic or export ANTHROPIC_API_KEY=... |
| OpenAI | API Key | export OPENAI_API_KEY=sk-... |
| Google Gemini | API Key | export GEMINI_API_KEY=... |
| OpenRouter | Browser OAuth / API Key | /login openrouter or export OPENROUTER_API_KEY=... |
| GitHub Copilot | Device Code OAuth | /login github-copilot |
| Ollama (Local) | None (Local server) | Auto-detects http://localhost:11434 |
| xAI (Grok) | API Key | export XAI_API_KEY=... |
| DeepSeek | API Key | export DEEPSEEK_API_KEY=... |
| Mistral AI | API Key | export MISTRAL_API_KEY=... |
| Groq | API Key | export GROQ_API_KEY=... |
| Custom / Self-Hosted | Base URL + Model + API Key | CUSTOM_API_URL, CUSTOM_MODEL_NAME, and CUSTOM_API_KEY |
Keyboard Shortcuts & Slash Commands
| Key / Command | Action |
|---|---|
/model |
Open the interactive model picker dock |
/login |
Authenticate with OAuth AI providers |
/mode or Ctrl+B |
Cycle chat modes (normal, chat, review, build) |
/effort |
Adjust reasoning effort (none, low, medium, high, xhigh) |
/rewind |
Revert file changes to previous session turns |
/resume |
Browse, resume, or switch saved session transcripts |
/clear |
Clear active context and start a fresh turn |
@filename |
Fuzzy find and mention workspace files into context |
Escape / Ctrl+C |
Abort current generation or close open modal dock |
Contributing
We welcome contributions! Check out CONTRIBUTING.md for architecture guidelines, development setup, and testing instructions.
License
MIT © sapirrior
来源:GitHub · github.com
