@anvi-cli/anvi
v1.0.1
Published
Terminal-native AI coding agent built in Rust, powered by Gemini
Maintainers
Readme
>anvi.
Terminal-native AI coding agent. Built in Rust. Powered by Gemini.
Anvi is a terminal AI coding agent in the same family as Claude Code and Cursor's agent workflows, but designed as a native Rust CLI instead of a web shell wrapped in a terminal. It gives you multi-turn tool use, code editing, shell execution, sub-agent orchestration, persistent memory, and git-aware workflows with fast startup, Gemini-native defaults, and an extension model built around installable skills, MCP servers, and plugins.
Anvi is built for people who want an agent that feels like part of the terminal: fast to launch, easy to script, comfortable in large repos, and extensible without rebuilding the core product.
- Startup target: sub-150ms cold start
- Model-first design: Gemini 3.x as the default provider
- Extension surface: skills, MCP servers, plugins, templates, memory
- Workspace model: local-first, project-aware, and git-aware
See Getting Started for a guided walkthrough, or Roadmap for the longer product vision.
Install
# npm (recommended)
npm install -g @anvi-cli/anvi
# Shell installer
curl -fsSL https://raw.githubusercontent.com/eagleisbatman/anvi/main/install.sh | sh
# Build from source
cargo install --git https://github.com/eagleisbatman/anvi.git --package anvi-tui --bin anvi --forceQuick Start
# Set API key
export GEMINI_API_KEY="your-key-here"
# Run
anviIf you prefer another provider, Anvi also supports OPENAI_API_KEY and ANTHROPIC_API_KEY.
Features
- Multi-turn agent loop with 23+ built-in tools for files, shell, git, web, memory, and tasks
/commit,/pr,/test-fixfor AI-assisted git workflows and fix-until-green loops/plan -xfor generating a plan and executing it step by step/review,/security,/architecture, and 14 more built-in specialist agents/skills search|install|createfor browsing community skills or authoring your own/mcp browse|install|createfor adding Model Context Protocol servers/suggestfor project stack detection with skills and MCP recommendations/templatefor reusable prompt templates with variable expansion/memoryfor persistent memory,#keywordrecall, and team-sharing flows/marketplace search|install|infofor unified browsing and installing skills, MCP servers, and plugins- Plugin system for custom tools in any language via
~/.anvi/plugins - RTK integration for 60-90% token reduction on supported shell output
- CLI-Anything integration for controlling professional desktop software from the terminal
@filementions for prompt-time file injection and#keywordmemory lookup- Progress indicators, cost tracking, context budget visibility, and session summaries
Configuration
Anvi stores global config in ~/.anvi/config.toml and can layer project-local helpers under .anvi/.
# ~/.anvi/config.toml
[model]
provider = "gemini" # gemini | openai | anthropic
model_id = "gemini-3-flash-preview"
[optimization]
rtk_enabled = false # Install RTK and flip to true for token savingsCommon provider environment variables:
- Gemini:
GEMINI_API_KEY - OpenAI:
OPENAI_API_KEY - Anthropic:
ANTHROPIC_API_KEY
Useful companion settings:
[permissions] mode = "default"for approval behaviortheme = "dark"for terminal theme preference[[model.fallback]]for provider/model fallback chains
Commands Quick Reference
Slash commands are the main control surface inside the REPL. Specialist agents are also exposed as commands, so /review, /security, /scaffold, /debug, and friends behave like first-class built-ins.
| Command | Description |
| --- | --- |
| /new | Start a fresh session in the current workspace |
| /sessions | Browse and resume recent sessions interactively |
| /resume <id> | Resume a specific session by thread ID |
| /compact | Summarize older context to free tokens |
| /rewind | Remove the last user/assistant exchange |
| /model [name] | Show or switch the active model |
| /models | Browse built-in model options |
| /cost | Estimate current session cost from token usage |
| /read <path> | Read a file into the terminal |
| /write <path> [content] | Write content or open a file in $EDITOR |
| /edit <path> | Open a file in your configured editor |
| /bash <cmd> | Run a shell command through the agent runtime |
| /glob <pattern> | Find files by glob pattern |
| /grep <pattern> | Search repository content with regex |
| /plan [-x] <task> | Generate a plan, optionally auto-execute it |
| /diff [--staged] | Render the current git diff |
| /memory ... | List, search, export, import, share, or prune memory |
| /skills ... | List, search, install, remove, or create skills |
| /marketplace ... | Search, install, and inspect skills, MCP servers, and plugins |
| /template ... | Run a reusable prompt template |
| /commit | Generate a conventional commit message and commit |
| /pr [base] | Draft and create a GitHub pull request |
| /test-fix [n|--cmd ...] | Run tests, fix failures, and retry |
| /undo | Revert uncommitted changes after confirmation |
| /status | Show session, environment, memory, and runtime status |
| /context | Inspect context budget and compaction pressure |
| /tokens | Show input, output, and total token usage |
| /init | Create project-local .anvi helper files |
| /suggest | Detect the project stack and recommend add-ons |
| /plugins | List discovered external plugin tools |
| /theme [name] | Show or switch the terminal theme |
| /login | Configure the active provider API key |
| /logout | Clear the active provider API key |
| /mcp ... | Browse, install, add, create, login, or remove MCP servers |
| /permissions [mode] | Change approval mode for tools and edits |
| /bg <prompt> | Run a prompt as a background job |
| /fg [job-id] | Show output from a finished background job |
| /jobs | List background jobs |
| /help | Show the full command list |
Prompt shortcuts:
@path/to/file.rsinjects a file into the next prompt@path/to/dir/injects a directory listing#keywordrecalls matching memory entries into context
Skills & Plugins
Anvi has two extension layers:
- Skills are prompt-level behaviors. Built-in examples include
/review,/security,/scaffold,/docs,/debug, and/onboard. Community skills can be searched and installed with/skills search <query>and/skills install <name>. - Plugins are executable tools discovered from
~/.anvi/plugins. Each plugin is a trusted local binary plus a JSON manifest, so you can add custom tools in Python, shell, Ruby, or anything else that can read JSON on stdin and print JSON on stdout.
Examples:
/skills search ci
/skills install ci-pipeline
/skills create release-notes/mcp browse
/mcp install github
/mcp create jira-syncFor hands-on setup, see docs/GETTING_STARTED.md.
Architecture
Anvi is a 6-crate Rust workspace:
anvi
├── mastra-core shared agent/runtime types, streaming, workflows
├── mastra-memory SQLite-backed sessions, tasks, and memory
├── mastra-providers Gemini, OpenAI, and Anthropic provider adapters
├── mastra-tools built-in tools, plugins, MCP, RTK, CLI-Anything
├── anvi-agent orchestration, planning, config, skills, approvals
└── anvi-tui CLI binary, REPL, commands, themes, renderingRough dependency flow:
anvi-tui
-> anvi-agent
-> mastra-core
-> mastra-memory
-> mastra-providers
-> mastra-toolsInstallation Notes
- Requires a Rust toolchain with
cargo - First run creates
~/.anvi/automatically anvi --doctorchecks API key, provider connectivity, memory, git context, and RTK statusanvi -cresumes your most recent sessionanvi "prompt"runs one-shot mode without entering the full REPL
License
Apache 2.0
