cure-code

command module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

README

CuRe Code Logo

CuRe Code

AI Coding Agent for Your Terminal

Release License Platform Go

An agentic AI coding assistant that lives in your terminal. Built with Go for speed and portability.


What is CuRe Code?

CuRe Code is an AI coding agent that can read, write, and edit your code directly from the terminal. Unlike simple chat-based CLI tools, CuRe Code uses an agentic loop — it autonomously decides which tools to use, reads your files, makes changes, runs commands, and iterates until the task is complete.

Key Features
Feature Description
Agentic Loop AI autonomously reads, writes, edits files and runs commands
Agentic Memory V1 Persistent symbol tracking, file tree awareness, and state sync
Autonomous Planning Dynamic PLAN.md synchronization and task orchestration
Sub-agent Delegation Spawn specialized sub-agents for research and research
Smart Context Proactive file suggestions based on user query and history
Multi-Provider Google Gemini, OpenAI, Claude, NVIDIA, Grok, DeepSeek, Ollama
Smart Navigation Tag files directly in your prompt using @filename
Process Manager Run and manage background tasks with /ps
Confirmation Flow Dangerous operations require your approval (or use --yolo)
Single Binary No Node.js, no Python — just one Go executable
Built-in Tools
Tool Purpose
read_file / read_many Read contents of one or multiple files
write_file / edit_file Create new files or perform search-and-replace edits
shell Execute any terminal command (with confirmation)
grep_search Search for patterns across the entire project
symbol_search Find functions, classes, and structs using regex
project_summary Get a high-level overview of the codebase structure
git_info Check current git status and branch information
web_search / web_fetch Search the internet and fetch documentation/content
todo Track and manage tasks within the agent session

Linux & macOS
curl -fsSL https://raw.githubusercontent.com/broman0x/cure-code/main/install.sh | bash
Windows (PowerShell)
iex (irm https://raw.githubusercontent.com/broman0x/cure-code/main/install.ps1)
One-shot Mode
curecode "explain this codebase"
curecode "add error handling to main.go"
curecode "write tests for the auth module"

Setup

export GEMINI_API_KEY="your-key-from-aistudio.google.com"
curecode
Option 2: OpenAI
export OPENAI_API_KEY="your-key-from-platform.openai.com"
curecode
Option 3: Anthropic Claude
export ANTHROPIC_API_KEY="your-key-from-console.anthropic.com"
curecode
Option 4: NVIDIA NIM (Reasoning)
export NVIDIA_API_KEY="your-key-from-build.nvidia.com"
curecode
Option 5: DeepSeek
export DEEPSEEK_API_KEY="your-key"
curecode
Option 6: Ollama (Free, Local)
# Install from https://ollama.com
ollama pull llama3
curecode

Slash Commands

Command Description
/help Show available commands
/model Switch AI provider/model
/clear Clear screen
/compact Clear conversation history
/ps List or stop background processes
/usage Show session token usage
/save Save current session
/resume Resume a saved session
/version Show version
/exit Exit CuRe Code

How It Works

CuRe Code uses a sophisticated agentic architecture to solve complex tasks:

User Prompt
    ↓
Proactive Context Suggestions (Intelligence Service)
    ↓
AI decides which tools to call
    ↓
┌──────────────────────────────────────┐
│   Agentic Orchestration Loop         │
│                                      │
│   [Plan Mode] → Task Decomposition   │
│   [Sub-agents] → Specialized Research│
│   [Memory] → Symbol & File Tracking  │
│                                      │
│   read_file  → understand            │
│   edit_file  → make changes          │
│   shell      → run tests             │
│   grep_search → find patterns        │
│   PLAN.md    ← Auto-Sync             │
│                                      │
└──────────────────────────────────────┘
    ↓
AI provides final response & saves session

The AI has full autonomy to chain multiple tool calls until the task is complete, with a safety limit of 25 turns per prompt.


Architecture

cure-code/
├── main.go                     # Entry point
├── cmd/
│   ├── root.go                 # REPL, one-shot, slash commands
│   └── install_self.go         # Self-installer
├── internal/
│   ├── agent/
│   │   ├── agent.go            # Agentic loop (core)
│   │   ├── message.go          # Message/ToolCall types
│   │   ├── process.go          # Background process manager
│   │   ├── session.go          # Session persistence
│   │   └── system_prompt.go    # Dynamic prompt builder
│   ├── ai/
│   │   ├── fc_providers.go     # Multi-provider implementation
│   │   └── streaming.go        # Real-time token streaming
│   ├── config/
│   │   └── config.go           # Configuration & API keys
│   ├── tools/
│   │   ├── registry.go         # Tool interface & registry
│   │   ├── read_file.go        # Read file contents
│   │   ├── write_file.go       # Create/overwrite files
│   │   ├── edit_file.go        # Search & replace edits
│   │   ├── shell.go            # Execute shell commands
│   │   ├── list_dir.go         # Browse directories
│   │   ├── grep.go             # High-performance search
│   │   ├── web_search.go       # Search the web
│   │   ├── project_summary.go  # Codebase overview
│   │   └── symbol_search.go    # Find symbols with regex
│   └── ui/
│       ├── banner.go           # Startup visual
│       └── markdown.go         # Terminal MD renderer
└── go.mod

Building from Source

# Requirements: Go 1.25+
git clone https://github.com/broman0x/cure-code.git
cd cure-code
go build -o curecode .

# Or cross-compile:
GOOS=linux GOARCH=amd64 go build -o curecode-linux .
GOOS=darwin GOARCH=arm64 go build -o curecode-mac .
GOOS=windows GOARCH=amd64 go build -o curecode.exe .

File Locations

Platform Config Binary
Windows %APPDATA%\curecode\config.json %LocalAppData%\curecode\curecode.exe
Linux/macOS ~/.config/curecode/config.json ~/.local/bin/curecode

License

GNU GPLv3 — see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
ai
mcp
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL