English · Русский
Hot-swap any model or provider mid-conversation. Edit files behind a permission gate. MCP, skills, sub-agents, and background jobs — in one fast, keyboard-driven TUI.
Cordy is a cross-platform terminal agent that talks to every major API family — OpenAI Chat
Completions, OpenAI-compatible endpoints, Anthropic Messages, and the OpenAI Responses API —
through one canonical model, so switching provider or model never loses your conversation. It
edits files with an exact, diff-confirmed edit, runs a builtin toolset whose command output is
compressed by a native token optimizer, and speaks the Model Context Protocol.
- Hot-swap models & providers mid-conversation — start on a local model, finish on a frontier
one, context intact.
^P→ pick a model, or/connectto add a provider. - Every API family — OpenAI Chat, OpenAI-compatible (Ollama / vLLM / OpenRouter / Groq / …), Anthropic Messages, OpenAI Responses. Wire formats never leak past the adapter.
- Builtin tools —
readwriteeditmultieditgrepgloblsbashtodoweb_searchweb_fetchprocessrewind, all behind a permission gate you can pre-approve with globs. - Background jobs — run a dev server with
bash background:true, thenprocessto poll, wait on a regex, or kill the whole process tree. - MCP, skills, sub-agents — connect MCP servers, load progressive-disclosure skills, and
delegate work to isolated sub-agents via the
tasktool. - Free web search — DuckDuckGo out of the box (no key), or Exa when
EXA_API_KEYis set. - Live cost & context HUD — tokens,
$cost, optimizer savings, context fill, background jobs and sub-agents in a side panel. - OpenCode-inspired UI — command palette, prompt history, multiline input, sessions, a provider manager, eight themes, and full config hot-reload.
Linux / macOS
|
Windows (PowerShell)
irm https://raw.githubusercontent.com/redstone-md/Cordy/main/install.ps1 | iex
The scripts download the signed binary for your platform, verify its checksum, and drop cordy
on your PATH.
With cargo — cargo install cordy
Prebuilt binaries — or grab the archive for your platform from the
latest release, unpack, and run cordy.
From source (Rust 1.88+) — the default build is full-featured (MCP included):
# binary at target/release/cordy
Want a leaner binary without the MCP client? cargo build --release --no-default-features.
Point Cordy at any OpenAI-compatible endpoint via environment variables, then run it:
# or any compatible endpoint
…or skip the env vars and press ^P → /connect inside the app to add a provider through the
wizard. Providers you connect are saved to ~/.cordy/config.toml, and the last one is restored on
launch. All user state — config, keys, sessions, cache — lives under ~/.cordy.
| Key | Action |
|---|---|
Enter |
send · ^J / Alt+Enter newline |
Tab / Shift+Tab |
cycle agent/mode |
^P |
command palette — models, agents, themes, providers, commands |
↑ / ↓ |
prompt history · move across lines |
Esc |
interrupt the running turn |
^X then … |
leader: l sessions · m models · t theme · s status · y copy reply |
^R · ^L · ^-/^. |
rename session · redraw · undo/redo input |
wheel · PgUp/PgDn · ^G |
scroll the transcript |
Slash commands include /connect /providers /model /sessions /permissions /mouse
/thinking /compact /goal /ralph and more — type / to autocomplete.
~/.cordy/config.toml (merged with a project-level .cordy/config.toml). It is hot-reloaded
— edits apply within a second, no restart. Secrets never live here; API keys go in the OS env or
~/.cordy/keys.json (written by /connect).
= true
= "tokyonight" # mono (default) · dark · tokyonight · catppuccin · gruvbox · nord · rosepine · light
# Fine-tune any role color on top of the theme
[]
= "#7aa2f7"
= "#24283b"
# Pre-approve commands so the agent stops asking
[]
= "ask" # or "auto"
= ["bash:ls *", "bash:git *", "bash:cargo *"]
= ["bash:rm -rf *"]
# A provider (secrets stay in env / keys.json, never here)
[[]]
= "openai"
= "openai-chat"
= "https://api.openai.com/v1"
# An MCP server (in the default build)
[[]]
= "browsermcp"
= "stdio"
= "npx @browsermcp/mcp@latest"
= true
src/
core/ canonical model (ContentBlock/Message/WireEvent), agent loop, prompt, context,
sessions, permissions, autonomous (ralph) loop, auth
provider/ Provider trait + one adapter per API family (+ retry decorator)
tools/ Tool trait, builtins, native output optimizer, sub-agents, background jobs
skills/ progressive-disclosure skill loader
agents/ sub-agent registry
mcp/ MCP client (on by default; opt out with --no-default-features)
config/ TOML load/merge, model & provider profiles
tui/ ratatui MVU app — model, update, view, themes, markdown
Contributions are welcome — see CONTRIBUTING.md. Before opening a PR:
Released under the MIT License.