⏱️ Estimated Reading Time: 15 minutes

Introduction to opcode

opcode is a revolutionary GUI application and toolkit designed specifically for Claude Code, developed by the Asterisk team. This powerful desktop application transforms how developers interact with Claude Code by providing an intuitive interface for managing interactive sessions, creating custom agents, and running secure background processes.

What is opcode?

opcode serves as a comprehensive frontend for Claude Code, offering features that extend far beyond the basic command-line interface:

Key Features

  • Interactive Session Management: Resume and manage Claude Code sessions with visual timelines
  • Custom Agent Creation: Design and deploy specialized AI agents for specific tasks
  • Project Organization: Organize and track multiple projects with ease
  • Checkpoint System: Save and restore conversation states at any point
  • MCP Server Integration: Connect and manage Model Context Protocol servers
  • Usage Analytics: Monitor costs and usage patterns across projects
  • Security First: Process isolation and permission control for enhanced security

Technical Architecture

  • Frontend: React 18 + TypeScript + Vite 6
  • Backend: Rust with Tauri 2
  • UI Framework: Tailwind CSS v4 + shadcn/ui
  • Database: SQLite (via rusqlite)
  • Package Manager: Bun

Prerequisites

Before installing opcode, ensure your system meets the following requirements:

System Requirements

  • Operating System: Windows 10/11, macOS 11+, or Linux (Ubuntu 20.04+)
  • RAM: Minimum 4GB (8GB recommended)
  • Storage: At least 1GB free space

Required Software

  1. Claude Code CLI: Must be installed and available in PATH
  2. Rust (1.70.0 or later)
  3. Bun (latest version)
  4. Git

Installation Commands

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install Bun
curl -fsSL https://bun.sh/install | bash

# Verify installations
rust --version
bun --version
claude --version

Building opcode from Source

Currently, opcode is only available by building from source. Here’s a comprehensive guide:

Step 1: Clone the Repository

git clone https://github.com/getAsterisk/opcode.git
cd opcode

Step 2: Install Dependencies

# Install frontend dependencies
bun install

Step 3: Platform-Specific Setup

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install -y \
  libwebkit2gtk-4.1-dev \
  libgtk-3-dev \
  libayatana-appindicator3-dev \
  librsvg2-dev \
  patchelf \
  build-essential \
  curl \
  wget \
  file \
  libssl-dev \
  libxdo-dev \
  libsoup-3.0-dev \
  libjavascriptcoregtk-4.1-dev

macOS

# Install Xcode Command Line Tools
xcode-select --install

# Install additional dependencies (optional)
brew install pkg-config

Windows

  • Install Microsoft C++ Build Tools
  • Install WebView2 (usually pre-installed on Windows 11)

Step 4: Build the Application

# For development (with hot reload)
bun run tauri dev

# For production build
bun run tauri build

Build Verification

After building, verify the application works:

# Linux/macOS
./src-tauri/target/release/opcode

# Windows
./src-tauri/target/release/opcode.exe

Initial Setup and Configuration

First Launch

  1. Launch opcode: Open the application after successful build
  2. Welcome Screen: You’ll see options for “CC Agents” or “Projects”
  3. Directory Detection: opcode automatically detects your ~/.claude directory

Basic Configuration

Setting Up Claude Code Integration

opcode relies on the Claude Code CLI being properly configured:

# Verify Claude Code is working
claude --version

# Test basic functionality
claude "Hello, Claude!"

Configuring Projects Directory

opcode will scan for Claude Code projects in:

  • ~/.claude/projects/ (default)
  • Any custom directories you specify

Managing Projects with opcode

Project Discovery and Organization

opcode automatically discovers Claude Code projects and organizes them in an intuitive interface:

  1. Project List: View all detected projects
  2. Session History: See all sessions for each project
  3. Quick Resume: One-click session resumption
  4. Project Metadata: View creation dates, last modified, and session counts

Working with Sessions

Viewing Session History

Projects → Select Project → View Sessions

Each session displays:

  • First message preview
  • Timestamp
  • Session duration
  • Token usage (if available)

Resuming Sessions

Sessions → Select Session → Resume

opcode seamlessly resumes sessions with full context preservation.

Starting New Sessions

Projects → Select Project → New Session

Create new Claude Code sessions with:

  • Custom model selection
  • Pre-configured prompts
  • Specific context requirements

Creating and Managing Custom Agents

One of opcode’s most powerful features is the ability to create specialized AI agents.

Agent Architecture

Custom agents in opcode are:

  • Isolated: Run in separate processes
  • Configurable: Customizable permissions and capabilities
  • Persistent: Maintain state across sessions
  • Secure: Sandboxed execution environment

Creating Your First Agent

Step 1: Agent Design

CC Agents → Create Agent → Configure

Required configurations:

  • Name: Descriptive agent identifier
  • Icon: Visual representation
  • System Prompt: Core instructions and behavior
  • Model Selection: Choose from available Claude models

Step 2: Permission Configuration

Set granular permissions:

Permissions:
  - File Read: Specific directories or global
  - File Write: Controlled write access
  - Network Access: Internet connectivity options
  - Process Execution: System command permissions

Step 3: Testing and Deployment

Configure → Test → Deploy

Test your agent in a sandboxed environment before full deployment.

Agent Use Cases

Development Assistant Agent

Name: "Dev Assistant"
System Prompt: |
  You are a specialized development assistant focused on:
  - Code review and optimization
  - Bug detection and resolution
  - Architecture recommendations
  - Testing strategy guidance
Permissions:
  - File Read: ~/projects/
  - File Write: ~/projects/
  - Network Access: Limited

Documentation Generator Agent

Name: "Doc Generator"
System Prompt: |
  You specialize in creating comprehensive documentation:
  - API documentation
  - User guides
  - Technical specifications
  - Code comments and explanations
Permissions:
  - File Read: ~/projects/
  - File Write: ~/docs/
  - Network Access: None

Checkpoint System Mastery

The checkpoint system is opcode’s standout feature for conversation management.

Understanding Checkpoints

Checkpoints are:

  • Conversation Snapshots: Complete state preservation
  • Branching Points: Create alternative conversation paths
  • Rollback Mechanisms: Return to previous states
  • Experiment Safe: Test ideas without losing progress

Creating Checkpoints

Manual Checkpoints

During Session → Checkpoint Menu → Create Checkpoint

Add descriptive names and notes:

  • “Before major refactoring”
  • “Working authentication implementation”
  • “Pre-optimization state”

Automatic Checkpoints

Configure automatic checkpoint creation:

  • Time-based: Every N minutes
  • Event-based: Before major operations
  • Token-based: After N tokens processed

Managing Checkpoint Trees

Visualization

opcode provides a visual timeline showing:

  • Checkpoint hierarchy
  • Branch relationships
  • Timestamp information
  • Size and scope metrics
Timeline View → Select Checkpoint → Restore or Branch

Options for each checkpoint:

  • Restore: Return to this exact state
  • Branch: Create new conversation from this point
  • Compare: See differences between checkpoints
  • Export: Save checkpoint for external use

Advanced Checkpoint Strategies

Experimental Workflows

  1. Create Checkpoint: Before trying new approaches
  2. Experiment: Test different solutions
  3. Evaluate: Compare results
  4. Restore or Continue: Based on outcomes

Collaborative Development

  1. Share Checkpoints: Export for team members
  2. Merge Insights: Combine different conversation branches
  3. Track Progress: Maintain development history

MCP Server Integration

Model Context Protocol (MCP) servers extend opcode’s capabilities significantly.

Understanding MCP Servers

MCP servers provide:

  • External Tool Access: APIs, databases, services
  • Specialized Knowledge: Domain-specific information
  • Real-time Data: Live information feeds
  • Custom Integrations: Tailored business logic

Adding MCP Servers

Manual Configuration

Menu → MCP Manager → Add Server → Manual Configuration

Required information:

  • Server URL: Endpoint address
  • Authentication: API keys or credentials
  • Capabilities: Available tools and resources
  • Permissions: Access control settings

JSON Configuration Import

{
  "mcp_servers": {
    "weather_api": {
      "command": "weather-server",
      "args": ["--api-key", "your-key"],
      "env": {
        "API_BASE_URL": "https://api.weather.com"
      }
    }
  }
}

Import via:

MCP Manager → Import Configuration → Select JSON File

Claude Desktop Integration

Import existing Claude Desktop MCP configurations:

MCP Manager → Import from Claude Desktop → Auto-detect

Testing MCP Connections

Before using MCP servers in production:

MCP Manager → Select Server → Test Connection

Verification includes:

  • Connectivity: Network reachability
  • Authentication: Credential validation
  • Capabilities: Available tools testing
  • Performance: Response time measurement

Usage Analytics and Monitoring

opcode provides comprehensive usage tracking and cost monitoring.

Dashboard Overview

Menu → Usage Dashboard → Analytics

Key metrics include:

  • Token Usage: By model, project, and timeframe
  • Cost Analysis: Spending patterns and projections
  • Session Statistics: Duration, frequency, and success rates
  • Agent Performance: Effectiveness and resource usage

Cost Management

Model Cost Tracking

Track expenses by:

  • Claude Model: Haiku, Sonnet, Opus
  • Usage Type: Input vs output tokens
  • Project Attribution: Per-project cost allocation
  • Time Periods: Daily, weekly, monthly views

Budget Controls

Set up spending alerts:

  • Daily Limits: Maximum daily spend
  • Project Budgets: Per-project allocations
  • Model Restrictions: Limit expensive model usage
  • Usage Warnings: Proactive notifications

Reporting and Export

Data Export

Export usage data for:

  • Financial Reporting: Accounting and budgeting
  • Performance Analysis: Optimization insights
  • Compliance: Audit trails and documentation
  • Team Management: Resource allocation

Custom Reports

Create tailored reports:

  • Executive Summaries: High-level cost overviews
  • Developer Reports: Individual usage patterns
  • Project Reports: Specific project analytics
  • Trend Analysis: Historical performance data

Security and Privacy Features

opcode prioritizes security with multiple protection layers.

Process Isolation

Each agent runs in isolated processes:

  • Memory Separation: No shared memory space
  • Resource Limits: CPU and memory constraints
  • Network Isolation: Controlled internet access
  • File System Sandboxing: Restricted file access

Permission Management

Granular permission control:

File System Permissions

File Access:
  Read Permissions:
    - ~/projects/specific-project/
    - ~/documents/research/
  Write Permissions:
    - ~/output/generated-content/
  Restricted Areas:
    - System directories
    - Personal files
    - Other projects

Network Permissions

Network Access:
  Allowed Domains:
    - api.github.com
    - docs.anthropic.com
  Blocked Domains:
    - social-media.com
    - advertising-networks.com
  Port Restrictions:
    - Allow: 80, 443 (HTTP/HTTPS)
    - Block: 22, 3389 (SSH, RDP)

Data Privacy

opcode ensures data privacy through:

  • Local Storage: All data remains on your machine
  • No Telemetry: No data collection or tracking
  • Encrypted Storage: SQLite database encryption
  • Secure Communication: TLS for all external communications

Audit and Compliance

Built-in audit features:

  • Access Logs: Complete audit trails
  • Permission Changes: Security modification tracking
  • Data Flow Monitoring: Information access patterns
  • Compliance Reports: Regulatory requirement support

Troubleshooting Guide

Common Installation Issues

“cargo not found” Error

Problem: Rust not properly installed or PATH not configured

Solution:

# Ensure Rust is installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Add to PATH
source ~/.cargo/env

# Verify installation
cargo --version

Linux WebKit Dependencies

Problem: webkit2gtk not found during build

Solution:

# Ubuntu/Debian
sudo apt install libwebkit2gtk-4.1-dev

# For older Ubuntu versions
sudo apt install libwebkit2gtk-4.0-dev

# Verify installation
pkg-config --exists webkit2gtk-4.1

Windows MSVC Error

Problem: Microsoft C++ Build Tools not found

Solution:

  1. Install Visual Studio Build Tools
  2. Ensure C++ support is included
  3. Restart terminal after installation
  4. Verify with: cl.exe (should show Microsoft compiler)

Runtime Issues

Claude CLI Not Found

Problem: opcode can’t find Claude Code CLI

Solution:

# Verify Claude installation
claude --version

# Check PATH
echo $PATH | grep -o '[^:]*claude[^:]*'

# Reinstall if necessary
# Download from Claude's official site

Database Connection Errors

Problem: SQLite database issues

Solution:

# Check database file permissions
ls -la ~/.opcode/

# Reset database (WARNING: loses data)
rm ~/.opcode/opcode.db

# Restart opcode to recreate database

Agent Execution Failures

Problem: Custom agents not starting

Solution:

  1. Check Permissions: Verify agent has required access
  2. Review Logs: Check agent execution logs
  3. Test System Prompt: Validate prompt syntax
  4. Resource Limits: Ensure sufficient memory/CPU

Performance Optimization

Memory Usage

For high memory usage:

  • Limit Concurrent Agents: Reduce active agent count
  • Checkpoint Cleanup: Remove old checkpoints
  • Model Selection: Use lighter models when possible

Build Performance

For slow builds:

  • Parallel Jobs: Use cargo build -j N with fewer cores
  • Clean Build: cargo clean then rebuild
  • Dependencies: Update Rust and dependencies

Advanced Usage Patterns

Workflow Automation

Multi-Agent Pipelines

Create agent chains for complex workflows:

  1. Data Processor Agent: Cleans and prepares data
  2. Analyzer Agent: Performs analysis and insights
  3. Reporter Agent: Generates formatted reports
  4. Distributor Agent: Shares results with stakeholders

Scheduled Operations

Use opcode for automated tasks:

  • Nightly Reports: Automated documentation generation
  • Code Reviews: Scheduled repository analysis
  • Monitoring: System health checks and alerts

Integration Patterns

IDE Integration

Connect opcode with development environments:

  • VS Code: Custom extensions for seamless integration
  • JetBrains: Plugin development for IDE connectivity
  • Terminal: Command-line bridges for workflow automation

CI/CD Pipeline Integration

Incorporate opcode into deployment pipelines:

  • Code Quality Gates: Automated review agents
  • Documentation Updates: Auto-generated docs
  • Testing Strategy: AI-powered test generation

Best Practices and Tips

Agent Design Principles

Single Responsibility

Design agents with focused purposes:

  • Good: “Python code reviewer”
  • Bad: “General purpose assistant”

Clear Instructions

Write precise system prompts:

System Prompt: |
  You are a Python code reviewer focusing on:
  1. PEP 8 compliance
  2. Security vulnerabilities
  3. Performance optimization opportunities
  4. Maintainability improvements
  
  Always provide:
  - Specific line numbers for issues
  - Suggested fixes with code examples
  - Severity ratings (Low/Medium/High/Critical)

Iterative Development

Develop agents incrementally:

  1. Start Simple: Basic functionality first
  2. Test Thoroughly: Validate each capability
  3. Add Features: Gradually increase complexity
  4. Monitor Performance: Track success rates

Project Organization

Consistent Structure

Maintain organized project hierarchies:

~/claude-projects/
├── web-development/
│   ├── frontend-projects/
│   └── backend-services/
├── data-science/
│   ├── analysis-projects/
│   └── ml-experiments/
└── documentation/
    ├── technical-docs/
    └── user-guides/

Naming Conventions

Use descriptive, consistent naming:

  • Projects: company-product-feature
  • Agents: purpose-domain-version
  • Checkpoints: milestone-description-date

Security Best Practices

Principle of Least Privilege

Grant minimal necessary permissions:

  • File Access: Only required directories
  • Network Access: Specific domains only
  • Process Execution: Limited to essential commands

Regular Audits

Periodically review:

  • Agent Permissions: Remove unnecessary access
  • Usage Patterns: Identify anomalies
  • Security Logs: Monitor for violations

Conclusion

opcode represents a significant evolution in how developers interact with Claude Code. By providing a comprehensive GUI interface, powerful agent creation capabilities, and robust session management, it transforms Claude Code from a simple CLI tool into a sophisticated development platform.

Key Takeaways

  1. Installation: Build from source with proper dependencies
  2. Project Management: Organize and track multiple Claude Code projects
  3. Agent Creation: Design specialized AI assistants for specific tasks
  4. Checkpoint System: Leverage conversation snapshots for better workflow
  5. MCP Integration: Extend capabilities with external services
  6. Security: Maintain strict permission controls and process isolation

Next Steps

After mastering the basics:

  1. Experiment with Agents: Create task-specific assistants
  2. Explore MCP Servers: Integrate external services
  3. Optimize Workflows: Develop efficient development patterns
  4. Contribute: Join the open-source development community

Resources and Community

  • GitHub Repository: github.com/getAsterisk/opcode
  • Documentation: Comprehensive guides and API references
  • Community: Active developer community and support
  • Issues and Feedback: Bug reports and feature requests

opcode is more than just a GUI for Claude Code—it’s a complete development platform that empowers developers to create more sophisticated, maintainable, and secure AI-assisted workflows. Whether you’re building simple automation scripts or complex multi-agent systems, opcode provides the tools and flexibility needed to succeed.


Built with ❤️ by the Asterisk team. Licensed under AGPL-3.0.