Skip to content

Repository files navigation

OpenShield

AI coding agent in your terminal. Rust. Open source. Blackshield by default.

OpenShield

Version License Rust

What It Does

  • Persistent memory β€” SQLite-backed sessions with keyword and semantic search. Close the terminal, come back next week, it still knows what you were doing.
  • Any model provider β€” Works with any OpenAI-compatible API. OpenRouter, llama-swap, xAI, local servers. Not locked to anyone.
  • Autonomous agent mode β€” Plans, executes, verifies, retries. You approve the plan, it does the work.
  • Blackshield TUI β€” Blood, steel, bone, and void palette with the Blackshield Mercenary shield on launch.

Install

curl -sSL https://raw.githubusercontent.com/synthalorian/openshield/main/install.sh | bash

Requires Rust (installs via rustup if missing). Binary goes to ~/.local/bin/openshield.

First Run

openshield setup    # Configure providers and models
openshield          # Start TUI session

Set one API key environment variable before starting: OPENAI_API_KEY, ANTHROPIC_API_KEY, KIMI_API_KEY, or XAI_API_KEY.

Commands

Command Description
openshield Start TUI session
openshield setup Configure providers, models, preferences
openshield agent "<task>" Execute task autonomously
openshield chat "<message>" One-shot chat
openshield memory <query> Search persistent memory
openshield memory <query> --semantic Semantic memory search
openshield stats Token usage and model performance
openshield models List available models
openshield config Show configuration

TUI Keybindings

Key Action
Ctrl+A Toggle autonomous mode
Ctrl+T Cycle themes
/multi Toggle multi-model mode
/compare Show multi-model comparison
↑/↓ Navigate history

Themes: blackshield (default), steel_blue, high_contrast.

Tools

9 built-in tools: edit, fs, git, lsp, refactor, search, grep, terminal, test. Plus MCP server tools via native client.

Config

Config lives at ~/.config/openshield/config.toml. Run openshield setup for interactive generation.

Example config
version = "1.1.0"
default_model = "gpt-4o"
auto_route = true
cost_limit_usd = 10.0
theme = "blackshield"

[providers.openai]
base_url = "https://api.openai.com/v1"
api_key = "${OPENAI_API_KEY}"

[[providers.openai.models]]
name = "gpt-4o"
context_length = 128000
cost_per_1k_input = 0.005
cost_per_1k_output = 0.015
capabilities = ["code", "chat", "analysis"]

Development

git clone https://github.com/synthalorian/openshield
cd openshield
cargo build --release
cargo test

More

License

MIT


β˜• Support the Developer

If this project saved you time, solved a problem, or kept your terminal a little more steel-forged, you can fuel the next one:

Buy Me A Coffee

About

The harness that learns. The agent that decides. Open-source AI coding harness in Rust. πŸ›‘

Topics

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages