No Description

darrenhinde 7d75353d5a feat: add GitHub discovery optimizations 4 months ago
.github 7d75353d5a feat: add GitHub discovery optimizations 4 months ago
.opencode 80e1a8d650 ✨ feat: make agent system language-agnostic with multi-language support 4 months ago
assets e073c5bb2e 🗑️ chore: remove deprecated Gemini tool files and update package configuration for improved structure 6 months ago
scripts 3ab70d24a9 fix: simplify registration script to preserve manual registry 4 months ago
.gitignore 412d5141c3 Remove unused files and clean up project structure by deleting .gitignore, bun.lock, index.html, package.json, main.js, and style.css. Update .gitignore to include only necessary entries for environment variables and build outputs. 7 months ago
CODE_OF_CONDUCT.md 7d75353d5a feat: add GitHub discovery optimizations 4 months ago
CONTRIBUTING.md 777b3fc702 feat: add interactive installer with component registry system 4 months ago
README.md 7d75353d5a feat: add GitHub discovery optimizations 4 months ago
env.example 25e6e919be ✨ feat: add Gemini API key configuration to env.example for integration 6 months ago
install.sh 357dabcfec fix: restore registry.json content and add bash 3.2 compatibility 4 months ago
registry.json e382efaa22 refactor: update installation profiles based on user feedback 4 months ago
update.sh 777b3fc702 feat: add interactive installer with component registry system 4 months ago

README.md

OpenCode Agents

GitHub stars GitHub last commit PRs Welcome

AI agent framework for plan-first development workflows with approval-based execution. Multi-language support (TypeScript, Python, Go, Rust) with automatic testing, code review, and validation.

Watch Demo

Note: This repository has evolved since the demo video with continuous improvements to make it easier for others to use in their projects. The core concepts remain the same, but installation and component organization have been streamlined.

Why Use This?

  • Multi-language support - Works with TypeScript, Python, Go, Rust, and more
  • Plan-first workflow - Agents propose plans before implementing
  • Incremental execution - Step-by-step implementation with validation
  • Quality built-in - Automatic testing, type checking, and code review
  • Your patterns - Agents follow your coding standards from context files

Quick Start

Step 1: Install OpenCode CLI

# Follow official guide
https://opencode.ai/docs

Step 2: Install Agents & Commands

Option A: Interactive Installer (Recommended)

curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash

The installer offers:

  • 🎯 Quick Profiles: Core, Developer, Full, or Advanced
  • 🎨 Custom Selection: Pick exactly what you need
  • 📦 Smart Dependencies: Auto-installs required components
  • Interactive Menus: User-friendly component browser

Option B: Profile-Based Install

# Core essentials only
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s core

# Balanced for daily development
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s developer

# Everything included
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash -s full

Option C: Manual Install

# Clone this repository
git clone https://github.com/darrenhinde/opencode-agents.git
cd opencode-agents

# Install to OpenCode directory (global)
mkdir -p ~/.opencode
cp -r .opencode/agent ~/.opencode/
cp -r .opencode/command ~/.opencode/
cp -r .opencode/context ~/.opencode/

Step 3: Start Building

# Start the main development agent (recommended for new users)
opencode --agent codebase-agent

# Tell it what to build
> "Create a React todo list with TypeScript"

What happens next:

  1. Agent proposes an implementation plan
  2. Asks for your approval
  3. Implements step-by-step with validation
  4. Delegates to @task-manager for complex features
  5. Uses @tester and @reviewer for quality assurance

How It Works

User Request
    ↓
codebase-agent (main coordinator)
    ↓
    ├─→ @task-manager (breaks down complex features)
    ├─→ @tester (writes and runs tests)
    ├─→ @reviewer (security and code review)
    ├─→ @documentation (generates docs)
    └─→ @build-agent (type checking and validation)

The workflow:

  1. You describe what you want to build
  2. Agent plans the implementation steps
  3. You approve the plan
  4. Agent implements incrementally with validation
  5. Quality checks run automatically (tests, types, linting)
  6. Subagents handle specialized tasks (testing, review, docs)

Context-aware: Agents automatically load patterns from .opencode/context/ to follow your coding standards.


What's Included

🤖 Main Agents

  • codebase-agent - Your main development partner (recommended for most tasks)
  • task-manager - Breaks complex features into manageable subtasks
  • workflow-orchestrator - Routes requests to appropriate workflows
  • image-specialist - Generates images with Gemini AI

🔧 Specialized Subagents (Auto-delegated)

  • reviewer - Code review and security analysis
  • tester - Test creation and validation
  • coder-agent - Quick implementation tasks
  • documentation - Documentation generation
  • build-agent - Build and type checking
  • codebase-pattern-analyst - Pattern discovery

⚡ Commands

  • /commit - Smart git commits with conventional format
  • /optimize - Code optimization
  • /test - Testing workflows
  • /clean - Cleanup operations
  • /context - Context management
  • /prompt-enchancer - Improve your prompts
  • /worktrees - Git worktree management

📚 Context Files

  • core/essential-patterns.md - Universal coding patterns
  • project/project-context.md - Your project-specific patterns

Example Workflows

Build a Feature

opencode --agent codebase-agent
> "Create a user authentication system with email/password"

# Agent will:
# 1. Propose implementation plan
# 2. Wait for your approval
# 3. Delegate to @task-manager (creates tasks/subtasks/user-auth/)
# 4. Implement step-by-step
# 5. Use @tester for tests
# 6. Use @reviewer for security review

Make a Commit

# Make your changes
git add .

# Use the commit command
/commit

# Auto-generates: ✨ feat: add user authentication system

Add Your Patterns

# Edit your project context
nano ~/.opencode/context/project/project-context.md

# Add your patterns:
# **API Endpoint Pattern:**
# ```typescript
# export async function POST(request: Request) {
#   // Your standard pattern
# }
# ```

# Agents will automatically use these patterns!

Optional Add-ons

📱 Telegram Notifications

Get notified when OpenCode sessions go idle.

# Copy plugin directory
cp -r .opencode/plugin ~/.opencode/

# Install dependencies
cd ~/.opencode/plugin
npm install

# Configure
cd ~/opencode-agents
cp env.example .env
# Edit .env with TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID

Get credentials: Message @BotFather on Telegram → /newbot → Save token

See .opencode/plugin/README.md for detailed documentation.

🎨 Gemini AI Image Tools

Generate and edit images using Gemini AI.

# Copy tool directory
cp -r .opencode/tool ~/.opencode/

# Install dependencies
cd ~/.opencode/tool
npm install

# Configure
cd ~/opencode-agents
cp env.example .env
# Edit .env with GEMINI_API_KEY

Get API key: https://makersuite.google.com/app/apikey


How It Compares

vs GitHub Copilot

  • Plan-first workflow - Proposes plans before executing (Copilot executes immediately)
  • Approval-based - You review and approve each step (Copilot auto-completes)
  • Multi-agent system - Specialized agents for testing, review, docs (Copilot is single-purpose)
  • Context-aware - Follows your coding patterns from context files

vs Cursor

  • IDE-agnostic - Works with any editor (Cursor is IDE-specific)
  • Multi-agent coordination - Task delegation between specialized agents
  • Workflow orchestration - Manages complex multi-step features
  • Open source - Fully customizable and extensible

vs Aider

  • Visual workflow - Interactive menus and progress tracking (Aider is CLI-only)
  • Subagent system - Automatic delegation to specialized agents
  • Built-in validation - Type checking, testing, and review integrated
  • Installation profiles - Choose your feature set (core, developer, full)

Key Differentiator: OpenCode Agents is the only framework that combines plan-first workflows, approval-based execution, and multi-agent coordination with your custom coding patterns.


Common Questions

Q: What's the main way to use this?
A: Use opencode --agent codebase-agent for development. It coordinates everything else.

Q: Do I need to install plugins/tools?
A: No, they're optional. Only install if you want Telegram notifications or Gemini AI features.

Q: Where should I install - globally or per-project?
A: Global (~/.opencode/) works for most. Project-specific (.opencode/) if you need different configs per project.

Q: How do I add my own coding patterns?
A: Edit ~/.opencode/context/project/project-context.md - agents automatically load this file.

Q: What languages are supported?
A: The agents work with any language (TypeScript, Python, Go, Rust, etc.) and adapt based on your project files.

Q: What's the AGENT-SYSTEM-BLUEPRINT.md for?
A: It's a teaching document explaining architecture patterns and how to extend the system.

Q: Can I use just one command or agent?
A: Yes! Use the installer's list feature to see all components:

./install.sh --list

Or cherry-pick individual files with curl:

curl -o ~/.opencode/agent/codebase-agent.md \
  https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/.opencode/agent/codebase-agent.md

Installation Profiles

The installer offers four pre-configured profiles:

🎯 Core (Minimal)

Essential agents and commands for basic OpenCode usage.

  • Agents: task-manager, codebase-agent
  • Subagents: reviewer, tester, documentation, coder-agent, build-agent
  • Commands: test, commit, context
  • Tools: env utilities
  • Best for: Getting started, minimal setup

💼 Developer (Recommended)

Balanced setup for daily development work.

  • Everything in Core, plus:
  • Agents: image-specialist, workflow-orchestrator
  • Subagents: codebase-pattern-analyst
  • Commands: clean, optimize, prompt-enhancer
  • Tools: Gemini AI integration
  • Plugins: Telegram notifications
  • Best for: Most developers, daily use

📦 Full

Complete installation with all available components.

  • Everything in Developer, plus:
  • Commands: worktrees (git worktree management)
  • Best for: Power users, exploring all features

🚀 Advanced

Full installation plus experimental features and planning docs.

  • Everything in Full, plus:
  • Additional: .Building/ directory, GitHub workflows
  • Best for: Contributors, learning the architecture

Updating Components

Keep your components up to date:

# Update all installed components
./update.sh

# Or re-run the installer
curl -fsSL https://raw.githubusercontent.com/darrenhinde/opencode-agents/main/install.sh | bash

Advanced

Understanding the System

Read AGENT-SYSTEM-BLUEPRINT.md to learn:

  • How context loading works (the @ symbol)
  • Agent architecture patterns
  • How to create custom agents and commands
  • How to extend the system for your needs

Safety & Security

  • Approval-first workflow - Agents propose plans before execution
  • Configurable permissions - Granular control over agent capabilities
  • Secure credentials - Environment variables for sensitive data
  • Input sanitization - Protection against injection attacks

Project Structure

.opencode/
├── agent/              # AI agents
│   ├── codebase-agent.md
│   ├── task-manager.md
│   └── subagents/      # Specialized helpers
├── command/            # Slash commands
│   ├── commit.md
│   └── optimize.md
├── context/            # Coding patterns
│   ├── core/           # Essential patterns
│   └── project/        # Your patterns
├── plugin/             # Optional: Telegram
└── tool/               # Optional: Gemini AI

Contributing

  1. Follow the established naming conventions and coding standards
  2. Write comprehensive tests for new features
  3. Update documentation for any changes
  4. Ensure security best practices are followed

License

This project is licensed under the MIT License.


Recommended for New Users

Start with codebase-agent - it's your main development partner that handles planning, implementation, and quality assurance. It automatically delegates to specialized subagents when needed, so you don't have to manage multiple agents yourself.

opencode --agent codebase-agent
> "Your development task here"

The agent will guide you through the entire development workflow with a plan-first, approval-based approach.


Support This Work

If this helped you out and you're feeling generous, consider funding my coffee habit ☕

Buy Me A Coffee

Totally optional, but appreciated.