convez.ai
Agente
grabrick

clave-cli

grabrick/clave-cli

Ver no GitHub
InicialPluginScore · de 0 a 100

Local Rust TUI that orchestrates Claude Code and Codex CLI as cooperating coding agents.

Instalação

$npx convez-ai grabrick/clave-cli

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
57%
Último commit
há 4 meses
Versão
v0.3.1
Issues abertas
0
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

Clave

License: MIT Rust 2021 Install

Clave is a local Rust TUI that lets Claude Code and Codex CLI work together as coding agents. It gives you one terminal interface for discussion, planning, implementation, review, and multi-agent handoffs without storing provider credentials.

Clave calls the claude and codex CLIs that are already installed and logged in on your machine. The tools keep using their own local auth. Clave only orchestrates them around your working directory.

cargo install --git https://github.com/grabrick/clave-cli
clave

Why Clave

  • One terminal for both agents. Switch between Claude and Codex without rebuilding your workflow around a provider-specific UI.
  • Tandem mode. One model acts as executor, the other as critic: they discuss the approach, implement, review the real result, then revise.
  • Plan gate. Ask for a plan first, inspect it, then press Enter to execute or add feedback to revise the plan.
  • Local-first auth. No provider sessions, API keys, or credentials are stored by Clave.
  • Native terminal feel. Conversation history is rendered into the terminal scrollback, so mouse selection and wheel scrolling stay natural.

Install

Quick Install (prebuilt binary, no Rust needed)

macOS / Linux:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/grabrick/clave-cli/releases/latest/download/clave-installer.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy Bypass -c "irm https://github.com/grabrick/clave-cli/releases/latest/download/clave-installer.ps1 | iex"

Or download a prebuilt archive for your platform from the Releases page and put the clave binary anywhere on your PATH.

macOS note: the binaries are not yet code-signed or notarized. On first run, Gatekeeper may block clave as coming from an "unidentified developer". Allow it via System Settings → Privacy & Security → Open Anyway, or run xattr -d com.apple.quarantine "$(which clave)".

Requirements

  • Claude Code CLI as claude, installed and logged in
  • Codex CLI as codex, installed and logged in
  • On Windows, /plan needs WSL or Git Bash (the planning engine is a Bash script); direct chat works natively

From Cargo

cargo install --git https://github.com/grabrick/clave-cli

This installs the clave binary into ~/.cargo/bin. If clave is then reported as "command not found", that directory is not on your PATH — common when cargo was installed via Homebrew or a system package (rustup adds it automatically). Add it:

echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc

The planning engine is embedded into the binary and unpacked on first use into ~/.clave/engine/, so the TUI and /plan work without keeping the repository next to the executable.

From Source

git clone https://github.com/grabrick/clave-cli
cd clave-cli
cargo build --release
./clave

The ./clave launcher looks for the release binary and can fall back to a local Cargo run during development.

Quick Start

clave                  # open the interactive TUI
clave "<task>"         # run a task directly through the planning engine
clave --serve          # start the experimental mobile web remote
clave --help

On first launch, Clave checks whether codex and claude are available and logged in. It can guide you through login and writes the initial config to ~/.clave/config.

Modes

Use Shift+Tab to cycle direct-chat modes.

ModeWhat it doesFile access
Discussionanswers without toolsnone
Plandrafts a plan, waits for approval, then executesread-only plan phase, full execution phase
Full Accessautonomously reads, edits, and runs shell commandsread / write / Bash
Tandemexecutor + critic workflow with two modelstwo agents working together

In Plan mode, when a plan is shown:

  • press Enter to execute it;
  • type feedback and press Enter to revise it;
  • press Esc to cancel.

Tandem uses the current provider roles. For example, claude-codex means Claude executes and Codex reviews; codex-claude flips the roles.

Planning Engine

/plan <task> inside the TUI, or clave "<task>" from the shell, runs the embedded spec-clave engine:

  1. the architect writes an implementation spec;
  2. the reviewer returns VERDICT: APPROVE or VERDICT: REVISE;
  3. the architect revises when needed;
  4. Clave stops after approval or after the configured round limit.

Run the engine directly from a checkout:

./spec-clave "<task>"
./spec-clave --dry-run "<task>"
./spec-clave --rounds 3 --out .clave "<task>"
./spec-clave --architect claude --reviewer codex "<task>"
./spec-clave --codex-only --effort xhigh "<task>"

--dry-run is the cheapest way to inspect orchestration without calling either provider.

Commands

Type / to open the command palette. Russian keyboard layout is normalized for commands, so .здфт becomes /plan.

Common commands:

CommandPurpose
/plan <task>run the multi-agent planning loop
/brainstormexplore options before implementation
/blueprintturn context into a step-by-step plan
/autofix-prmonitor and fix issues in the current PR
/chat-model codex|claudechoose the direct-chat provider
/mode codex-only|claude-codex|codex-claude|claude-onlychoose architect/reviewer roles
/roles <executor> <reviewer>set planning roles directly
/effortadjust reasoning effort
/settingsopen model, theme, role, round, and language settings
/theme purple|cyan|rose|amber|monochange terminal palette
/lang ru|enswitch interface language
/new, /chats, /resume <id>manage saved chats
/exportexport the current chat to Markdown
/searchsearch the transcript
/costshow model usage and estimated cost
/helpshow the full command list

Shortcuts

Shift+Tab mode · Enter send · Ctrl+J newline · Tab autocomplete · Up/Down input history · Ctrl+R search · Ctrl+A/E start/end · Ctrl+W/U/K delete · Alt+Left/Right jump by word · Esc reset · Ctrl+C twice to exit · ? controls panel.

Terminal history belongs to the native scrollback buffer. Use the mouse wheel to scroll and drag to select text.

Security Model

  • Clave does not store provider credentials.
  • It calls your local claude and codex CLIs, which keep using their own auth.
  • Agents operate in the configured working directory.
  • Claude is started with --strict-mcp-config, so it only receives the tools for the active mode instead of inheriting global MCP servers.
  • Full Access, Tandem, and /plan can execute code. Review plans and run Clave only inside repositories you trust.

Mobile Remote

clave --serve starts an experimental local web remote powered by tiny_http. Use it to send tasks from a phone, switch modes, watch streamed output, and cancel a run.

CLAVE_SERVE_TOKEN=secret clave --serve --host <tailscale-ip> --port 8765

Only expose the remote on a trusted private network, such as Tailscale, and use a token. The remote is V0 and intentionally conservative.

State And Environment

State lives in ~/.clave/ by default:

  • config
  • history
  • chats/
  • unpacked planning engine files

Useful environment variables:

VariablePurpose
CLAVE_HOMEoverride the state directory
CLAVE_CONFIGoverride the config file path
CLAVE_CLAUDE / CLAVE_CODEXoverride CLI binary paths, useful for tests
CLAVE_ENGINEuse a custom spec-clave engine path
CLAVE_SKIP_ONBOARDING=1skip the first-run wizard

Architecture

Clave has two layers:

  • clave: the Rust TUI, built with crossterm and ratatui, without an async runtime. Long-running work uses threads and channels.
  • spec-clave: the Bash planning engine that coordinates architect/reviewer rounds and writes artifacts.

Main Rust areas:

  • src/model/ - core types and constants: Mode, Provider, Theme, Language, ChatMode, RunAccess, effort tables, commands, shortcuts.
  • src/app/ - state and behavior: chat, planning, tandem, settings, saved chats, events, footer.
  • src/ui/ - ratatui rendering that reads &App.
  • src/runtime.rs - entrypoint, event loop, key handling.
  • src/worker.rs - provider and engine execution, stream parsing.
  • src/server/ - experimental mobile web remote.
  • src/storage.rs, src/auth.rs, src/input.rs - persistence, CLI auth checks, input helpers.

Development

cargo build --release
cargo run
cargo test
cargo fmt
cargo clippy

Cheap orchestration check:

./spec-clave --dry-run "<task>"

Inline-render check:

python3 scripts/render_check.py target/release/clave <CLAVE_HOME>

See CONTRIBUTING.md for development conventions.

Project Status

Clave is an early 0.1.0 CLI-first tool built for local agent workflows. The core TUI, direct chat, planning loop, saved chats, settings, and experimental mobile remote exist today.

Near-term roadmap:

  • release CI for macOS, Linux, and Windows binaries;
  • Homebrew formula;
  • public demo clip / asciinema;
  • stronger docs for Tandem workflows;
  • more hardening around the experimental web remote.

Русская версия

Clave - локальный Rust TUI-оркестратор, который связывает Claude Code CLI (claude) и Codex CLI (codex) в один рабочий интерфейс. Обе модели могут работать как агенты: читать проект, править файлы, выполнять команды, планировать и ревьюить результат.

Креды провайдеров не хранятся. Clave вызывает уже залогиненные локальные CLI пользователя, поэтому Claude и Codex продолжают использовать свои собственные локальные сессии.

Быстрая установка:

cargo install --git https://github.com/grabrick/clave-cli
clave

Основные режимы:

  • Discussion - простой чат без инструментов.
  • Plan - сначала план, потом выполнение по подтверждению.
  • Full Access - агент сам читает, правит и запускает команды.
  • Tandem - исполнитель и критик: обсуждение, исполнение, ревью, финальная правка.

Планирование:

/plan <задача>

или напрямую из shell:

clave "<задача>"

Артефакты планирования пишутся в каталог запуска, обычно в .clave/, а итоговый brief возвращается обратно в чат.

Интерфейс по умолчанию русский, переключение языка доступно через /lang ru|en.

Ver o original no GitHub

Bom para

Relacionados