ARC CLI

A native agentic CLI that reasons over codebases. One binary. No runtime. Works offline. 31 crates. <20ms cold boot.

Rust · #![forbid(unsafe_code)] 31 Crates 6 AI Providers Ollama Offline OpenSSF Scored
Install
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.ps1 | iex

# From source
cargo install --git https://github.com/Ashutosh0x/arc-cli
Getting Started
Install ARC and start reasoning over your codebase in minutes.
Features
Multi-provider support, knowledge graph, interactive REPL, and more.
Commands
Complete reference for all available CLI commands.
Providers
Connect to OpenAI, Anthropic, Google, Groq, xAI, Ollama, and more.
Architecture
31-crate modular Rust workspace with zero-cost abstractions.
Changelog
Latest updates, releases, and improvements.
Performance

ARC uses OnceLock + LTO compilation, SIMD-accelerated SSE parsing, bumpalo arena allocators, and HTTP/2 connection pooling.

Cold Boot
<20ms
Config Parse
~56μs
Checkpoint
~45ms
SSE Stream
0 alloc
ARCClaude CodeGemini CLI
Written inRustNode.jsNode.js
Cold start<20ms~500ms~400ms
Binary size~15MB~200MB+~150MB+
Runtime depsNoneNode 18+Node 18+
Offline modeOllamaNoNo
Providers6Anthropic onlyGoogle only
Unsafe codeforbid(unsafe)N/AN/A

Getting Started

Install ARC CLI and start reasoning over your codebase in minutes.

Installation

Quick Install (Recommended)

Linux / macOS
curl -fsSL https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/Ashutosh0x/arc-cli/main/install.ps1 | iex

From Source

Terminal
cargo install --git https://github.com/Ashutosh0x/arc-cli

Prerequisites

  • Rust 1.89+ — Install via rustup (only for building from source)

Quick Start

1. Initialize — Run the configuration wizard to set API keys and default models:

Terminal
arc setup

2. Start a session — Launch the interactive REPL:

Terminal
arc chat                    # start a session
/plan "add OAuth2 login"    # generate a plan, review it
/provider groq              # switch to Groq (Llama 3.3 70B)
/model grok-4-1-fast-non-reasoning  # switch model
/checkpoint                 # snapshot current state
/rewind 3                   # undo to checkpoint 3
/compact                    # compress context window

3. Single-shot autonomous agent:

Terminal
arc run "Refactor src/logging to use tracing instead of stdout"

4. AI-powered PR review:

Terminal
arc review                  # PR critique via 6 specialized agents
Security: API keys are stored in your OS keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service). Never in plain-text config files. Use arc auth login --provider anthropic to store credentials securely.

Features

ARC delivers a comprehensive set of capabilities for AI-powered code reasoning.

Multi-Provider AI Engine

Seamlessly switch between AI providers without changing your workflow. Each provider is a first-class citizen with full streaming support.

  • OpenAI — GPT-4o, GPT-4o-mini, o1, o3-mini and all chat models
  • Anthropic — Claude Sonnet 4, Claude Haiku and all Claude models
  • Google Gemini — Gemini 2.0 Flash, Gemini Pro and all Gemini models
  • Groq — Llama, Mixtral, Gemma at blazing inference speeds
  • xAI Grok — Grok-2 and Grok-beta models
  • Ollama — Run any open-source model locally, fully offline
  • DeepSeek — DeepSeek-R1, DeepSeek-V3 reasoning models

Knowledge Graph (RAG)

Built-in codebase understanding via a knowledge graph that maps your project's structure, dependencies, and relationships using petgraph.

  • Automatic codebase indexing and graph construction
  • Language-agnostic file analysis with Tree-sitter
  • Dependency relationship tracking
  • Context-aware code retrieval for AI queries

Interactive REPL

A rich terminal UI with full editing, history, and multi-line support powered by rustyline.

  • Syntax-highlighted input
  • Persistent session history
  • Multi-line editing with bracket matching
  • Slash commands for navigation and control
  • Tab completion for commands and file paths

Security & Privacy

Enterprise-grade security built from the ground up.

  • Credential Manager — Secure API key storage with OS keyring integration
  • Prompt Guard — Sanitization layer for safe prompt construction
  • Config Guard — Protection against configuration tampering
  • Gitignore-aware — Respects .gitignore patterns, never processes excluded files

Developer Experience

  • Real-time Streaming — Token-by-token responses with formatted markdown
  • Rich Markdown Rendering — Beautiful terminal output with syntax highlighting
  • Session Persistence — Save and resume conversations across sessions
  • File Operations — Read, write, and patch files directly from the REPL
  • Git Integration — Generate diffs, commit messages, and changelogs

Commands

Complete reference for all available ARC CLI commands.

CLI Commands

CommandDescription
arc chatStart an interactive session
arc initBootstrap ARC config in a repo
arc setupConfiguration wizard — set API keys and default models
arc doctorRun diagnostics on your setup
arc reviewAI-powered PR review via 6 specialized agents
arc run "task"Single-shot autonomous agent execution
arc --statsToken usage and cost tracking
arc graph indexIndex codebase into knowledge graph (64 languages)
arc graph search <pattern>Structural search: functions, classes, types
arc graph trace <fn>Call graph — who calls what, BFS depth 1-5
arc graph architectureArchitecture overview: layers, clusters, hotspots
arc graph impactMap git diff → affected symbols + risk scores
arc graph query <cypher>Execute Cypher-like graph queries

REPL Commands

CommandDescription
/plan [task]Generate and review a modification plan
/provider [name]Switch provider live (anthropic, groq, xai, openai)
/model [name]Switch model (e.g. grok-4-1-fast-non-reasoning)
/checkpointSave session state to redb
/rewind [id]Restore a previous checkpoint (time-travel)
/compactCompress context window
/statusShow current provider, model, message count
/memory [k] [v]Persistent key-value store
/fork [name]Branch the conversation
/security-reviewScan diffs for 9 vulnerability patterns
/copyInteractive code block picker and copy

Providers

ARC supports multiple AI providers out of the box. Configure any combination for your workflow.

Supported Providers

ProviderEnv VariableModelsContext
AnthropicANTHROPIC_API_KEYclaude-sonnet-4-20250514, claude-3-haiku200K
Groq (LPU)GROQ_API_KEYllama-3.3-70b-versatile, mixtral-8x7b128K
xAI GrokXAI_API_KEYgrok-4.20-0309, grok-4-1-fast2M
OpenAIOPENAI_API_KEYgpt-4o, gpt-4o-mini, o3-mini128K
Google GeminiGEMINI_API_KEYgemini-2.5-pro, gemini-2.5-flash1M
Ollama— (local)llama3.1, codellama, deepseek-coderVaries

Configuration

Providers can be configured via environment variables or in the config.toml file:

config.toml
[default]
provider = "anthropic"
model = "claude-sonnet-4-20250514"

[providers.openai]
api_key_env = "OPENAI_API_KEY"
default_model = "gpt-4o"

[providers.anthropic]
api_key_env = "ANTHROPIC_API_KEY"
default_model = "claude-sonnet-4-20250514"

[providers.ollama]
host = "http://localhost:11434"
default_model = "llama3"
🔒
Security: API keys are stored securely using your operating system's keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service). They are never written to plain-text config files.

Architecture

ARC is built as a modular Rust workspace with seven specialized crates working together.

Crate Structure

arc-cli
The main entry point and command-line interface. Handles argument parsing, REPL setup, and user interaction.
arc-core
Core business logic — conversation management, file operations, security modules (prompt guard, config guard, credential manager).
arc-provider
AI provider abstraction layer. Unified trait system for all providers with streaming support.
arc-config
Configuration management using TOML. Handles provider settings, model defaults, and user preferences.
arc-analyzer
Source code analysis engine with Tree-sitter integration for language-agnostic parsing and AST generation.
knowledge-graph
RAG implementation using petgraph. Builds and queries a graph of codebase relationships for context-aware responses.
arc-sandbox
Isolated execution environment for code operations. Ensures file changes are safe and reversible.

Data Flow

Architecture Diagram
┌─────────────┐     ┌───────────────┐     ┌──────────────┐
│   arc-cli   │────▶│   arc-core    │────▶│ arc-provider │
│  (REPL UI)  │     │ (Orchestrator)│     │  (AI APIs)   │
└─────────────┘     └───────┬───────┘     └──────────────┘
                            │
              ┌─────────────┼─────────────┐
              ▼             ▼             ▼
      ┌──────────┐  ┌─────────────┐  ┌──────────┐
      │arc-config│  │arc-analyzer │  │knowledge │
      │ (Config) │  │(Tree-sitter)│  │  -graph  │
      └──────────┘  └─────────────┘  │  (RAG)   │
                                     └──────────┘

Platform Support

PlatformStatusNotes
macOS (arm64/x86) Full SupportPrimary development platform
Linux (x86_64) Full SupportCI tested on Ubuntu
Windows (x86_64) Full SupportMSVC toolchain
Linux (arm64) Full SupportCross-compiled binaries

Changelog

All notable changes to ARC CLI.

v1.0.0 — Initial Release

  • Complete multi-provider AI engine with OpenAI, Anthropic, Google Gemini, Groq, xAI Grok, DeepSeek, and Ollama support
  • Interactive REPL with syntax highlighting, session persistence, and multi-line editing
  • Knowledge graph (RAG) for codebase-aware AI responses using petgraph
  • Security modules: credential manager, prompt guard, config guard
  • Real-time streaming with rich Markdown rendering in the terminal
  • Tree-sitter integration for language-agnostic source code analysis
  • Cross-platform support: macOS, Linux, Windows on x86_64 and arm64

Recent Changes

  • New: Added Groq provider with Llama 3.3 and Mixtral support at ultra-fast inference speeds
  • New: Added xAI Grok provider with Grok-2 and Grok-beta models
  • New: Multi-provider REPL — switch providers mid-conversation with /provider
  • New: Session persistence — save and resume conversations across sessions
  • New: arc providers command to list all configured providers and their status
  • Improved: Enhanced streaming performance with buffered token processing
  • Improved: Better error handling for rate limits and authentication failures
  • Fixed: Resolved UTF-8 decoding issues in streaming responses
  • Fixed: Corrected TOML parsing for nested configuration values
  • Fixed: Resolved credential manager issues on Linux with missing keyring daemon