selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
shai logo

Self-host shai

v0.2.2

Terminal coding agent with HTTP server and shell helper

BetaOpen SourceApache-2.0
curl -fsSL https://raw.githubusercontent.com/ovh/shai/main/install.sh | sh
Updated2 weeks ago
LanguageRust
Setup difficultyEasy
ThemeDark mode
Stars
630
Port
3000 (HTTP server mode (`shai serve`), bound to 127.0.0.1 by default)
The shai terminal coding agent interfaceshai running in HTTP server modeThe shai shell assistant suggesting a fix for a failed command

What is shai?

shai is a pair-programming coding agent that lives in your terminal, written in Rust by OVH. You can chat with it in a TUI to author code, debug and answer questions, or pipe prompts into it headlessly for scripting, chaining calls with --trace. Running shai serve exposes OpenAI-compatible endpoints (/v1/chat/completions, /v1/responses, a multimodal API) with SSE streaming. It doubles as a shell assistant that proposes fixes when a command fails, loads project context from AGENTS.md, supports MCP servers with OAuth, and extends behaviour through skills and custom agent configs. Providers are configured via shai auth and include OVHcloud AI Endpoints, OpenAI, Anthropic, Mistral, Ollama and OpenRouter; anonymous OVHcloud use is rate limited to 2 requests per minute. Install with the provided shell script (binary lands in $HOME/.local/bin), nightly builds included, or build with cargo.

Should you self-host shai?

shai scores 44/100 on selfhost.directory (how scoring works) and ranks #71 of 120 in AI Assistant. It has 630 GitHub stars.

It shipped 6 stable releases in the past year. The latest, v0.2.2, came out on 9 October 2026. New versions land roughly every 8 days.

Setup is easy: most people get it running in one sitting. It is Apache-2.0-licensed and written mostly in Rust.

Its closest alternative on selfhost.directory is hermes-agent (89/100, 257 885 stars). It scores higher overall, so compare the two before you pick. See shai vs hermes-agent side by side.

Features

  • Custom agent configurations
  • Headless Mode
  • HTTP server with OpenAI-compatible API
  • Import from other agent configs
  • Interactive TUI coding agent
  • MCP server support
  • Post-edit verificationDisabled by default (verification.enabled false).
  • Project context files (AGENTS.md)
  • Session restore
  • Shell assistant
  • Skills
  • Token usage display
  • Tool call method selection

shai README

How to install shai

Install shai with Linux

Environment variables
SHAI_RELEASE
curl -fsSL https://raw.githubusercontent.com/ovh/shai/main/install.sh | sh

The `shai` binary will be installed in `$HOME/.local/bin`; nightlies via `SHAI_RELEASE=unstable`. Installer detects linux/macos/windows x86_64 and aarch64.

How to configure shai

  • compactionContext compaction settings in agent config (max_output_chars, max_tool_calls_per_turn, max_cached_commands, max_trace_chars, max_cached_reads, find_exclude_pattern).

    Context compaction settings in agent config (max_output_chars, max_tool_calls_per_turn, max_cached_commands, max_trace_chars, max_cached_reads, find_exclude_pattern).

  • markdown_skinOptional markdown rendering skin for agent responses; when omitted it follows "theme".

    Optional markdown rendering skin for agent responses; when omitted it follows "theme".

    values: "dark" or "light"

  • max_tokens4096Maximum tokens in response (agent config).

    Maximum tokens in response (agent config).

  • selected_providerIndex into the `providers` array for the active provider in auth.config.json.

    Index into the `providers` array for the active provider in auth.config.json.

    values: integer index

  • SHAI_RELEASERelease channel for install.sh; set to `unstable` to install the nightly build.

    Release channel for install.sh; set to `unstable` to install the nightly build.

    values: unstable (nightly), version tags

  • system_promptSystem prompt for the agent (agent config).

    System prompt for the agent (agent config).

  • temperature0.7Sampling temperature (agent config).

    Sampling temperature (agent config).

  • themedarkInitial TUI theme in ~/.config/shai/tui.config.json; toggle at runtime with /theme.

    Initial TUI theme in ~/.config/shai/tui.config.json; toggle at runtime with /theme.

    values: "dark" (default) or "light"

  • tool_methodTool call method for a provider entry in the auth configuration.

    Tool call method for a provider entry in the auth configuration.

    values: "auto", "function_call", "function_call_required", "structured_output"

  • verificationTool verification settings in agent config; commands keyed by language with per-command timeout.

    Tool verification settings in agent config; commands keyed by language with per-command timeout.

shai releases & version history

More in AI Assistant

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…